svn commit: r265337 - in user/dchagin/lemul: . bin/dd bin/ps cddl/lib/libdtrace contrib/gcc/config/i386 contrib/top lib/libc/regex lib/libc/rpc lib/libproc lib/libutil release/doc/en_US.ISO8859-1/h...
Dmitry Chagin
dchagin at FreeBSD.org
Sun May 4 20:21:49 UTC 2014
Author: dchagin
Date: Sun May 4 20:21:41 2014
New Revision: 265337
URL: http://svnweb.freebsd.org/changeset/base/265337
Log:
Sync with HEAD.
Added:
user/dchagin/lemul/share/man/man4/mpr.4
- copied unchanged from r265336, head/share/man/man4/mpr.4
user/dchagin/lemul/share/man/man9/pget.9
- copied unchanged from r265336, head/share/man/man9/pget.9
user/dchagin/lemul/sys/dev/mpr/
- copied from r265336, head/sys/dev/mpr/
user/dchagin/lemul/sys/modules/mpr/
- copied from r265336, head/sys/modules/mpr/
Deleted:
user/dchagin/lemul/share/man/man4/lindev.4
user/dchagin/lemul/sys/dev/lindev/
user/dchagin/lemul/sys/modules/lindev/
user/dchagin/lemul/tools/kerneldoc/subsys/Doxyfile-dev_lindev
Modified:
user/dchagin/lemul/Makefile.inc1
user/dchagin/lemul/UPDATING
user/dchagin/lemul/bin/dd/conv.c
user/dchagin/lemul/bin/dd/dd.h
user/dchagin/lemul/bin/ps/Makefile
user/dchagin/lemul/bin/ps/ps.1
user/dchagin/lemul/bin/ps/ps.c
user/dchagin/lemul/cddl/lib/libdtrace/libproc_compat.h
user/dchagin/lemul/contrib/gcc/config/i386/i386.c
user/dchagin/lemul/contrib/top/commands.c
user/dchagin/lemul/contrib/top/machine.h
user/dchagin/lemul/contrib/top/top.X
user/dchagin/lemul/contrib/top/top.c
user/dchagin/lemul/lib/libc/regex/engine.c
user/dchagin/lemul/lib/libc/regex/regcomp.c
user/dchagin/lemul/lib/libc/rpc/clnt_vc.c
user/dchagin/lemul/lib/libproc/_libproc.h
user/dchagin/lemul/lib/libproc/libproc.h
user/dchagin/lemul/lib/libproc/proc_bkpt.c
user/dchagin/lemul/lib/libproc/proc_create.c
user/dchagin/lemul/lib/libproc/proc_rtld.c
user/dchagin/lemul/lib/libproc/proc_sym.c
user/dchagin/lemul/lib/libproc/proc_util.c
user/dchagin/lemul/lib/libutil/kinfo_getfile.3
user/dchagin/lemul/release/doc/en_US.ISO8859-1/hardware/article.xml
user/dchagin/lemul/release/doc/en_US.ISO8859-1/relnotes/article.xml
user/dchagin/lemul/release/doc/share/misc/dev.archlist.txt
user/dchagin/lemul/rescue/rescue/Makefile
user/dchagin/lemul/sbin/gvinum/gvinum.c
user/dchagin/lemul/sbin/gvinum/gvinum.h
user/dchagin/lemul/share/man/man4/Makefile
user/dchagin/lemul/share/man/man4/rsu.4
user/dchagin/lemul/share/man/man4/urtwn.4
user/dchagin/lemul/share/man/man4/vtnet.4
user/dchagin/lemul/share/man/man5/make.conf.5
user/dchagin/lemul/share/man/man9/Makefile
user/dchagin/lemul/sys/amd64/conf/GENERIC
user/dchagin/lemul/sys/amd64/conf/GENERIC.hints
user/dchagin/lemul/sys/amd64/conf/NOTES
user/dchagin/lemul/sys/amd64/include/vmm.h (contents, props changed)
user/dchagin/lemul/sys/amd64/vmm/vmm.c
user/dchagin/lemul/sys/arm/conf/VYBRID
user/dchagin/lemul/sys/arm/rockchip/rk30xx_machdep.c
user/dchagin/lemul/sys/boot/fdt/dts/arm/exynos5250.dtsi
user/dchagin/lemul/sys/boot/fdt/dts/arm/zedboard.dts
user/dchagin/lemul/sys/boot/forth/loader.conf
user/dchagin/lemul/sys/cam/ctl/ctl_io.h
user/dchagin/lemul/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
user/dchagin/lemul/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
user/dchagin/lemul/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
user/dchagin/lemul/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
user/dchagin/lemul/sys/conf/NOTES
user/dchagin/lemul/sys/conf/files
user/dchagin/lemul/sys/conf/files.amd64
user/dchagin/lemul/sys/conf/files.i386
user/dchagin/lemul/sys/conf/files.pc98
user/dchagin/lemul/sys/conf/options
user/dchagin/lemul/sys/dev/ath/if_ath.c
user/dchagin/lemul/sys/dev/ath/if_ath_misc.h
user/dchagin/lemul/sys/dev/ath/if_athvar.h
user/dchagin/lemul/sys/dev/drm2/radeon/radeon_drv.c
user/dchagin/lemul/sys/dev/drm2/radeon/radeon_ioc32.c
user/dchagin/lemul/sys/dev/gpio/gpio_if.m
user/dchagin/lemul/sys/dev/gpio/gpiobus.c
user/dchagin/lemul/sys/dev/gpio/gpiobusvar.h
user/dchagin/lemul/sys/dev/gpio/ofw_gpiobus.c
user/dchagin/lemul/sys/dev/ofw/ofw_bus.h
user/dchagin/lemul/sys/dev/ofw/ofw_bus_if.m
user/dchagin/lemul/sys/dev/sdhci/sdhci_fdt.c
user/dchagin/lemul/sys/fs/fifofs/fifo_vnops.c
user/dchagin/lemul/sys/fs/msdosfs/msdosfs_vnops.c
user/dchagin/lemul/sys/fs/nfs/nfs_commonsubs.c
user/dchagin/lemul/sys/fs/nfsserver/nfs_nfsdport.c
user/dchagin/lemul/sys/geom/part/g_part.c
user/dchagin/lemul/sys/geom/part/g_part_ebr.c
user/dchagin/lemul/sys/geom/part/g_part_mbr.c
user/dchagin/lemul/sys/geom/part/g_part_pc98.c
user/dchagin/lemul/sys/geom/part/g_part_vtoc8.c
user/dchagin/lemul/sys/geom/uncompress/g_uncompress.c
user/dchagin/lemul/sys/geom/uzip/g_uzip.c
user/dchagin/lemul/sys/i386/conf/GENERIC
user/dchagin/lemul/sys/i386/conf/GENERIC.hints
user/dchagin/lemul/sys/i386/conf/NOTES
user/dchagin/lemul/sys/i386/conf/XEN
user/dchagin/lemul/sys/ia64/conf/GENERIC
user/dchagin/lemul/sys/kern/kern_cpu.c
user/dchagin/lemul/sys/kern/kern_descrip.c
user/dchagin/lemul/sys/kern/kern_mtxpool.c
user/dchagin/lemul/sys/kern/subr_clock.c
user/dchagin/lemul/sys/kern/sys_pipe.c
user/dchagin/lemul/sys/mips/conf/OCTEON1
user/dchagin/lemul/sys/modules/Makefile
user/dchagin/lemul/sys/modules/drm2/radeonkms/Makefile
user/dchagin/lemul/sys/net/ieee8023ad_lacp.c
user/dchagin/lemul/sys/net/radix.c
user/dchagin/lemul/sys/net/route.c
user/dchagin/lemul/sys/net/route.h
user/dchagin/lemul/sys/net/rtsock.c
user/dchagin/lemul/sys/netinet/in_rmx.c
user/dchagin/lemul/sys/netinet6/in6_ifattach.c
user/dchagin/lemul/sys/pc98/conf/NOTES
user/dchagin/lemul/sys/rpc/clnt_vc.c
user/dchagin/lemul/sys/sparc64/conf/GENERIC
user/dchagin/lemul/sys/sys/kernel.h
user/dchagin/lemul/sys/sys/mutex.h
user/dchagin/lemul/sys/sys/param.h
user/dchagin/lemul/sys/sys/pipe.h
user/dchagin/lemul/sys/sys/user.h
user/dchagin/lemul/tools/tools/nanobsd/nanobsd.sh
user/dchagin/lemul/usr.bin/nl/nl.1
user/dchagin/lemul/usr.bin/nl/nl.c
user/dchagin/lemul/usr.bin/ssh-copy-id/ssh-copy-id.sh
user/dchagin/lemul/usr.bin/top/Makefile
user/dchagin/lemul/usr.bin/top/machine.c
user/dchagin/lemul/usr.sbin/bhyve/bhyve.8
user/dchagin/lemul/usr.sbin/bhyve/bhyverun.c
user/dchagin/lemul/usr.sbin/bhyve/mptbl.c
user/dchagin/lemul/usr.sbin/bhyve/pci_emul.c
user/dchagin/lemul/usr.sbin/bhyve/pci_emul.h
Directory Properties:
user/dchagin/lemul/ (props changed)
user/dchagin/lemul/cddl/ (props changed)
user/dchagin/lemul/contrib/gcc/ (props changed)
user/dchagin/lemul/contrib/top/ (props changed)
user/dchagin/lemul/crypto/openssh/ (props changed)
user/dchagin/lemul/lib/libc/ (props changed)
user/dchagin/lemul/lib/libutil/ (props changed)
user/dchagin/lemul/sbin/ (props changed)
user/dchagin/lemul/share/man/man4/ (props changed)
user/dchagin/lemul/sys/ (props changed)
user/dchagin/lemul/sys/amd64/vmm/ (props changed)
user/dchagin/lemul/sys/boot/ (props changed)
user/dchagin/lemul/sys/cddl/contrib/opensolaris/ (props changed)
user/dchagin/lemul/sys/conf/ (props changed)
user/dchagin/lemul/usr.sbin/bhyve/ (props changed)
Modified: user/dchagin/lemul/Makefile.inc1
==============================================================================
--- user/dchagin/lemul/Makefile.inc1 Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/Makefile.inc1 Sun May 4 20:21:41 2014 (r265337)
@@ -1001,7 +1001,7 @@ buildkernel:
cd ${KRNLCONFDIR}; \
PATH=${TMPPATH} \
config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
- -I ${KERNCONFDIR} ${KERNCONFDIR}/${_kernel}
+ -I '${KERNCONFDIR}' '${KERNCONFDIR}/${_kernel}'
.endif
.if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN)
@echo
@@ -1816,7 +1816,7 @@ DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}
.if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE)
.if exists(${KERNCONFDIR}/${KERNCONF})
FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \
- ${KERNCONFDIR}/${KERNCONF} ; echo
+ '${KERNCONFDIR}/${KERNCONF}' ; echo
.endif
.endif
Modified: user/dchagin/lemul/UPDATING
==============================================================================
--- user/dchagin/lemul/UPDATING Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/UPDATING Sun May 4 20:21:41 2014 (r265337)
@@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20140430:
+ The lindev device has been removed since /dev/full has been made a
+ standard device. __FreeBSD_version has been bumped.
+
20140418:
The YES_HESIOD knob has been removed. It has been obsolete for
a decade. Please move to using WITH_HESIOD instead or your builds
Modified: user/dchagin/lemul/bin/dd/conv.c
==============================================================================
--- user/dchagin/lemul/bin/dd/conv.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/bin/dd/conv.c Sun May 4 20:21:41 2014 (r265337)
@@ -74,7 +74,7 @@ def(void)
dd_out(0);
/*
- * Ddout copies the leftover output to the beginning of
+ * dd_out copies the leftover output to the beginning of
* the buffer and resets the output buffer. Reset the
* input buffer to match it.
*/
Modified: user/dchagin/lemul/bin/dd/dd.h
==============================================================================
--- user/dchagin/lemul/bin/dd/dd.h Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/bin/dd/dd.h Sun May 4 20:21:41 2014 (r265337)
@@ -41,7 +41,7 @@ typedef struct {
/* XXX ssize_t? */
size_t dbcnt; /* current buffer byte count */
size_t dbrcnt; /* last read byte count */
- size_t dbsz; /* buffer size */
+ size_t dbsz; /* block size */
#define ISCHR 0x01 /* character device (warn on short) */
#define ISPIPE 0x02 /* pipe-like (see position.c) */
Modified: user/dchagin/lemul/bin/ps/Makefile
==============================================================================
--- user/dchagin/lemul/bin/ps/Makefile Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/bin/ps/Makefile Sun May 4 20:21:41 2014 (r265337)
@@ -11,7 +11,7 @@ SRCS= fmt.c keyword.c nlist.c print.c ps
# on large systems.
#
CFLAGS+=-DLAZY_PS
-DPADD= ${LIBM} ${LIBKVM}
-LDADD= -lm -lkvm
+DPADD= ${LIBM} ${LIBKVM} ${LIBJAIL}
+LDADD= -lm -lkvm -ljail
.include <bsd.prog.mk>
Modified: user/dchagin/lemul/bin/ps/ps.1
==============================================================================
--- user/dchagin/lemul/bin/ps/ps.1 Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/bin/ps/ps.1 Sun May 4 20:21:41 2014 (r265337)
@@ -29,7 +29,7 @@
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
-.Dd December 27, 2013
+.Dd May 2, 2014
.Dt PS 1
.Os
.Sh NAME
@@ -40,6 +40,7 @@
.Op Fl aCcdefHhjlmrSTuvwXxZ
.Op Fl O Ar fmt | Fl o Ar fmt
.Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ...
+.Op Fl J Ar jid Ns Op , Ns Ar jid Ns Ar ...
.Op Fl M Ar core
.Op Fl N Ar system
.Op Fl p Ar pid Ns Op , Ns Ar pid Ns Ar ...
@@ -62,7 +63,7 @@ will also display processes that do not
.Pp
A different set of processes can be selected for display by using any
combination of the
-.Fl a , G , p , T , t ,
+.Fl a , G , J , p , T , t ,
and
.Fl U
options.
@@ -152,6 +153,20 @@ Print information associated with the fo
.Cm user , pid , ppid , pgid , sid , jobc , state , tt , time ,
and
.Cm command .
+.It Fl J
+Display information about processes which match the specified jail IDs.
+This may be either the
+.Cm jid
+or
+.Cm name
+of the jail.
+Use
+.Fl J
+.Sy 0
+to display only host processes.
+This flag implies
+.Fl x
+by default.
.It Fl L
List the set of keywords available for the
.Fl O
Modified: user/dchagin/lemul/bin/ps/ps.c
==============================================================================
--- user/dchagin/lemul/bin/ps/ps.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/bin/ps/ps.c Sun May 4 20:21:41 2014 (r265337)
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)ps.c 8.4 (Be
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/jail.h>
#include <sys/proc.h>
#include <sys/user.h>
#include <sys/stat.h>
@@ -62,6 +63,7 @@ __FBSDID("$FreeBSD$");
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
+#include <jail.h>
#include <kvm.h>
#include <limits.h>
#include <locale.h>
@@ -124,6 +126,7 @@ struct listinfo {
const char *lname;
union {
gid_t *gids;
+ int *jids;
pid_t *pids;
dev_t *ttys;
uid_t *uids;
@@ -132,6 +135,7 @@ struct listinfo {
};
static int addelem_gid(struct listinfo *, const char *);
+static int addelem_jid(struct listinfo *, const char *);
static int addelem_pid(struct listinfo *, const char *);
static int addelem_tty(struct listinfo *, const char *);
static int addelem_uid(struct listinfo *, const char *);
@@ -163,12 +167,12 @@ static char vfmt[] = "pid,state,time,sl,
"%cpu,%mem,command";
static char Zfmt[] = "label";
-#define PS_ARGS "AaCcde" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ"
+#define PS_ARGS "AaCcde" OPT_LAZY_f "G:gHhjJ:LlM:mN:O:o:p:rSTt:U:uvwXxZ"
int
main(int argc, char *argv[])
{
- struct listinfo gidlist, pgrplist, pidlist;
+ struct listinfo gidlist, jidlist, pgrplist, pidlist;
struct listinfo ruidlist, sesslist, ttylist, uidlist;
struct kinfo_proc *kp;
KINFO *kinfo = NULL, *next_KINFO;
@@ -208,6 +212,7 @@ main(int argc, char *argv[])
prtheader = showthreads = wflag = xkeep_implied = 0;
xkeep = -1; /* Neither -x nor -X. */
init_list(&gidlist, addelem_gid, sizeof(gid_t), "group");
+ init_list(&jidlist, addelem_jid, sizeof(int), "jail id");
init_list(&pgrplist, addelem_pid, sizeof(pid_t), "process group");
init_list(&pidlist, addelem_pid, sizeof(pid_t), "process id");
init_list(&ruidlist, addelem_uid, sizeof(uid_t), "ruser");
@@ -275,6 +280,11 @@ main(int argc, char *argv[])
case 'h':
prtheader = ws.ws_row > 5 ? ws.ws_row : 22;
break;
+ case 'J':
+ add_list(&jidlist, optarg);
+ xkeep_implied = 1;
+ nselectors++;
+ break;
case 'j':
parsefmt(jfmt, 0);
_fmt = 1;
@@ -538,6 +548,11 @@ main(int argc, char *argv[])
if (kp->ki_rgid == gidlist.l.gids[elem])
goto keepit;
}
+ if (jidlist.count > 0) {
+ for (elem = 0; elem < jidlist.count; elem++)
+ if (kp->ki_jid == jidlist.l.jids[elem])
+ goto keepit;
+ }
if (pgrplist.count > 0) {
for (elem = 0; elem < pgrplist.count; elem++)
if (kp->ki_pgid ==
@@ -666,6 +681,7 @@ main(int argc, char *argv[])
}
}
free_list(&gidlist);
+ free_list(&jidlist);
free_list(&pidlist);
free_list(&pgrplist);
free_list(&ruidlist);
@@ -727,6 +743,30 @@ addelem_gid(struct listinfo *inf, const
}
static int
+addelem_jid(struct listinfo *inf, const char *elem)
+{
+ int tempid;
+
+ if (*elem == '\0') {
+ warnx("Invalid (zero-length) jail id");
+ optfatal = 1;
+ return (0); /* Do not add this value. */
+ }
+
+ tempid = jail_getid(elem);
+ if (tempid < 0) {
+ warnx("Invalid %s: %s", inf->lname, elem);
+ optfatal = 1;
+ return (0);
+ }
+
+ if (inf->count >= inf->maxcount)
+ expand_list(inf);
+ inf->l.jids[(inf->count)++] = tempid;
+ return (1);
+}
+
+static int
addelem_pid(struct listinfo *inf, const char *elem)
{
char *endp;
@@ -1373,7 +1413,7 @@ usage(void)
(void)fprintf(stderr, "%s\n%s\n%s\n%s\n",
"usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]",
- " [-M core] [-N system]",
+ " [-J jid[,jid...]] [-M core] [-N system]",
" [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]",
" ps [-L]");
exit(1);
Modified: user/dchagin/lemul/cddl/lib/libdtrace/libproc_compat.h
==============================================================================
--- user/dchagin/lemul/cddl/lib/libdtrace/libproc_compat.h Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/cddl/lib/libdtrace/libproc_compat.h Sun May 4 20:21:41 2014 (r265337)
@@ -54,7 +54,6 @@
#define Psetbkpt proc_bkptset
#define Psetflags proc_setflags
#define Pstate proc_state
-#define Pstate proc_state
#define Psymbol_iter_by_addr proc_iter_symbyaddr
#define Punsetflags proc_clearflags
#define Pupdate_maps(p) do { } while (0)
Modified: user/dchagin/lemul/contrib/gcc/config/i386/i386.c
==============================================================================
--- user/dchagin/lemul/contrib/gcc/config/i386/i386.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/contrib/gcc/config/i386/i386.c Sun May 4 20:21:41 2014 (r265337)
@@ -14408,7 +14408,7 @@ ix86_local_alignment (tree type, int ali
if (AGGREGATE_TYPE_P (type)
&& TYPE_SIZE (type)
&& TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
- && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 16
+ && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 128
|| TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 128)
return 128;
}
Modified: user/dchagin/lemul/contrib/top/commands.c
==============================================================================
--- user/dchagin/lemul/contrib/top/commands.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/contrib/top/commands.c Sun May 4 20:21:41 2014 (r265337)
@@ -74,6 +74,7 @@ e - list errors generated by last
H - toggle the displaying of threads\n\
i or I - toggle the displaying of idle processes\n\
j - toggle the displaying of jail ID\n\
+J - display processes for only one jail (+ selects all jails)\n\
k - kill processes; send a signal to a list of processes\n\
m - toggle the display between 'cpu' and 'io' modes\n\
n or # - change number of processes to display\n", stdout);
Modified: user/dchagin/lemul/contrib/top/machine.h
==============================================================================
--- user/dchagin/lemul/contrib/top/machine.h Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/contrib/top/machine.h Sun May 4 20:21:41 2014 (r265337)
@@ -66,6 +66,7 @@ struct process_select
int thread; /* show threads */
int uid; /* only this uid (unless uid == -1) */
int wcpu; /* show weighted cpu */
+ int jid; /* only this jid (unless jid == -1) */
int jail; /* show jail ID */
int kidle; /* show per-CPU idle threads */
char *command; /* only this command (unless == NULL) */
Modified: user/dchagin/lemul/contrib/top/top.X
==============================================================================
--- user/dchagin/lemul/contrib/top/top.X Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/contrib/top/top.X Sun May 4 20:21:41 2014 (r265337)
@@ -20,6 +20,8 @@ top \- display and update information ab
] [
.BI \-s time
] [
+.BI \-J jail
+] [
.BI \-U username
] [
.I number
@@ -171,6 +173,21 @@ values are \*(lqcpu\*(rq, \*(lqsize\*(rq
but may vary on different operating systems. Note that
not all operating systems support this option.
.TP
+.BI \-J jail
+Show only those processes owned by
+.IR jail .
+This may be either the
+.B jid
+or
+.B name
+of the jail.
+Use
+.B 0
+to limit to host processes.
+Using this option implies the
+.B \-j
+flag.
+.PP
.BI \-U username
Show only those processes owned by
.IR username .
@@ -315,6 +332,12 @@ Toggle the display of
.IR jail (8)
ID.
.TP
+.B J
+Display only processes owned by a specific jail (prompt for jail).
+If the jail specified is simply \*(lq+\*(rq, then processes belonging
+to all jails and the host will be displayed.
+This will also enable the display of JID.
+.TP
.B P
Toggle the display of per-CPU statistics.
.TP
Modified: user/dchagin/lemul/contrib/top/top.c
==============================================================================
--- user/dchagin/lemul/contrib/top/top.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/contrib/top/top.c Sun May 4 20:21:41 2014 (r265337)
@@ -38,7 +38,9 @@ char *copyright =
#include <signal.h>
#include <setjmp.h>
#include <ctype.h>
+#include <sys/jail.h>
#include <sys/time.h>
+#include <jail.h>
/* includes specific to top */
#include "display.h" /* interface to display package */
@@ -198,9 +200,9 @@ char *argv[];
fd_set readfds;
#ifdef ORDER
- static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPo";
+ static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPJo";
#else
- static char command_chars[] = "\f qh?en#sdkriIutHmSCajzP";
+ static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPJ";
#endif
/* these defines enumerate the "strchr"s of the commands in command_chars */
#define CMD_redraw 0
@@ -228,8 +230,9 @@ char *argv[];
#define CMD_jidtog 21
#define CMD_kidletog 22
#define CMD_pcputog 23
+#define CMD_jail 24
#ifdef ORDER
-#define CMD_order 24
+#define CMD_order 25
#endif
/* set the buffer for stdout */
@@ -261,6 +264,7 @@ char *argv[];
ps.uid = -1;
ps.thread = No;
ps.wcpu = 1;
+ ps.jid = -1;
ps.jail = No;
ps.kidle = Yes;
ps.command = NULL;
@@ -288,7 +292,7 @@ char *argv[];
optind = 1;
}
- while ((i = getopt(ac, av, "CSIHPabijnquvzs:d:U:m:o:t")) != EOF)
+ while ((i = getopt(ac, av, "CSIHPabijJ:nquvzs:d:U:m:o:t")) != EOF)
{
switch(i)
{
@@ -413,6 +417,15 @@ char *argv[];
ps.jail = !ps.jail;
break;
+ case 'J': /* display only jail's processes */
+ if ((ps.jid = jail_getid(optarg)) == -1)
+ {
+ fprintf(stderr, "%s: unknown jail\n", optarg);
+ exit(1);
+ }
+ ps.jail = 1;
+ break;
+
case 'P':
pcpu_stats = !pcpu_stats;
break;
@@ -425,7 +438,7 @@ char *argv[];
fprintf(stderr,
"Top version %s\n"
"Usage: %s [-abCHIijnPqStuvz] [-d count] [-m io | cpu] [-o field] [-s time]\n"
-" [-U username] [number]\n",
+" [-J jail] [-U username] [number]\n",
version_string(), myname);
exit(1);
}
@@ -994,7 +1007,7 @@ restart:
case CMD_user:
new_message(MT_standout,
- "Username to show: ");
+ "Username to show (+ for all): ");
if (readline(tempbuf2, sizeof(tempbuf2), No) > 0)
{
if (tempbuf2[0] == '+' &&
@@ -1085,6 +1098,44 @@ restart:
reset_display();
putchar('\r');
break;
+
+ case CMD_jail:
+ new_message(MT_standout,
+ "Jail to show (+ for all): ");
+ if (readline(tempbuf2, sizeof(tempbuf2), No) > 0)
+ {
+ if (tempbuf2[0] == '+' &&
+ tempbuf2[1] == '\0')
+ {
+ ps.jid = -1;
+ }
+ else if ((i = jail_getid(tempbuf2)) == -1)
+ {
+ new_message(MT_standout,
+ " %s: unknown jail", tempbuf2);
+ no_command = Yes;
+ }
+ else
+ {
+ ps.jid = i;
+ }
+ if (ps.jail == 0) {
+ ps.jail = 1;
+ new_message(MT_standout |
+ MT_delayed, " Displaying jail "
+ "ID.");
+ header_text =
+ format_header(uname_field);
+ reset_display();
+ }
+ putchar('\r');
+ }
+ else
+ {
+ clear_message();
+ }
+ break;
+
case CMD_kidletog:
ps.kidle = !ps.kidle;
new_message(MT_standout | MT_delayed,
Modified: user/dchagin/lemul/lib/libc/regex/engine.c
==============================================================================
--- user/dchagin/lemul/lib/libc/regex/engine.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libc/regex/engine.c Sun May 4 20:21:41 2014 (r265337)
@@ -686,19 +686,16 @@ backref(struct match *m,
while (m->g->strip[ss] != SOP(O_BACK, i))
ss++;
return(backref(m, sp+len, stop, ss+1, stopst, lev, rec));
- break;
case OQUEST_: /* to null or not */
dp = backref(m, sp, stop, ss+1, stopst, lev, rec);
if (dp != NULL)
return(dp); /* not */
return(backref(m, sp, stop, ss+OPND(s)+1, stopst, lev, rec));
- break;
case OPLUS_:
assert(m->lastpos != NULL);
assert(lev+1 <= m->g->nplus);
m->lastpos[lev+1] = sp;
return(backref(m, sp, stop, ss+1, stopst, lev+1, rec));
- break;
case O_PLUS:
if (sp == m->lastpos[lev]) /* last pass matched null */
return(backref(m, sp, stop, ss+1, stopst, lev-1, rec));
@@ -709,7 +706,6 @@ backref(struct match *m,
return(backref(m, sp, stop, ss+1, stopst, lev-1, rec));
else
return(dp);
- break;
case OCH_: /* find the right one, if any */
ssub = ss + 1;
esub = ss + OPND(s) - 1;
@@ -730,6 +726,7 @@ backref(struct match *m,
else
assert(OP(m->g->strip[esub]) == O_CH);
}
+ /* NOTREACHED */
break;
case OLPAREN: /* must undo assignment if rest fails */
i = OPND(s);
@@ -741,7 +738,6 @@ backref(struct match *m,
return(dp);
m->pmatch[i].rm_so = offsave;
return(NULL);
- break;
case ORPAREN: /* must undo assignment if rest fails */
i = OPND(s);
assert(0 < i && i <= m->g->nsub);
@@ -752,7 +748,6 @@ backref(struct match *m,
return(dp);
m->pmatch[i].rm_eo = offsave;
return(NULL);
- break;
default: /* uh oh */
assert(nope);
break;
Modified: user/dchagin/lemul/lib/libc/regex/regcomp.c
==============================================================================
--- user/dchagin/lemul/lib/libc/regex/regcomp.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libc/regex/regcomp.c Sun May 4 20:21:41 2014 (r265337)
@@ -746,7 +746,6 @@ p_b_term(struct parse *p, cset *cs)
case '-':
SETERROR(REG_ERANGE);
return; /* NOTE RETURN */
- break;
default:
c = '\0';
break;
Modified: user/dchagin/lemul/lib/libc/rpc/clnt_vc.c
==============================================================================
--- user/dchagin/lemul/lib/libc/rpc/clnt_vc.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libc/rpc/clnt_vc.c Sun May 4 20:21:41 2014 (r265337)
@@ -301,15 +301,13 @@ clnt_vc_create(fd, raddr, prog, vers, se
return (cl);
err:
- if (cl) {
- if (ct) {
- if (ct->ct_addr.len)
- mem_free(ct->ct_addr.buf, ct->ct_addr.len);
- mem_free(ct, sizeof (struct ct_data));
- }
- if (cl)
- mem_free(cl, sizeof (CLIENT));
+ if (ct) {
+ if (ct->ct_addr.len)
+ mem_free(ct->ct_addr.buf, ct->ct_addr.len);
+ mem_free(ct, sizeof (struct ct_data));
}
+ if (cl)
+ mem_free(cl, sizeof (CLIENT));
return ((CLIENT *)NULL);
}
Modified: user/dchagin/lemul/lib/libproc/_libproc.h
==============================================================================
--- user/dchagin/lemul/lib/libproc/_libproc.h Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libproc/_libproc.h Sun May 4 20:21:41 2014 (r265337)
@@ -46,6 +46,8 @@ struct proc_handle {
size_t rdobjsz;
size_t nobjs;
struct lwpstatus lwps;
+ rd_loadobj_t *rdexec; /* rdobj index of program executable. */
+ char execname[MAXPATHLEN]; /* Path to program executable. */
};
#ifdef DEBUG
Modified: user/dchagin/lemul/lib/libproc/libproc.h
==============================================================================
--- user/dchagin/lemul/lib/libproc/libproc.h Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libproc/libproc.h Sun May 4 20:21:41 2014 (r265337)
@@ -102,6 +102,7 @@ typedef struct lwpstatus {
#define PR_FAULTED 2
#define PR_SYSENTRY 3
#define PR_SYSEXIT 4
+#define PR_SIGNALLED 5
int pr_what;
#define FLTBPT -1
} lwpstatus_t;
Modified: user/dchagin/lemul/lib/libproc/proc_bkpt.c
==============================================================================
--- user/dchagin/lemul/lib/libproc/proc_bkpt.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libproc/proc_bkpt.c Sun May 4 20:21:41 2014 (r265337)
@@ -55,13 +55,6 @@ __FBSDID("$FreeBSD$");
#error "Add support for your architecture"
#endif
-static void
-proc_cont(struct proc_handle *phdl)
-{
-
- ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)1, 0);
-}
-
static int
proc_stop(struct proc_handle *phdl)
{
@@ -87,7 +80,7 @@ proc_bkptset(struct proc_handle *phdl, u
{
struct ptrace_io_desc piod;
unsigned long paddr, caddr;
- int ret = 0;
+ int ret = 0, stopped;
*saved = 0;
if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD ||
@@ -98,9 +91,12 @@ proc_bkptset(struct proc_handle *phdl, u
DPRINTFX("adding breakpoint at 0x%lx", address);
- if (phdl->status != PS_STOP)
+ stopped = 0;
+ if (phdl->status != PS_STOP) {
if (proc_stop(phdl) != 0)
return (-1);
+ stopped = 1;
+ }
/*
* Read the original instruction.
@@ -135,9 +131,9 @@ proc_bkptset(struct proc_handle *phdl, u
}
done:
- if (phdl->status != PS_STOP)
+ if (stopped)
/* Restart the process if we had to stop it. */
- proc_cont(phdl);
+ proc_continue(phdl);
return (ret);
}
@@ -148,7 +144,7 @@ proc_bkptdel(struct proc_handle *phdl, u
{
struct ptrace_io_desc piod;
unsigned long paddr, caddr;
- int ret = 0;
+ int ret = 0, stopped;
if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD ||
phdl->status == PS_IDLE) {
@@ -158,9 +154,12 @@ proc_bkptdel(struct proc_handle *phdl, u
DPRINTFX("removing breakpoint at 0x%lx", address);
- if (phdl->status != PS_STOP)
+ stopped = 0;
+ if (phdl->status != PS_STOP) {
if (proc_stop(phdl) != 0)
return (-1);
+ stopped = 1;
+ }
/*
* Overwrite the breakpoint instruction that we setup previously.
@@ -177,9 +176,9 @@ proc_bkptdel(struct proc_handle *phdl, u
ret = -1;
}
- if (phdl->status != PS_STOP)
+ if (stopped)
/* Restart the process if we had to stop it. */
- proc_cont(phdl);
+ proc_continue(phdl);
return (ret);
}
Modified: user/dchagin/lemul/lib/libproc/proc_create.c
==============================================================================
--- user/dchagin/lemul/lib/libproc/proc_create.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libproc/proc_create.c Sun May 4 20:21:41 2014 (r265337)
@@ -26,8 +26,10 @@
* $FreeBSD$
*/
-#include "_libproc.h"
-#include <stdio.h>
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#include <sys/wait.h>
+
#include <err.h>
#include <errno.h>
#include <fcntl.h>
@@ -35,7 +37,37 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/wait.h>
+
+#include "_libproc.h"
+
+static int proc_init(pid_t, int, int, struct proc_handle *);
+
+static int
+proc_init(pid_t pid, int flags, int status, struct proc_handle *phdl)
+{
+ int mib[4], error;
+ size_t len;
+
+ memset(phdl, 0, sizeof(*phdl));
+ phdl->pid = pid;
+ phdl->flags = flags;
+ phdl->status = status;
+
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_PATHNAME;
+ mib[3] = pid;
+ len = sizeof(phdl->execname);
+ if (sysctl(mib, 4, phdl->execname, &len, NULL, 0) != 0) {
+ error = errno;
+ DPRINTF("ERROR: cannot get pathname for child process %d", pid);
+ return (error);
+ }
+ if (len == 0)
+ phdl->execname[0] = '\0';
+
+ return (0);
+}
int
proc_attach(pid_t pid, int flags, struct proc_handle **pphdl)
@@ -54,12 +86,12 @@ proc_attach(pid_t pid, int flags, struct
if ((phdl = malloc(sizeof(struct proc_handle))) == NULL)
return (ENOMEM);
- memset(phdl, 0, sizeof(struct proc_handle));
- phdl->pid = pid;
- phdl->flags = flags;
- phdl->status = PS_RUN;
elf_version(EV_CURRENT);
+ error = proc_init(pid, flags, PS_RUN, phdl);
+ if (error != 0)
+ goto out;
+
if (ptrace(PT_ATTACH, phdl->pid, 0, 0) != 0) {
error = errno;
DPRINTF("ERROR: cannot ptrace child process %d", pid);
@@ -123,9 +155,9 @@ proc_create(const char *file, char * con
_exit(2);
} else {
/* The parent owns the process handle. */
- memset(phdl, 0, sizeof(struct proc_handle));
- phdl->pid = pid;
- phdl->status = PS_IDLE;
+ error = proc_init(pid, 0, PS_IDLE, phdl);
+ if (error != 0)
+ goto bad;
/* Wait for the child process to stop. */
if (waitpid(pid, &status, WUNTRACED) == -1) {
Modified: user/dchagin/lemul/lib/libproc/proc_rtld.c
==============================================================================
--- user/dchagin/lemul/lib/libproc/proc_rtld.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libproc/proc_rtld.c Sun May 4 20:21:41 2014 (r265337)
@@ -49,6 +49,9 @@ map_iter(const rd_loadobj_t *lop, void *
if (phdl->rdobjs == NULL)
return (-1);
}
+ if (strcmp(lop->rdl_path, phdl->execname) == 0 &&
+ (lop->rdl_prot & RD_RDL_X) != 0)
+ phdl->rdexec = &phdl->rdobjs[phdl->nobjs];
memcpy(&phdl->rdobjs[phdl->nobjs++], lop, sizeof(*lop));
return (0);
Modified: user/dchagin/lemul/lib/libproc/proc_sym.c
==============================================================================
--- user/dchagin/lemul/lib/libproc/proc_sym.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libproc/proc_sym.c Sun May 4 20:21:41 2014 (r265337)
@@ -112,17 +112,23 @@ proc_obj2map(struct proc_handle *p, cons
rd_loadobj_t *rdl;
char path[MAXPATHLEN];
+ rdl = NULL;
for (i = 0; i < p->nobjs; i++) {
- rdl = &p->rdobjs[i];
- basename_r(rdl->rdl_path, path);
+ basename_r(p->rdobjs[i].rdl_path, path);
if (strcmp(path, objname) == 0) {
- if ((map = malloc(sizeof(*map))) == NULL)
- return (NULL);
- proc_rdl2prmap(rdl, map);
- return (map);
+ rdl = &p->rdobjs[i];
+ break;
}
}
- return (NULL);
+ if (rdl == NULL && strcmp(objname, "a.out") == 0 && p->rdexec != NULL)
+ rdl = p->rdexec;
+ else
+ return (NULL);
+
+ if ((map = malloc(sizeof(*map))) == NULL)
+ return (NULL);
+ proc_rdl2prmap(rdl, map);
+ return (map);
}
int
@@ -386,8 +392,9 @@ proc_name2map(struct proc_handle *p, con
free(kves);
return (NULL);
}
- if (name == NULL || strcmp(name, "a.out") == 0) {
- map = proc_addr2map(p, p->rdobjs[0].rdl_saddr);
+ if ((name == NULL || strcmp(name, "a.out") == 0) &&
+ p->rdexec != NULL) {
+ map = proc_addr2map(p, p->rdexec->rdl_saddr);
return (map);
}
for (i = 0; i < p->nobjs; i++) {
Modified: user/dchagin/lemul/lib/libproc/proc_util.c
==============================================================================
--- user/dchagin/lemul/lib/libproc/proc_util.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libproc/proc_util.c Sun May 4 20:21:41 2014 (r265337)
@@ -35,10 +35,9 @@
#include <sys/wait.h>
#include <err.h>
#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
#include <signal.h>
#include <string.h>
+#include <unistd.h>
#include "_libproc.h"
int
@@ -59,11 +58,14 @@ proc_clearflags(struct proc_handle *phdl
int
proc_continue(struct proc_handle *phdl)
{
+ int pending = 0;
if (phdl == NULL)
return (-1);
- if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t) 1, 0) != 0)
+ if (phdl->status == PS_STOP && WSTOPSIG(phdl->wstat) != SIGTRAP)
+ pending = WSTOPSIG(phdl->wstat);
+ if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t)1, pending) != 0)
return (-1);
phdl->status = PS_RUN;
@@ -208,12 +210,16 @@ proc_getlwpstatus(struct proc_handle *ph
return (NULL);
siginfo = &lwpinfo.pl_siginfo;
if (lwpinfo.pl_event == PL_EVENT_SIGNAL &&
- (lwpinfo.pl_flags & PL_FLAG_SI) &&
- siginfo->si_signo == SIGTRAP &&
- (siginfo->si_code == TRAP_BRKPT ||
- siginfo->si_code == TRAP_TRACE)) {
- psp->pr_why = PR_FAULTED;
- psp->pr_what = FLTBPT;
+ (lwpinfo.pl_flags & PL_FLAG_SI) != 0) {
+ if (siginfo->si_signo == SIGTRAP &&
+ (siginfo->si_code == TRAP_BRKPT ||
+ siginfo->si_code == TRAP_TRACE)) {
+ psp->pr_why = PR_FAULTED;
+ psp->pr_what = FLTBPT;
+ } else {
+ psp->pr_why = PR_SIGNALLED;
+ psp->pr_what = siginfo->si_signo;
+ }
} else if (lwpinfo.pl_flags & PL_FLAG_SCE) {
psp->pr_why = PR_SYSENTRY;
} else if (lwpinfo.pl_flags & PL_FLAG_SCX) {
Modified: user/dchagin/lemul/lib/libutil/kinfo_getfile.3
==============================================================================
--- user/dchagin/lemul/lib/libutil/kinfo_getfile.3 Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/lib/libutil/kinfo_getfile.3 Sun May 4 20:21:41 2014 (r265337)
@@ -48,7 +48,7 @@ field contains the process identifier.
This should be the a process that you have privilege to access.
The
.Ar cntp
-field is allows the caller to know how many records are returned.
+field allows the caller to know how many records are returned.
.Pp
This function is a wrapper around
.Xr sysctl 3
Modified: user/dchagin/lemul/release/doc/en_US.ISO8859-1/hardware/article.xml
==============================================================================
--- user/dchagin/lemul/release/doc/en_US.ISO8859-1/hardware/article.xml Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/release/doc/en_US.ISO8859-1/hardware/article.xml Sun May 4 20:21:41 2014 (r265337)
@@ -29,6 +29,7 @@
<year>2011</year>
<year>2012</year>
<year>2013</year>
+ <year>2014</year>
<holder role="mailto:doc at FreeBSD.org">The &os; Documentation Project</holder>
</copyright>
@@ -732,6 +733,8 @@
&hwlist.mly;
+ &hwlist.mpr;
+
&hwlist.mps;
&hwlist.mpt;
@@ -1009,6 +1012,8 @@
&hwlist.ral;
+ &hwlist.rsu;
+
&hwlist.rum;
&hwlist.run;
@@ -1021,6 +1026,8 @@
&hwlist.urtw;
+ &hwlist.urtwn;
+
<para>[&arch.amd64;, &arch.i386;, &arch.pc98;] Lucent
Technologies WaveLAN/IEEE 802.11b wireless network adapters
and workalikes using the Lucent Hermes, Intersil PRISM-II,
Modified: user/dchagin/lemul/release/doc/en_US.ISO8859-1/relnotes/article.xml
==============================================================================
--- user/dchagin/lemul/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun May 4 20:21:41 2014 (r265337)
@@ -104,6 +104,23 @@
<sect2 xml:id="kernel">
<title>Kernel Changes</title>
+ <para revision="265132">The &man.full.4; device has been added,
+ and the <literal>lindev(4)</literal> device has been removed.
+ Prior to this change, <literal>lindev(4)</literal> provided only
+ the <filename>/dev/full</filename> character device, returning
+ <literal>ENOSPC</literal> on write attempts. As this device is
+ not specific to &linux;, a native &os; version has been
+ added.</para>
+
+ <para revision="264601">The <literal>if_nf10bmac(4)</literal>
+ device has been added, providing support for NetFPGA-10G
+ Embedded CPU Ethernet Core.</para>
+
+ <note>
+ <para>The <literal>if_nf10bmac(4)</literal> driver operates on
+ the FPGA, and is not suited for the PCI host interface.</para>
+ </note>
+
<para revision="260903">Support for GPS ports has been added to
&man.uhso.4;.</para>
@@ -214,6 +231,17 @@
<sect2 xml:id="userland">
<title>Userland Changes</title>
+ <para revision="265249">The &man.top.1; utility has been updated
+ to filter by &man.jail.8; ID or name, in followup to the
+ &man.ps.1; change in <literal>r265229</literal>.</para>
+
+ <para revision="265229">The &man.ps.1; utility has been
+ updated to include the <literal>-J</literal> flag, used to
+ filter output by matching &man.jail.8; IDs and names.
+ Additionally, argument <literal>0</literal> can be used to
+ <literal>-J</literal> to only list processes running on the
+ host system.</para>
+
<para revision="260926">Support for displaying VPD for PCI devices
via &man.pciconf.8; has been added.</para>
Modified: user/dchagin/lemul/release/doc/share/misc/dev.archlist.txt
==============================================================================
--- user/dchagin/lemul/release/doc/share/misc/dev.archlist.txt Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/release/doc/share/misc/dev.archlist.txt Sun May 4 20:21:41 2014 (r265337)
@@ -108,6 +108,7 @@ qlxgbe amd64
qlxge amd64
rc i386
ral i386,amd64
+rsu i386,amd64
rue i386,pc98,amd64
rum i386,amd64
run i386,amd64
Modified: user/dchagin/lemul/rescue/rescue/Makefile
==============================================================================
--- user/dchagin/lemul/rescue/rescue/Makefile Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/rescue/rescue/Makefile Sun May 4 20:21:41 2014 (r265337)
@@ -52,7 +52,7 @@ CRUNCH_SRCDIRS+= bin
CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \
ed expr getfacl hostname kenv kill ln ls mkdir mv \
pkill ps pwd realpath rm rmdir setfacl sh stty sync test
-CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil
+CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -ll -ltermcap -lutil
CRUNCH_BUILDTOOLS+= bin/sh
# Additional options for specific programs
@@ -120,7 +120,7 @@ CRUNCH_PROGS_sbin+= zpool
CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec
.if ${MK_ZFS} != "no"
-CRUNCH_LIBS+= -lavl -ljail -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
+CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
.endif
CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv -lmd -lsbuf -lufs -lz
Modified: user/dchagin/lemul/sbin/gvinum/gvinum.c
==============================================================================
--- user/dchagin/lemul/sbin/gvinum/gvinum.c Sun May 4 20:00:08 2014 (r265336)
+++ user/dchagin/lemul/sbin/gvinum/gvinum.c Sun May 4 20:21:41 2014 (r265337)
@@ -95,8 +95,10 @@ main(int argc, char **argv)
char buffer[BUFSIZ], *inputline, *token[GV_MAXARGS];
/* Load the module if necessary. */
- if (kldfind(GVINUMMOD) < 0 && kldload(GVINUMMOD) < 0)
- err(1, GVINUMMOD ": Kernel module not available");
+ if (modfind(GVINUMMOD) < 0) {
+ if (kldload(GVINUMKLD) < 0 && modfind(GVINUMMOD) < 0)
+ err(1, GVINUMKLD ": Kernel module not available");
+ }
/* Arguments given on the command line. */
if (argc > 1) {
@@ -1207,9 +1209,10 @@ gvinum_stop(int argc, char **argv)
{
int err, fileid;
- fileid = kldfind(GVINUMMOD);
+ fileid = kldfind(GVINUMKLD);
if (fileid == -1) {
- warn("cannot find " GVINUMMOD);
+ if (modfind(GVINUMMOD) < 0)
+ warn("cannot find " GVINUMKLD);
return;
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-user
mailing list