Merge ^/head r351732 through r352104.

This commit is contained in:
Dimitry Andric 2019-09-09 19:58:46 +00:00
commit f993ed2fbd
432 changed files with 5162 additions and 14145 deletions

View File

@ -198,6 +198,88 @@ OLD_FILES+=usr/include/c++/v1/experimental/string_view
OLD_FILES+=usr/include/c++/v1/experimental/system_error
OLD_FILES+=usr/include/c++/v1/experimental/tuple
OLD_FILES+=usr/lib/libc++fs.a
# 20190904: Remove boot1.efifat
OLD_FILES+=boot/boot1.efifat
# 20190903: pc-sysinstall(8) removed
OLD_FILES+=usr/share/examples/pc-sysinstall/README
OLD_FILES+=usr/share/examples/pc-sysinstall/pc-autoinstall.conf
OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.fbsd-netinstall
OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.geli
OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.gmirror
OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.netinstall
OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.restore
OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.rsync
OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.upgrade
OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.zfs
OLD_FILES+=usr/share/man/man8/pc-sysinstall.8.gz
OLD_FILES+=usr/share/pc-sysinstall/backend-partmanager/create-part.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-partmanager/delete-part.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-emulation.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-laptop.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-nics.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/disk-info.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/disk-list.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/disk-part.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/enable-net.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/get-packages.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-components.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-config.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-mirrors.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-packages.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-rsync-backups.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-tzones.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/query-langs.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/send-logs.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/setup-ssh-keys.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/set-mirror.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/sys-mem.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/test-live.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/test-netup.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/update-part-list.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/xkeyboard-layouts.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/xkeyboard-models.sh
OLD_FILES+=usr/share/pc-sysinstall/backend-query/xkeyboard-variants.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-bsdlabel.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-cleanup.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-disk.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-extractimage.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-ftp.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-installcomponents.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-installpackages.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-localize.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-mountdisk.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-mountoptical.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-networking.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-newfs.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-parse.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-packages.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-runcommands.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-unmount.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-upgrade.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions-users.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/functions.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/installimage.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/parseconfig.sh
OLD_FILES+=usr/share/pc-sysinstall/backend/startautoinstall.sh
OLD_FILES+=usr/share/pc-sysinstall/conf/avail-langs
OLD_FILES+=usr/share/pc-sysinstall/conf/exclude-from-upgrade
OLD_FILES+=usr/share/pc-sysinstall/conf/license/bsd-en.txt
OLD_FILES+=usr/share/pc-sysinstall/conf/license/intel-en.txt
OLD_FILES+=usr/share/pc-sysinstall/conf/license/nvidia-en.txt
OLD_FILES+=usr/share/pc-sysinstall/conf/pc-sysinstall.conf
OLD_FILES+=usr/share/pc-sysinstall/doc/help-disk-list
OLD_FILES+=usr/share/pc-sysinstall/doc/help-disk-size
OLD_FILES+=usr/share/pc-sysinstall/doc/help-index
OLD_FILES+=usr/share/pc-sysinstall/doc/help-start-autoinstall
OLD_FILES+=usr/sbin/pc-sysinstall
OLD_DIRS+=usr/share/examples/pc-sysinstall
OLD_DIRS+=usr/share/pc-sysinstall/backend
OLD_DIRS+=usr/share/pc-sysinstall/backend-partmanager
OLD_DIRS+=usr/share/pc-sysinstall/backend-query
OLD_DIRS+=usr/share/pc-sysinstall/conf/license
OLD_DIRS+=usr/share/pc-sysinstall/conf
OLD_DIRS+=usr/share/pc-sysinstall/doc
OLD_DIRS+=usr/share/pc-sysinstall
# 20190825: zlib 1.0.4 removed from kernel
OLD_FILES+=usr/include/sys/zlib.h
OLD_FILES+=usr/include/sys/zutil.h

View File

@ -320,6 +320,7 @@ static const struct conv {
{ "ascii", C_ASCII, C_EBCDIC, e2a_POSIX },
{ "block", C_BLOCK, C_UNBLOCK, NULL },
{ "ebcdic", C_EBCDIC, C_ASCII, a2e_POSIX },
{ "fsync", C_FSYNC, 0, NULL },
{ "ibm", C_EBCDIC, C_ASCII, a2ibm_POSIX },
{ "lcase", C_LCASE, C_UCASE, NULL },
{ "noerror", C_NOERROR, 0, NULL },

View File

@ -252,6 +252,10 @@ are maps used in historic
and
.No pre- Ns Bx 4.3 reno
systems.
.It Cm fsync
Perform an
.Xr fsync 2
on the output file before closing it.
.It Cm lcase
Transform uppercase characters into lowercase characters.
.It Cm pareven , parnone , parodd , parset

View File

@ -164,6 +164,8 @@ setup(void)
errx(1, "files is not supported for non-tape devices");
cap_rights_set(&rights, CAP_FTRUNCATE, CAP_IOCTL, CAP_WRITE);
if (ddflags & C_FSYNC)
cap_rights_set(&rights, CAP_FSYNC);
if (out.name == NULL) {
/* No way to check for read access here. */
out.fd = STDOUT_FILENO;
@ -505,6 +507,11 @@ dd_close(void)
if (ftruncate(out.fd, out.seek_offset) == -1)
err(1, "truncating %s", out.name);
}
if (ddflags & C_FSYNC) {
if (fsync(out.fd) == -1)
err(1, "fsyncing %s", out.name);
}
}
void

View File

@ -101,6 +101,7 @@ typedef struct {
#define C_NOXFER 0x10000000
#define C_NOINFO 0x20000000
#define C_PROGRESS 0x40000000
#define C_FSYNC 0x80000000
#define C_PARITY (C_PAREVEN | C_PARODD | C_PARNONE | C_PARSET)

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=runtime
PROG= uuidgen
.include <bsd.prog.mk>

View File

@ -3278,11 +3278,18 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
}
} else {
/*
* if the fs does not exist, look for it based on the
* fromsnap GUID
* If the fs does not exist, look for it based on the
* fromsnap GUID.
*/
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
"cannot receive incremental stream"));
if (resuming) {
(void) snprintf(errbuf, sizeof (errbuf),
dgettext(TEXT_DOMAIN,
"cannot receive resume stream"));
} else {
(void) snprintf(errbuf, sizeof (errbuf),
dgettext(TEXT_DOMAIN,
"cannot receive incremental stream"));
}
(void) strcpy(zc.zc_name, zc.zc_value);
*strchr(zc.zc_name, '@') = '\0';

