Print this page
OS-3280 need a way to specify the root of a native system in the lx brand
OS-3279 lx brand should allow delegated datasets
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

*** 19,32 **** * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - #pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <stdio_ext.h> #include <stdlib.h> #include <unistd.h> #include <ctype.h> --- 19,31 ---- * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright (c) 2014, Joyent, Inc. All rights reserved. */ #include <stdio.h> #include <stdio_ext.h> #include <stdlib.h> #include <unistd.h> #include <ctype.h>
*** 35,44 **** --- 34,44 ---- #include <signal.h> #include <stddef.h> #include <sys/types.h> #include <sys/stat.h> #include <libproc.h> + #include "ptools_common.h" /* evil knowledge of libc internals */ #include "../../../lib/libc/inc/thr_uberdata.h" #define MAX_SYMNAMLEN 1024 /* Recommended max symbol name length */
*** 170,180 **** } static int look(char *arg) { ! char pathname[100]; struct stat statb; int fd = -1; int sig, gcode; sigset_t holdmask; int maxsig; --- 170,180 ---- } static int look(char *arg) { ! char pathname[PATH_MAX]; struct stat statb; int fd = -1; int sig, gcode; sigset_t holdmask; int maxsig;
*** 197,207 **** goto look_error; } (void) memcpy(&psinfo, psinfop, sizeof (psinfo_t)); proc_unctrl_psinfo(&psinfo); ! (void) sprintf(pathname, "/proc/%d/sigact", (int)psinfo.pr_pid); if ((fd = open(pathname, O_RDONLY)) < 0) { perr("open sigact"); goto look_error; } --- 197,208 ---- goto look_error; } (void) memcpy(&psinfo, psinfop, sizeof (psinfo_t)); proc_unctrl_psinfo(&psinfo); ! (void) proc_snprintf(pathname, sizeof (pathname), "/proc/%d/sigact", ! (int)psinfo.pr_pid); if ((fd = open(pathname, O_RDONLY)) < 0) { perr("open sigact"); goto look_error; }