MFH
Sponsored by: The FreeBSD Foundation
This commit is contained in:
commit
3bea1c132c
@ -1125,7 +1125,9 @@ distrib-dirs: .MAKE .PHONY
|
||||
${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
|
||||
${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET}
|
||||
|
||||
distribution: distrib-dirs .MAKE .PHONY
|
||||
distribution: .MAKE .PHONY
|
||||
${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
|
||||
${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET}
|
||||
${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \
|
||||
${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \
|
||||
METALOG=${METALOG} installconfig
|
||||
|
@ -325,6 +325,21 @@ catgets(nl_catd catd, int set_id, int msg_id, const char *s)
|
||||
return ((char *)s);
|
||||
}
|
||||
|
||||
static void
|
||||
catfree(struct catentry *np)
|
||||
{
|
||||
|
||||
if (np->catd != NULL && np->catd != NLERR) {
|
||||
munmap(np->catd->__data, (size_t)np->catd->__size);
|
||||
free(np->catd);
|
||||
}
|
||||
SLIST_REMOVE(&cache, np, catentry, list);
|
||||
free(np->name);
|
||||
free(np->path);
|
||||
free(np->lang);
|
||||
free(np);
|
||||
}
|
||||
|
||||
int
|
||||
catclose(nl_catd catd)
|
||||
{
|
||||
@ -341,15 +356,8 @@ catclose(nl_catd catd)
|
||||
SLIST_FOREACH(np, &cache, list) {
|
||||
if (catd == np->catd) {
|
||||
np->refcount--;
|
||||
if (np->refcount == 0) {
|
||||
munmap(catd->__data, (size_t)catd->__size);
|
||||
free(catd);
|
||||
SLIST_REMOVE(&cache, np, catentry, list);
|
||||
free(np->name);
|
||||
free(np->path);
|
||||
free(np->lang);
|
||||
free(np);
|
||||
}
|
||||
if (np->refcount == 0)
|
||||
catfree(np);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd December 26, 2014
|
||||
.Dd February 2, 2016
|
||||
.Dt DEVCTL 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -35,6 +35,7 @@
|
||||
.Nm devctl_disable ,
|
||||
.Nm devctl_enable ,
|
||||
.Nm devctl_resume ,
|
||||
.Nm devctl_set_driver ,
|
||||
.Nm devctl_suspend
|
||||
.Nd device control library
|
||||
.Sh LIBRARY
|
||||
@ -52,9 +53,9 @@
|
||||
.Ft int
|
||||
.Fn devctl_resume "const char *device"
|
||||
.Ft int
|
||||
.Fn devctl_suspend "const char *device"
|
||||
.Ft int
|
||||
.Fn devctl_set_driver "const char *device" "const char *driver" "bool force"
|
||||
.Ft int
|
||||
.Fn devctl_suspend "const char *device"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
@ -287,7 +288,7 @@ The new device driver failed to attach.
|
||||
The
|
||||
.Nm
|
||||
library first appeared in
|
||||
.Fx 11.0 .
|
||||
.Fx 10.3 .
|
||||
.Sh BUGS
|
||||
If a device is suspended individually via
|
||||
.Fn devctl_suspend
|
||||
|
@ -113,7 +113,8 @@ static driver_t lbc_driver = {
|
||||
|
||||
devclass_t lbc_devclass;
|
||||
|
||||
DRIVER_MODULE(lbc, ofwbus, lbc_driver, lbc_devclass, 0, 0);
|
||||
EARLY_DRIVER_MODULE(lbc, ofwbus, lbc_driver, lbc_devclass,
|
||||
0, 0, BUS_PASS_BUS);
|
||||
|
||||
/*
|
||||
* Calculate address mask used by OR(n) registers. Use memory region size to
|
||||
|
@ -219,10 +219,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
*/
|
||||
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
|
||||
SIGISMEMBER(psp->ps_sigonstack, sig)) {
|
||||
usfp = (void *)((uintptr_t)td->td_sigstk.ss_sp +
|
||||
td->td_sigstk.ss_size - rndfsize);
|
||||
usfp = (void *)(((uintptr_t)td->td_sigstk.ss_sp +
|
||||
td->td_sigstk.ss_size - rndfsize) & ~0xFul);
|
||||
} else {
|
||||
usfp = (void *)(tf->fixreg[1] - rndfsize);
|
||||
usfp = (void *)((tf->fixreg[1] - rndfsize) & ~0xFul);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -45,9 +45,9 @@
|
||||
*/
|
||||
.globl CNAME(sigcode32),CNAME(szsigcode32)
|
||||
CNAME(sigcode32):
|
||||
addi 1,1,-20 /* reserved space for callee */
|
||||
addi 1,1,-32 /* reserved space for callee */
|
||||
blrl
|
||||
addi 3,1,20+SF_UC /* restore sp, and get &frame->sf_uc */
|
||||
addi 3,1,32+SF_UC /* restore sp, and get &frame->sf_uc */
|
||||
li 0,SYS_sigreturn
|
||||
sc /* sigreturn(scp) */
|
||||
li 0,SYS_exit
|
||||
|
@ -154,20 +154,25 @@ f_substr()
|
||||
# Similar to sprintf(3), write a string into $var_to_set using printf(1) syntax
|
||||
# (`$format [$arguments ...]').
|
||||
#
|
||||
f_sprintf()
|
||||
{
|
||||
local __var_to_set="$1"
|
||||
shift 1 # var_to_set
|
||||
|
||||
case "$BASH_VERSION" in
|
||||
3.1*|4.*)
|
||||
local __tmp
|
||||
case "$BASH_VERSION" in
|
||||
3.1*|4.*)
|
||||
f_sprintf()
|
||||
{
|
||||
local __var_to_set="$1" __tmp
|
||||
shift 1 # var_to_set
|
||||
printf -v __tmp "$@"
|
||||
eval "$__var_to_set"=\"\${__tmp%\$NL}\"
|
||||
;;
|
||||
*) eval "$__var_to_set"=\$\( printf -- \"\$@\" \)
|
||||
esac
|
||||
}
|
||||
}
|
||||
;;
|
||||
*)
|
||||
# NB: On FreeBSD, sh(1) runs this faster than bash(1) runs the above
|
||||
f_sprintf()
|
||||
{
|
||||
local __var_to_set="$1"
|
||||
shift 1 # var_to_set
|
||||
eval "$__var_to_set"=\$\( printf -- \"\$@\" \)
|
||||
}
|
||||
esac
|
||||
|
||||
# f_vsprintf $var_to_set $format $format_args
|
||||
#
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd February 5, 2015
|
||||
.Dd February 2, 2016
|
||||
.Dt DEVCTL 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -134,4 +134,4 @@ the device will not be changed.
|
||||
The
|
||||
.Nm
|
||||
utility first appeared in
|
||||
.Fx 11.0 .
|
||||
.Fx 10.3 .
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#-
|
||||
# Copyright (c) 2010-2015 Devin Teske
|
||||
# Copyright (c) 2010-2016 Devin Teske
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -40,7 +40,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
#
|
||||
# Version information
|
||||
#
|
||||
SYSRC_VERSION="7.0 Sep-13,2015"
|
||||
SYSRC_VERSION="7.1 Feb-2,2016"
|
||||
|
||||
#
|
||||
# Options
|
||||
@ -595,7 +595,7 @@ fi
|
||||
if [ "$SHOW_ALL" ]; then
|
||||
#
|
||||
# Get a list of variables that are currently set in the rc.conf(5)
|
||||
# files (included `/etc/defaults/rc.conf') by performing a call to
|
||||
# files (including `/etc/defaults/rc.conf') by performing a call to
|
||||
# source_rc_confs() in a clean environment.
|
||||
#
|
||||
( # Operate in a sub-shell to protect the parent environment
|
||||
|
@ -255,7 +255,7 @@ When using the
|
||||
.Ql key+=value
|
||||
syntax to add items to existing values,
|
||||
the first character of the value is taken as the delimiter separating items
|
||||
.Pq usually Qo (space) Qc or Qo , Qc .
|
||||
.Pq usually Qo " " Qc or Qo , Qc .
|
||||
For example, in the following statement:
|
||||
.Bl -item -offset indent
|
||||
.It
|
||||
@ -316,7 +316,7 @@ When using the
|
||||
.Ql key-=value
|
||||
syntax to remove items from existing values,
|
||||
the first character of the value is taken as the delimiter separating items
|
||||
.Pq usually Qo \ Qc or Qo , Qc .
|
||||
.Pq usually Qo " " Qc or Qo , Qc .
|
||||
For example, in the following statement:
|
||||
.Pp
|
||||
.Dl Nm cloned_interfaces-=" gif0"
|
||||
|
Loading…
Reference in New Issue
Block a user