View File

@ -2,6 +2,7 @@
.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/avl
PACKAGE= runtime
LIB= avl
SRCS= avl.c
WARNS?= 3

View File

@ -5,6 +5,7 @@
LIB= nvpair
PACKAGE= runtime
INCS= libnvpair.h
SRCS= libnvpair.c \
nvpair_alloc_system.c \

View File

@ -2,6 +2,7 @@
.PATH: ${SRCTOP}/cddl/compat/opensolaris/lib/libumem
PACKAGE= runtime
LIB= umem
SRCS= umem.c
WARNS?= 3

View File

@ -3,6 +3,7 @@
.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/avl
PACKAGE= runtime
LIB= uutil
SRCS= avl.c \
uu_alloc.c \

View File

@ -6,6 +6,7 @@
.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils/common
PACKAGE= runtime
LIB= zfs
LIBADD= md pthread umem util uutil m avl bsdxml geom nvpair z zfs_core
SRCS= deviceid.c \

View File

@ -8,6 +8,7 @@
LIB= zfs_core
LIBADD= nvpair
PACKAGE= runtime
INCS= libzfs_core.h
SRCS= libzfs_core.c \

View File

@ -2,6 +2,7 @@
.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zfs
PACKAGE= runtime
PROG= zfs
MAN= zfs.8 zfs-program.8
SRCS= zfs_main.c zfs_iter.c

View File

@ -4,6 +4,7 @@
.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/stat/common
.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
PACKAGE= runtime
PROG= zpool
MAN= zpool.8 zpool-features.7
SRCS= zpool_main.c zpool_vdev.c zpool_iter.c zpool_util.c zfs_comutil.c

View File

@ -114,15 +114,21 @@ namespace __sanitizer {
long key;
};
#if !defined(__i386__)
typedef long long __sanitizer_time_t;
#else
typedef long __sanitizer_time_t;
#endif
struct __sanitizer_shmid_ds {
__sanitizer_ipc_perm shm_perm;
unsigned long shm_segsz;
unsigned int shm_lpid;
unsigned int shm_cpid;
int shm_nattch;
unsigned long shm_atime;
unsigned long shm_dtime;
unsigned long shm_ctime;
__sanitizer_time_t shm_atime;
__sanitizer_time_t shm_dtime;
__sanitizer_time_t shm_ctime;
};
extern unsigned struct_msqid_ds_sz;
@ -153,12 +159,12 @@ namespace __sanitizer {
char *pw_passwd;
int pw_uid;
int pw_gid;
long pw_change;
__sanitizer_time_t pw_change;
char *pw_class;
char *pw_gecos;
char *pw_dir;
char *pw_shell;
long pw_expire;
__sanitizer_time_t pw_expire;
int pw_fields;
};
@ -169,12 +175,6 @@ namespace __sanitizer {
char **gr_mem;
};
#if defined(__LP64___)
typedef long long __sanitizer_time_t;
#else
typedef long __sanitizer_time_t;
#endif
typedef long __sanitizer_suseconds_t;
struct __sanitizer_timeval {

View File

@ -1758,9 +1758,15 @@ bool IfConverter::IfConvertDiamondCommon(
if (!BBI1->IsBrAnalyzable)
verifySameBranchInstructions(&MBB1, &MBB2);
#endif
BBI1->NonPredSize -= TII->removeBranch(*BBI1->BB);
// Remove duplicated instructions.
// Remove duplicated instructions from the tail of MBB1: any branch
// instructions, and the common instructions counted by NumDups2.
DI1 = MBB1.end();
while (DI1 != MBB1.begin()) {
MachineBasicBlock::iterator Prev = std::prev(DI1);
if (!Prev->isBranch() && !Prev->isDebugInstr())
break;
DI1 = Prev;
}
for (unsigned i = 0; i != NumDups2; ) {
// NumDups2 only counted non-dbg_value instructions, so this won't
// run off the head of the list.

View File

@ -1018,6 +1018,8 @@
..
opensm
..
patch
..
pr
..
printf

View File

@ -309,8 +309,6 @@
..
netgraph
..
pc-sysinstall
..
perfmon
..
pf
@ -1174,20 +1172,6 @@
..
..
..
pc-sysinstall
backend
..
backend-partmanager
..
backend-query
..
conf
license
..
..
doc
..
..
security
..
sendmail

View File

@ -175,11 +175,11 @@ copies: .PHONY .META
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \
${SDESTDIR}${INCLUDEDIR}/dev/bktr
cd ${SRCTOP}/sys/dev/evdev; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input.h \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 input.h \
${SDESTDIR}${INCLUDEDIR}/dev/evdev; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \
${SDESTDIR}${INCLUDEDIR}/dev/evdev; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \
${SDESTDIR}${INCLUDEDIR}/dev/evdev
cd ${SRCTOP}/sys/dev/hyperv/include; \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hyperv.h \
@ -191,7 +191,7 @@ copies: .PHONY .META
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \
${SDESTDIR}${INCLUDEDIR}/dev/pci
cd ${SRCTOP}/sys/dev/veriexec; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 veriexec_ioctl.h \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 veriexec_ioctl.h \
${SDESTDIR}${INCLUDEDIR}/dev/veriexec
cd ${SRCTOP}/sys/fs/cd9660/; \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \

View File

@ -294,14 +294,16 @@ int vprintf(const char * __restrict, __va_list);
int vsprintf(char * __restrict, const char * __restrict,
__va_list);
#if __ISO_C_VISIBLE >= 1999
#if __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE >= 199506
int snprintf(char * __restrict, size_t, const char * __restrict,
...) __printflike(3, 4);
int vsnprintf(char * __restrict, size_t, const char * __restrict,
__va_list) __printflike(3, 0);
#endif
#if __ISO_C_VISIBLE >= 1999
int vfscanf(FILE * __restrict, const char * __restrict, __va_list)
__scanflike(2, 0);
int vscanf(const char * __restrict, __va_list) __scanflike(1, 0);
int vsnprintf(char * __restrict, size_t, const char * __restrict,
__va_list) __printflike(3, 0);
int vsscanf(const char * __restrict, const char * __restrict, __va_list)
__scanflike(2, 0);
#endif

View File

@ -1,2 +1,9 @@
/* $FreeBSD$ */
/* Empty so we can include this unconditionally */
#ifndef _CRT_H_
#define _CRT_H_
#define HAVE_CTORS
#define INIT_CALL_SEQ(func) "call " __STRING(func)
#endif

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd June 17, 2018
.Dd September 3, 2019
.Dt GPART 8
.Os
.Sh NAME
@ -1207,7 +1207,13 @@ variables can be used to control the behavior of the
GEOM class.
The default value is shown next to each variable.
.Bl -tag -width indent
.It Va kern.geom.part.auto_resize: No 1
.It Va kern.geom.part.allow_nesting : No 0
By default, some schemes (currently BSD, BSD64 and VTOC8) do not permit
further nested partitioning.
This variable overrides this restriction and allows arbitrary nesting (except
within partitions created at offset 0).
Some schemes have their own separate checks, for which see below.
.It Va kern.geom.part.auto_resize : No 1
This variable controls automatic resize behavior of
.Nm
GEOM class.
@ -1228,6 +1234,9 @@ disk metadata.
If some inconsistency is detected, the partition table will be
rejected with a diagnostic message:
.Sy "GEOM_PART: Integrity check failed (provider, scheme)" .
.It Va kern.geom.part.gpt.allow_nesting : No 0
By default the GPT scheme is allowed only at the outermost nesting level.
This variable allows this restriction to be removed.
.It Va kern.geom.part.ldm.debug : No 0
Debug level of the Logical Disk Manager (LDM) module.
This can be set to a number between 0 and 2 inclusive.

View File

@ -1,7 +1,7 @@
# $FreeBSD$
PACKAGE= runtime
CONFS= regdomain.xml
PACKAGE=lib${LIB}
LIB= 80211
SHLIBDIR?= /lib
SHLIB_MAJOR= 1

View File

@ -111,6 +111,44 @@
<flags>IEEE80211_CHAN_HT40</flags>
</band>
</netband>
<netband mode="11ac">
<band>
<freqband ref="AC1_5180_5240_20"/>
<maxpower>17</maxpower>
<flags>IEEE80211_CHAN_HT20</flags>
<flags>IEEE80211_CHAN_VHT20</flags>
</band>
<band>
<freqband ref="AC1_5180_5240_40"/>
<maxpower>17</maxpower>
<flags>IEEE80211_CHAN_HT40</flags>
<flags>IEEE80211_CHAN_VHT40</flags>
</band>
<band>
<freqband ref="AC1_5180_5240_80"/>
<maxpower>17</maxpower>
<flags>IEEE80211_CHAN_HT40</flags>
<flags>IEEE80211_CHAN_VHT80</flags>
</band>
<band>
<freqband ref="AC1_5745_5805_20"/>
<maxpower>17</maxpower>
<flags>IEEE80211_CHAN_HT20</flags>
<flags>IEEE80211_CHAN_VHT20</flags>
</band>
<band>
<freqband ref="AC1_5745_5805_40"/>
<maxpower>17</maxpower>
<flags>IEEE80211_CHAN_HT40</flags>
<flags>IEEE80211_CHAN_VHT40</flags>
</band>
<band>
<freqband ref="AC1_5745_5805_80"/>
<maxpower>17</maxpower>
<flags>IEEE80211_CHAN_HT40</flags>
<flags>IEEE80211_CHAN_VHT80</flags>
</band>
</netband>
</rd>
<!-- FCC3 is FCC w/ DFS on Upper-UNI -->
@ -1735,6 +1773,21 @@
<chanwidth>20</chanwidth> <chansep>20</chansep>
<flags>IEEE80211_CHAN_A</flags>
</freqband>
<freqband id="AC1_5180_5240_20">
<freqstart>5180</freqstart> <freqend>5240</freqend>
<chanwidth>20</chanwidth> <chansep>20</chansep>
<flags>IEEE80211_CHAN_A</flags>
</freqband>
<freqband id="AC1_5180_5240_40">
<freqstart>5180</freqstart> <freqend>5240</freqend>
<chanwidth>40</chanwidth> <chansep>20</chansep>
<flags>IEEE80211_CHAN_A</flags>
</freqband>
<freqband id="AC1_5180_5240_80">
<freqstart>5180</freqstart> <freqend>5240</freqend>
<chanwidth>80</chanwidth> <chansep>20</chansep>
<flags>IEEE80211_CHAN_A</flags>
</freqband>
<freqband id="H4_5180_5240">
<freqstart>5180</freqstart> <freqend>5240</freqend>
<chanwidth>40</chanwidth> <chansep>20</chansep>
@ -1825,6 +1878,21 @@
<chanwidth>20</chanwidth> <chansep>20</chansep>
<flags>IEEE80211_CHAN_A</flags>
</freqband>
<freqband id="AC1_5745_5805_20">
<freqstart>5745</freqstart> <freqend>5805</freqend>
<chanwidth>20</chanwidth> <chansep>20</chansep>
<flags>IEEE80211_CHAN_A</flags>
</freqband>
<freqband id="AC1_5745_5805_40">
<freqstart>5745</freqstart> <freqend>5805</freqend>
<chanwidth>40</chanwidth> <chansep>20</chansep>
<flags>IEEE80211_CHAN_A</flags>
</freqband>
<freqband id="AC1_5745_5805_80">
<freqstart>5745</freqstart> <freqend>5805</freqend>
<chanwidth>80</chanwidth> <chansep>20</chansep>
<flags>IEEE80211_CHAN_A</flags>
</freqband>
<freqband id="H4_5745_5805">
<freqstart>5745</freqstart> <freqend>5805</freqend>
<chanwidth>40</chanwidth> <chansep>20</chansep>

View File

@ -3,7 +3,6 @@
.PATH: ${SRCTOP}/sys/netinet/libalias
CONFS= libalias.conf
PACKAGE=lib${LIB}
LIB= alias
SHLIBDIR?= /lib
SHLIB_MAJOR= 7

View File

@ -2,7 +2,6 @@
# $FreeBSD$
#
PACKAGE=lib${LIB}
OPENBSMDIR= ${SRCTOP}/contrib/openbsm
_LIBAUDITDDIR= ${OPENBSMDIR}/libauditd
_LIBBSMDIR= ${OPENBSMDIR}/libbsm

View File

@ -4,7 +4,6 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
PACKAGE= lib${LIB}
LIB= be
SHLIB_MAJOR= 1
SHLIB_MINOR= 0

View File

@ -1,7 +1,7 @@
# $Id: Makefile,v 1.5 2003/07/22 18:38:04 max Exp $
# $FreeBSD$
PACKAGE= lib${LIB}
PACKAGE= bluetooth
CONFS= hosts protocols
CONFSDIR= /etc/bluetooth
CONFSMODE_protocols= 444

View File

@ -28,7 +28,7 @@
.\" @(#)creat.2 8.1 (Berkeley) 6/2/93
.\" $FreeBSD$
.\"
.Dd June 2, 1993
.Dd September 4, 2019
.Dt CREAT 2
.Os
.Sh NAME
@ -59,4 +59,4 @@ open(path, O_CREAT | O_TRUNC | O_WRONLY, mode);
The
.Fn creat
function appeared in
.At v6 .
.At v1 .

View File

@ -6,6 +6,7 @@
CONFS+= group master.passwd shells
CONFSMODE_master.passwd= 600
CONFSPACKAGE= runtime
SRCS+= __getosreldate.c \
__pthread_mutex_init_calloc_cb_stub.c \

View File

@ -684,7 +684,7 @@ ns_name_skip(const u_char **ptrptr, const u_char *eom)
{
const u_char *cp;
u_int n;
int l;
int l = 0;
cp = *ptrptr;
while (cp < eom && (n = *cp++) != 0) {
@ -694,7 +694,7 @@ ns_name_skip(const u_char **ptrptr, const u_char *eom)
cp += n;
continue;
case NS_TYPE_ELT: /*%< EDNS0 extended label */
if ((l = labellen(cp - 1)) < 0) {
if (cp < eom && (l = labellen(cp - 1)) < 0) {
errno = EMSGSIZE; /*%< XXX */
return (-1);
}

View File

@ -96,7 +96,7 @@ is interpreted and is of type
The
.Fa which
argument may have the following values:
.Bl -column CPU_WHICH_CPUSET -offset indent
.Bl -column CPU_WHICH_INTRHANDLER -offset indent
.It Dv CPU_WHICH_TID Ta "id is lwpid_t (thread id)"
.It Dv CPU_WHICH_PID Ta "id is pid_t (process id)"
.It Dv CPU_WHICH_JAIL Ta "id is jid (jail id)"

View File

@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd April 9, 2019
.Dd August 31, 2019
.Dt PROCCTL 2
.Os
.Sh NAME
@ -503,6 +503,67 @@ must point to a memory location that can hold a value of type
.Vt int .
If signal delivery has not been requested, it will contain zero
on return.
.It Dv PROC_STACKGAP_CTL
Controls the stack gaps in the specified process.
A stack gap is the part of the growth area for a
.Dv MAP_STACK
mapped region that is reserved and never filled by memory.
Instead, the process is guaranteed to receive a
.Dv SIGSEGV
signal on accessing pages in the gap.
Gaps protect against stack overflow corrupting memory adjacent
to the stack.
.Pp
The
.Fa data
argument must point to an integer variable containing flags.
The following flags are allowed:
.Bl -tag -width PROC_STACKGAP_DISABLE_EXEC
.It Dv PROC_STACKGAP_ENABLE
This flag is only accepted for consistency with
.Dv PROC_STACKGAP_STATUS .
If stack gaps are enabled, the flag is ignored.
If disabled, the flag causes an
.Ev EINVAL
error to be returned.
After gaps are disabled in a process, they can only be re-enabled when an
.Xr execve 2
is performed.
.It Dv PROC_STACKGAP_DISABLE
Disable stack gaps for the process.
For existing stacks, the gap is no longer a reserved part of the growth
area and can be filled by memory on access.
.It Dv PROC_STACKGAP_ENABLE_EXEC
Enable stack gaps for programs started after an
.Xr execve 2
by the specified process.
.It Dv PROC_STACKGAP_DISABLE_EXEC
Inherit disabled stack gaps state after
.Xr execve 2 .
In other words, if the currently executing program has stack gaps disabled,
they are kept disabled on exec.
If gaps were enabled, they are kept enabled after exec.
.El
.Pp
The stack gap state is inherited from the parent on
.Xr fork 2 .
.It Dv PROC_STACKGAP_STATUS
Returns the current stack gap state for the specified process.
.Fa data
must point to an integer variable, which is used to return a bitmask
consisting of the following flags:
.Bl -tag -width PROC_STACKGAP_DISABLE_EXEC
.It Dv PROC_STACKGAP_ENABLE
Stack gaps are enabled.
.It Dv PROC_STACKGAP_DISABLE
Stack gaps are disabled.
.It Dv PROC_STACKGAP_ENABLE_EXEC
Stack gaps are enabled in the process after
.Xr execve 2 .
.It Dv PROC_STACKGAP_DISABLE_EXEC
Stack gaps are disabled in the process after
.Xr execve 2 .
.El
.El
.Sh NOTES
Disabling tracing on a process should not be considered a security

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE= lib${LIB}
LIB= calendar
SRCS= calendar.c easter.c

View File

@ -1,6 +1,7 @@
# $FreeBSD$
PACKAGE= lib${LIB}
PACKAGE= runtime
LIB= cam
SHLIBDIR?= /lib
SRCS= camlib.c scsi_cmdparse.c scsi_all.c scsi_da.c scsi_sa.c cam.c \

View File

@ -1,7 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
INCS= capsicum_helpers.h
MAN+= capsicum_helpers.3

View File

@ -1,11 +1,11 @@
# $FreeBSD$
PACKAGE= runtime
SHLIBDIR?= /lib
.include <src.opts.mk>
PACKAGE=casper
.if ${MK_CASPER} != "no"
SHLIB= casper
SHLIB_MAJOR= 1

View File

@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper
.include <src.opts.mk>
PACKAGE=libcasper
PACKAGE= runtime
SHLIB_MAJOR= 2
INCSDIR?= ${INCLUDEDIR}/casper

View File

@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper
.include <src.opts.mk>
PACKAGE=libcasper
PACKAGE= runtime
SHLIB_MAJOR= 1
INCSDIR?= ${INCLUDEDIR}/casper

View File

@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper
.include <src.opts.mk>
PACKAGE=libcasper
PACKAGE= runtime
SHLIB_MAJOR= 1
INCSDIR?= ${INCLUDEDIR}/casper

View File

@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper
.include <src.opts.mk>
PACKAGE=libcasper
PACKAGE= runtime
SHLIB_MAJOR= 1
INCSDIR?= ${INCLUDEDIR}/casper

View File

@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper
.include <src.opts.mk>
PACKAGE=libcasper
PACKAGE= runtime
SHLIB_MAJOR= 2
INCSDIR?= ${INCLUDEDIR}/casper

View File

@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper
.include <src.opts.mk>
PACKAGE=libcasper
PACKAGE= runtime
SHLIB_MAJOR= 1
INCSDIR?= ${INCLUDEDIR}/casper

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= com_err
SRCS= com_err.c error.c
INCS= ${COM_ERRDIR}/com_err.h ${COM_ERRDIR}/com_right.h

View File

@ -2,11 +2,12 @@
# $FreeBSD$
#
PACKAGE=lib${LIB}
SHLIBDIR?= /lib
.include <src.opts.mk>
PACKAGE= runtime
SHLIB_MAJOR= 5
LIB= crypt

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= devctl
SRCS= devctl.c
INCS= devctl.h

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= devinfo
SRCS= devinfo.c
INCS= devinfo.h

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= devstat
SHLIBDIR?= /lib
# Bump DEVSTAT_USER_API_VER in devstat.h every time this is incremented.

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
SHLIBDIR?= /lib
.include <bsd.own.mk>
@ -10,6 +9,7 @@ SRCDIR= ${ELFTCDIR}/libelf
.PATH: ${SRCDIR}
PACKAGE= runtime
LIB= elf
SRCS= elf.c \

View File

@ -2,7 +2,6 @@
.include <src.opts.mk>
PACKAGE=lib${LIB}
LIB= fetch
CFLAGS+= -I.
SRCS= fetch.c common.c ftp.c http.c file.c \

View File

@ -1,6 +1,7 @@
# $FreeBSD$
PACKAGE=lib${LIB}
PACKAGE= runtime
LIB= geom
SHLIBDIR?= /lib
SRCS+= geom_getxml.c

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= gpio
SHLIB_MAJOR= 0

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= gssapi
SHLIB_MAJOR= 10
VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def

View File

@ -27,12 +27,12 @@
#
# $FreeBSD$
PACKAGE=lib${LIB}
SHLIBDIR?= /lib
.include <src.opts.mk>
LIB= ipsec
PACKAGE= runtime
SHLIB_MAJOR= 4
CFLAGS+=-I. -I${.CURDIR}
CFLAGS+=-DIPSEC_DEBUG -DIPSEC

View File

@ -1,14 +1,12 @@
# $FreeBSD$
PACKAGE=lib${LIB}
PACKAGE= runtime
LIB= jail
SHLIBDIR?= /lib
SHLIB_MAJOR= 1
SRCS= jail.c jail_getid.c
INCS= jail.h
PACKAGE=jail
MAN= jail.3
MLINKS+=jail.3 jail_getid.3

View File

@ -4,7 +4,7 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
PACKAGE=lib${LIB}
PACKAGE= runtime
LIB= kiconv
SRCS= kiconv_sysctl.c xlat16_iconv.c xlat16_sysctl.c
SRCS+= quirks.c

View File

@ -1,9 +1,9 @@
# @(#)Makefile 8.1 (Berkeley) 6/4/93
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= kvm
PACKAGE= runtime
SHLIBDIR?= /lib
SHLIB_MAJOR= 7
CFLAGS+=-DNO__SCCSID -I${.CURDIR}

View File

@ -4,7 +4,7 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
PACKAGE=lib${LIB}
PACKAGE= runtime
LIB= md
SHLIB_MAJOR= 6
SRCS= md4c.c md5c.c md4hl.c md5hl.c \

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
WARNS?= 3
LIB= memstat
SHLIB_MAJOR= 3

View File

@ -2,7 +2,6 @@
.include <src.opts.mk>
PACKAGE=lib${LIB}
LIB= mp
SHLIB_MAJOR= 7
LIBADD= crypto

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= mt
SHLIBDIR?= /lib
SRCS= mtlib.c

View File

@ -1,7 +1,6 @@
# $FreeBSD$
# $Whistle: Makefile,v 1.4 1999/01/17 03:41:02 julian Exp $
PACKAGE=lib${LIB}
LIB= netgraph
WARNS?= 3
MAN= netgraph.3

View File

@ -2,7 +2,6 @@
#
# Author: Harti Brandt <harti@freebsd.org>
#
PACKAGE=lib${LIB}
LIB= ngatm
SHLIB_MAJOR= 4
MAN= libngatm.3 uniaddr.3 unifunc.3 unimsg.3 unisap.3 unistruct.3

View File

@ -1,10 +1,10 @@
# $FreeBSD$
PACKAGE=lib${LIB}
SHLIBDIR?= /lib
.include <src.opts.mk>
PACKAGE= runtime
LIB= nv
SHLIB_MAJOR= 0

View File

@ -35,7 +35,6 @@
#
# $FreeBSD$
PACKAGE=lib${LIB}
OPENPAM= ${SRCTOP}/contrib/openpam
.PATH: ${OPENPAM}/include ${OPENPAM}/lib/libpam ${OPENPAM}/doc/man
@ -44,6 +43,8 @@ OPENPAM= ${SRCTOP}/contrib/openpam
SHLIB= pam
.endif
PACKAGE= runtime
MK_PROFILE=no
SRCS= openpam_asprintf.c \

View File

@ -5,7 +5,6 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
PACKAGE=lib${LIB}
LIB= pcap
SRCS= bpf_dump.c \

View File

@ -2,7 +2,6 @@
# $FreeBSD$
#
PACKAGE=lib${LIB}
SHLIBDIR?= /lib
.include <bsd.own.mk>

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= pmc
SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc

View File

@ -2,7 +2,6 @@
.include <src.opts.mk>
PACKAGE=lib${LIB}
LIB= proc
SRCS= crc32.c \

View File

@ -2,7 +2,6 @@
.include <src.opts.mk>
PACKAGE=lib${LIB}
LIB= procstat
SRCS= cd9660.c \

View File

@ -26,7 +26,6 @@
.include <src.opts.mk>
PACKAGE=lib${LIB}
LIB= radius
SRCS= radlib.c
INCS= radlib.h radlib_vs.h

View File

@ -5,7 +5,6 @@
.PATH: ${SRCTOP}/include/rpcsvc
PACKAGE=lib${LIB}
LIB= rpcsvc
RPCSRCS= klm_prot.x mount.x nfs_prot.x nlm_prot.x rex.x rnusers.x \

View File

@ -2,7 +2,6 @@
.include <src.opts.mk>
PACKAGE=lib${LIB}
LIB=rt
SHLIB_MAJOR= 1
CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}

View File

@ -2,7 +2,6 @@
.include <bsd.own.mk>
PACKAGE=lib${LIB}
LIB= rtld_db
SHLIB_MAJOR= 2
MAN= librtld_db.3

View File

@ -1,6 +1,7 @@
# $FreeBSD$
PACKAGE=lib${LIB}
PACKAGE= runtime
LIB= sbuf
SHLIBDIR?= /lib
SRCS= subr_prf.c subr_sbuf.c

View File

@ -2,7 +2,6 @@
.include <src.opts.mk>
PACKAGE=lib${LIB}
LIB= sysdecode
SRCS= errno.c flags.c ioctl.c signal.c syscallnames.c utrace.c

View File

@ -24,7 +24,6 @@
#
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= tacplus
SRCS= taclib.c
INCS= taclib.h

View File

@ -1,6 +1,6 @@
# $FreeBSD$
PACKAGE=lib${LIB}
PACKAGE= runtime
LIB= ufs
SHLIBDIR?= /lib
SHLIB_MAJOR= 7

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= ugidfw
SHLIB_MAJOR= 5
SRCS= ugidfw.c

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
SHLIBDIR?=/lib
.include <src.opts.mk>

View File

@ -4,7 +4,6 @@
# Makefile for the FreeBSD specific LibUSB 2.0
#
PACKAGE=lib${LIB}
LIB= usb
SHLIB_MAJOR= 3
SHLIB_MINOR= 0

View File

@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.5 1999/07/23 09:44:38 mrg Exp $
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= usbhid
MAN= usbhid.3

View File

@ -1,11 +1,12 @@
# @(#)Makefile 8.1 (Berkeley) 6/4/93
# $FreeBSD$
PACKAGE=lib${LIB}
SHLIBDIR?= /lib
.include <src.opts.mk>
PACKAGE= runtime
.PATH: ${SRCTOP}/lib/libc/gen # for pw_scan.c
LIB= util

View File

@ -5,7 +5,6 @@
.include <src.opts.mk>
CONFS= hosts.allow
PACKAGE=lib${LIB}
LIB= wrap
SHLIB_MAJOR= 6
INCS= tcpd.h

View File

@ -1,10 +1,11 @@
# $FreeBSD$
PACKAGE=lib${LIB}
SHLIBDIR?= /lib
.include <src.opts.mk>
PACKAGE= runtime
LIBXOSRC= ${SRCTOP}/contrib/libxo
.PATH: ${LIBXOSRC}/libxo

View File

@ -1,6 +1,5 @@
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= ypclnt
SHLIB_MAJOR= 4
SRCS= ypclnt_connect.c \

View File

@ -2,7 +2,7 @@
# $FreeBSD$
#
PACKAGE=lib${LIB}
PACKAGE= runtime
LIB= z
SHLIBDIR?= /lib
SHLIB_MAJOR= 6

View File

@ -5,6 +5,8 @@
CONFGROUPS= CONFETC CONFETCEXEC CONFETCDEFAULTS
CONFETCDIR= /etc
CONFETC= network.subr rc rc.initdiskless rc.subr rc.shutdown rc.bsdextended
CONFETCPACKAGE= rc
.if ${MK_IPFW} != "no"
CONFETC+= rc.firewall
.endif
@ -15,9 +17,10 @@ CONFETCMODE= 644
CONFETCEXEC= netstart pccard_ether rc.resume rc.suspend
CONFETCEXECDIR= /etc
CONFETCEXECMODE= 755
CONFETCEXECPACKAGE= rc
CONFETCDEFAULTSDIR= /etc/defaults
CONFETCDEFAULTS= rc.conf
#PACKAGE=rc
CONFETCDEFAULTSPACKAGE= rc
SUBDIR+= rc.d

View File

@ -4,7 +4,7 @@
CONFDIR= /etc/rc.d
CONFGROUPS= CONFS
#PACKAGE=rc
CONFSPACKAGE= rc
CONFS= DAEMON \
FILESYSTEMS \
@ -324,7 +324,6 @@ ZFS+= zfs
ZFS+= zfsbe
ZFS+= zfsd
ZFS+= zvol
ZFSPACKAGE= zfs
.endif
.for fg in ${CONFGROUPS}

View File

@ -1036,6 +1036,9 @@ run_rc_command()
_postcmd=\$${rc_arg}_postcmd
if [ -n "$_cmd" ]; then
if [ -n "$_env" ]; then
eval "export -- $_env"
fi
_run_rc_precmd || return 1
_run_rc_doit "$_cmd $rc_extra_args" || return 1
_run_rc_postcmd

View File

@ -45,7 +45,7 @@ if [ "$1" = "-b" ]; then
# This is highly x86-centric and will be used directly below.
bootable="-o bootimage=i386;$BASEBITSDIR/boot/cdboot -o no-emul-boot"
# Make EFI system partition (should be done with makefs in the future)
# Make EFI system partition.
# The ISO file is a special case, in that it only has a maximum of
# 800 KB available for the boot code. So make an 800 KB ESP
espfilename=$(mktemp /tmp/efiboot.XXXXXX)

View File

@ -20,6 +20,8 @@ binutils_COMMENT= Binutils
binutils_DESC= Binutils
bluetooth_COMMENT= Bluetooth Utilities
bluetooth_DESC= Bluetooth Utilities
bootloader_COMMENT= Bootloader
bootloader_DESC= Bootloader and configuration files
bsdinstall_COMMENT= BSDInstall Utilities
bsdinstall_DESC= BSDInstall Utilities
bsnmp_COMMENT= BSNMP Utilities
@ -55,6 +57,8 @@ kernel_COMMENT= FreeBSD Kernel
kernel_DESC= FreeBSD Kernel
manuals_COMMENT= Manual Pages
manuals_DESC= Manual Pages
rc_COMMENT= RC Scripts
rc_DESC= RC Scripts
rcmds_COMMENT= Remote Command Utilities
rcmds_DESC= Remote Command Utilities
rescue_COMMENT= Rescue Utilities
@ -80,6 +84,8 @@ tests_COMMENT= Test Suite
tests_DESC= Test Suite
unbound_COMMENT= Unbound DNS Resolver
unbound_DESC= Unbound DNS Resolver
utilities_COMMENT= Non-vital programs and librairies
utilities_DESC= Non-vital programs and librairies
vi_COMMENT= Vi Editor
vi_DESC= Vi Editor
wpa_COMMENT= 802.11 Supplicant

View File

@ -28,6 +28,9 @@
tags=tags""_kernconf
}
}
if ($1 ~ /^\/boot\//) {
tags="package=bootloader"
}
if (length(tags) == 0)
next
if (tags ~ /package=/) {

View File

@ -18,7 +18,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd May 12, 2019
.Dd September 4, 2019
.Dt BECTL 8
.Os
.Sh NAME
@ -57,6 +57,9 @@
.Nm
.Cm list
.Op Fl aDHs
.Op Fl c Ar property
.Op Fl C Ar property
.Oo Bro Fl c Ar property | Fl C Ar property Brc Oc
.Nm
.Cm mount
.Ar beName
@ -234,7 +237,12 @@ generated by
.El
.Pp
All default parameters may be overwritten.
.It Cm list Op Fl aDHs
.It Xo
.Cm list
.Op Fl DHas
.Oo Bro Fl c Ar property | Fl C Ar property Brc Oc
.Xc
.Pp
Display all boot environments.
The
.Em Active
@ -245,21 +253,44 @@ active on reboot
or both
.Pq Em \&NR .
.Pp
If
.Fl a
is used, display all datasets.
If
.Fl D
is used, display the full space usage for each boot environment, assuming all
.Bl -tag -width indent
.It Fl a
Display all datasets.
.It Fl D
Display the full space usage for each boot environment, assuming all
other boot environments were destroyed.
The
.Fl H
option is used for scripting.
It does not print headers and separate fields by a single tab instead of
.It Fl H
Used for scripting.
Do not print headers and separate fields by a single tab instead of
arbitrary white space.
If
.It Fl s
Display all snapshots as well.
.It Fl c Ar property
Sort boot environments by given property name.
The following properties are supported:
.Pp
.Bl -tag -width 4n -offset indent -compact
.It name (default output)
.It creation
.It origin
.It used
.It usedds
.It usedsnap
.It usedrefreserv
.El
.It Fl C Ar property
Same as the
.Fl c
option, but displays in descending order.
.El
.Pp
The
.Fl D
option is ignored when either the
.Fl s
is used, display all snapshots as well.
or
.Fl a
option is used.
.It Cm mount Ar beName Op Ar mountpoint
Temporarily mount the boot environment.
Mount at the specified

View File

@ -80,7 +80,7 @@ usage(bool explicit)
"\tbectl jail {-b | -U} [{-o key=value | -u key}]... "
"{jailID | jailName}\n"
"\t bootenv [utility [argument ...]]\n"
"\tbectl list [-DHas]\n"
"\tbectl list [-DHas] [{-c property | -C property}]\n"
"\tbectl mount beName [mountpoint]\n"
"\tbectl rename origBeName newBeName\n"
"\tbectl {ujail | unjail} {jailID | jailName} bootenv\n"

View File

@ -38,6 +38,12 @@ __FBSDID("$FreeBSD$");
#include "bectl.h"
struct sort_column {
char *name;
char *val;
nvlist_t *nvl;
};
struct printc {
int active_colsz_def;
int be_colsz;
@ -324,6 +330,74 @@ print_headers(nvlist_t *props, struct printc *pc)
printf("\n");
}
/*
* Sort the given nvlist of boot environments by property.
*/
static int
prop_list_sort(nvlist_t *props, char *property, bool reverse)
{
nvpair_t *nvp;
nvlist_t *nvl;
int i, nvp_count;
uint64_t lval, rval;
struct sort_column sc_prev, sc_next;
/* a temporary list to work with */
nvlist_dup(props, &nvl, 0);
nvp_count = fnvlist_num_pairs(nvl);
for (i = 0; i < nvp_count; i++) {
nvp = nvlist_next_nvpair(nvl, NULL);
nvpair_value_nvlist(nvp, &sc_prev.nvl);
nvlist_lookup_string(sc_prev.nvl, "name", &sc_prev.name);
nvlist_lookup_string(sc_prev.nvl, property, &sc_prev.val);
while ((nvp = nvlist_next_nvpair(nvl, nvp)) != NULL) {
nvpair_value_nvlist(nvp, &sc_next.nvl);
nvlist_lookup_string(sc_next.nvl, "name", &sc_next.name);
nvlist_lookup_string(sc_next.nvl, property, &sc_next.val);
/* properties that use numerical comparison */
if (strcmp(property, "creation") == 0 ||
strcmp(property, "used") == 0 ||
strcmp(property, "usedds") == 0 ||
strcmp(property, "usedsnap") == 0 ||
strcmp(property, "usedrefreserv") == 0) {
lval = strtoull(sc_prev.val, NULL, 10);
rval = strtoull(sc_next.val, NULL, 10);
if ((lval < rval && reverse) ||
(lval > rval && !reverse))
sc_prev = sc_next;
}
/* properties that use string comparison */
else if (strcmp(property, "name") == 0 ||
strcmp(property, "origin") == 0) {
if ((strcmp(sc_prev.val, sc_next.val) < 0 && reverse) ||
(strcmp(sc_prev.val, sc_next.val) > 0 && !reverse))
sc_prev = sc_next;
}
}
/*
* The 'props' nvlist has been created to only have unique names.
* When a name is added, any existing nvlist's with the same name
* will be removed. Eventually, all existing nvlist's are replaced
* in sorted order.
*/
nvlist_add_nvlist(props, sc_prev.name, sc_prev.nvl);
nvlist_remove_all(nvl, sc_prev.name);
}
be_prop_list_free(nvl);
return 0;
}
int
bectl_cmd_list(int argc, char *argv[])
{
@ -331,12 +405,15 @@ bectl_cmd_list(int argc, char *argv[])
nvpair_t *cur;
nvlist_t *dsprops, *props;
int opt, printed;
boolean_t active_now, active_reboot;
char *column;
bool reverse;
column = NULL;
props = NULL;
printed = 0;
bzero(&pc, sizeof(pc));
while ((opt = getopt(argc, argv, "aDHs")) != -1) {
reverse = false;
while ((opt = getopt(argc, argv, "aDHsc:C:")) != -1) {
switch (opt) {
case 'a':
pc.show_all_datasets = true;
@ -350,6 +427,18 @@ bectl_cmd_list(int argc, char *argv[])
case 's':
pc.show_snaps = true;
break;
case 'c':
if (column != NULL)
free(column);
column = strdup(optarg);
reverse = false;
break;
case 'C':
if (column != NULL)
free(column);
column = strdup(optarg);
reverse = true;
break;
default:
fprintf(stderr, "bectl list: unknown option '-%c'\n",
optopt);
@ -374,44 +463,31 @@ bectl_cmd_list(int argc, char *argv[])
return (1);
}
/* List boot environments in alphabetical order by default */
if (column == NULL)
column = strdup("name");
prop_list_sort(props, column, reverse);
/* Force -D off if either -a or -s are specified */
if (pc.show_all_datasets || pc.show_snaps)
pc.show_space = false;
if (!pc.script_fmt)
print_headers(props, &pc);
/* Do a first pass to print active and next active first */
/* Print boot environments */
for (cur = nvlist_next_nvpair(props, NULL); cur != NULL;
cur = nvlist_next_nvpair(props, cur)) {
nvpair_value_nvlist(cur, &dsprops);
active_now = active_reboot = false;
nvlist_lookup_boolean_value(dsprops, "active", &active_now);
nvlist_lookup_boolean_value(dsprops, "nextboot",
&active_reboot);
if (!active_now && !active_reboot)
continue;
if (printed > 0 && (pc.show_all_datasets || pc.show_snaps))
printf("\n");
print_info(nvpair_name(cur), dsprops, &pc);
printed++;
}
/* Now pull everything else */
for (cur = nvlist_next_nvpair(props, NULL); cur != NULL;
cur = nvlist_next_nvpair(props, cur)) {
nvpair_value_nvlist(cur, &dsprops);
active_now = active_reboot = false;
nvlist_lookup_boolean_value(dsprops, "active", &active_now);
nvlist_lookup_boolean_value(dsprops, "nextboot",
&active_reboot);
if (active_now || active_reboot)
continue;
if (printed > 0 && (pc.show_all_datasets || pc.show_snaps))
printf("\n");
print_info(nvpair_name(cur), dsprops, &pc);
printed++;
}
free(column);
be_prop_list_free(props);
return (0);

View File

@ -344,12 +344,6 @@ scsiattrib(struct cam_device *device, int argc, char **argv, char *combinedopt,
if (cam_send_ccb(device, ccb) < 0) {
warn("error sending %s ATTRIBUTE", (read_attr != 0) ?
"READ" : "WRITE");
if (verbosemode != 0) {
cam_error_print(device, ccb, CAM_ESF_ALL,
CAM_EPF_ALL, stderr);
}
error = 1;
goto bailout;
}

File diff suppressed because it is too large Load Diff

View File

@ -701,11 +701,11 @@ fw_check_device_ready(struct cam_device *dev, camcontrol_devtype devtype,
/*flags*/ CAM_DIR_IN,
/*tag_action*/ MSG_SIMPLE_Q_TAG,
/*protocol*/ AP_PROTO_PIO_IN,
/*ata_flags*/ AP_FLAG_BYT_BLOK_BYTES |
/*ata_flags*/ AP_FLAG_BYT_BLOK_BLOCKS |
AP_FLAG_TLEN_SECT_CNT |
AP_FLAG_TDIR_FROM_DEV,
/*features*/ 0,
/*sector_count*/ (uint8_t) dxfer_len,
/*sector_count*/ dxfer_len / 512,
/*lba*/ 0,
/*command*/ ATA_ATA_IDENTIFY,
/*auxiliary*/ 0,

Some files were not shown because too many files have changed in this diff Show More