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>
        
*** 20,40 ****
   * CDDL HEADER END
   */
  /*
   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
   * Use is subject to license terms.
   */
  
- #pragma ident   "%Z%%M% %I%     %E% SMI"
- 
  #include <stdio.h>
  #include <unistd.h>
  #include <string.h>
  #include <errno.h>
  #include <libproc.h>
  #include <sys/param.h>
  
  static char *command;
  
  static int
  show_cwd(const char *arg)
  {
--- 20,41 ----
   * CDDL HEADER END
   */
  /*
   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
   * Use is subject to license terms.
+  * Copyright (c) 2014, Joyent, Inc.  All rights reserved.
   */
  
  #include <stdio.h>
  #include <unistd.h>
  #include <string.h>
  #include <errno.h>
  #include <libproc.h>
  #include <sys/param.h>
  
+ #include "ptools_common.h"
+ 
  static char *command;
  
  static int
  show_cwd(const char *arg)
  {
*** 47,57 ****
                  (void) fprintf(stderr, "%s: cannot examine %s: %s\n",
                      command, arg, Pgrab_error(gcode));
                  return (1);
          }
  
!         (void) snprintf(proc, sizeof (proc), "/proc/%d/path/cwd",
              (int)p.pr_pid);
  
          if ((ret = readlink(proc, cwd, sizeof (cwd) - 1)) <= 0) {
                  (void) fprintf(stderr, "%s: cannot resolve cwd for %s: %s\n",
                      command, arg, strerror(errno));
--- 48,58 ----
                  (void) fprintf(stderr, "%s: cannot examine %s: %s\n",
                      command, arg, Pgrab_error(gcode));
                  return (1);
          }
  
!         (void) proc_snprintf(proc, sizeof (proc), "/proc/%d/path/cwd",
              (int)p.pr_pid);
  
          if ((ret = readlink(proc, cwd, sizeof (cwd) - 1)) <= 0) {
                  (void) fprintf(stderr, "%s: cannot resolve cwd for %s: %s\n",
                      command, arg, strerror(errno));