Print this page
    
2989 Eliminate use of LOGNAME_MAX in ON
1166 useradd have warning with name more 8 chars
    
      
        | Split | Close | 
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/cmd/prstat/prtable.h
          +++ new/usr/src/cmd/prstat/prtable.h
   1    1  /*
   2    2   * CDDL HEADER START
   3    3   *
   4    4   * The contents of this file are subject to the terms of the
   5    5   * Common Development and Distribution License (the "License").
   6    6   * You may not use this file except in compliance with the License.
   7    7   *
   8    8   * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9   * or http://www.opensolaris.org/os/licensing.
  10   10   * See the License for the specific language governing permissions
  11   11   * and limitations under the License.
  
    | ↓ open down ↓ | 11 lines elided | ↑ open up ↑ | 
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
       22 + * Copyright (c) 2013 Gary Mills
       23 + *
  22   24   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   25   * Use is subject to license terms.
  24   26   *
  25   27   * Portions Copyright 2009 Chad Mynhier
  26   28   */
  27   29  
  28   30  #ifndef _PRTABLE_H
  29   31  #define _PRTABLE_H
  30   32  
  31   33  #ifdef  __cplusplus
  32   34  extern "C" {
  33   35  #endif
  34   36  
  35   37  #include <limits.h>
  36   38  #include <zone.h>
  37   39  #include "prstat.h"
  38   40  
  39   41  #define PLWP_TBL_SZ     4096    /* hash table of plwp_t structures */
  40   42  #define LWP_ACTIVE      1
  41   43  
  42   44  typedef struct {
  43   45          size_t          t_size;
  44   46          size_t          t_nent;
  45   47          long            *t_list;
  46   48  } table_t;
  47   49  
  48   50  typedef struct {
  49   51          size_t          n_size;
  50   52          size_t          n_nent;
  51   53          uid_t           *n_list;
  52   54  } uidtbl_t;
  53   55  
  54   56  typedef struct {
  55   57          zoneid_t        z_id;
  56   58          char            z_name[ZONENAME_MAX];
  57   59  } zonename_t;
  58   60  
  59   61  typedef struct {
  60   62          size_t          z_size;
  61   63          size_t          z_nent;
  62   64          zonename_t      *z_list;
  
    | ↓ open down ↓ | 31 lines elided | ↑ open up ↑ | 
  63   65  } zonetbl_t;
  64   66  
  65   67  typedef struct plwp {           /* linked list of pointers to lwps */
  66   68          pid_t           l_pid;
  67   69          id_t            l_lwpid;
  68   70          int             l_active;
  69   71          lwp_info_t      *l_lwp;
  70   72          struct plwp     *l_next;
  71   73  } plwp_t;
  72   74  
  73      -extern void pwd_getname(uid_t, char *, int, int);
       75 +extern void pwd_getname(uid_t, char *, size_t, int, int, size_t);
  74   76  extern void add_uid(uidtbl_t *, char *);
  75   77  extern int has_uid(uidtbl_t *, uid_t);
  76   78  extern void add_element(table_t *, long);
  77   79  extern int has_element(table_t *, long);
  78   80  extern void add_zone(zonetbl_t *, char *);
  79   81  extern int has_zone(zonetbl_t *, zoneid_t);
  80   82  extern void convert_zone(zonetbl_t *);
  81   83  extern int foreach_element(table_t *, void *, void (*)(long, void *));
  82   84  extern void lwpid_init();
  83   85  extern void lwpid_add(lwp_info_t *, pid_t, id_t);
  84   86  extern lwp_info_t *lwpid_get(pid_t, id_t);
  85   87  extern int lwpid_pidcheck(pid_t);
  86   88  extern void lwpid_del(pid_t, id_t);
  87   89  extern void lwpid_set_active(pid_t, id_t);
  88   90  extern int lwpid_is_active(pid_t, id_t);
  89   91  
  90   92  #ifdef  __cplusplus
  91   93  }
  92   94  #endif
  93   95  
  94   96  #endif  /* _PRTABLE_H */
  
    | ↓ open down ↓ | 11 lines elided | ↑ open up ↑ | 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX