summaryrefslogtreecommitdiffstats
path: root/sys/sys/user.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-08-16 08:41:15 +0000
committerpeter <peter@FreeBSD.org>2001-08-16 08:41:15 +0000
commitfbb375df47d4a20861f5b7a7836d97f2ddb68722 (patch)
treeecabdb6b8812a693beda939b5c8687082bfb01ae /sys/sys/user.h
parent5ec991a49c2aac0dad59ed8ac6f888697c32a891 (diff)
downloadFreeBSD-src-fbb375df47d4a20861f5b7a7836d97f2ddb68722.zip
FreeBSD-src-fbb375df47d4a20861f5b7a7836d97f2ddb68722.tar.gz
Use the backwards compatability mechanisms so that ps/top etc dont have
unnecessary breakage. While here, use explicit sizes for the string fields so that we dont have unintentional changes again in the future when key tunables change. This still is not quite right, but a june userland is happy with a -current kernel with these tweaks.
Diffstat (limited to 'sys/sys/user.h')
-rw-r--r--sys/sys/user.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/sys/user.h b/sys/sys/user.h
index 3dbadf8..789b325 100644
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -93,6 +93,10 @@
#endif
#define WMESGLEN 8 /* size of returned wchan message */
#define MTXNAMELEN 8 /* size of returned mutex name */
+#define OCOMMLEN 16 /* size of returned ki_ocomm name */
+#define COMMLEN 19 /* size of returned ki_comm name */
+#define KI_NGROUPS 16 /* number of groups in ki_groups */
+#define LOGNAMELEN 17 /* size of returned ki_login */
struct kinfo_proc {
int ki_structsize; /* size of this structure */
@@ -123,7 +127,7 @@ struct kinfo_proc {
gid_t ki_rgid; /* Real group id */
gid_t ki_svgid; /* Saved effective group id */
short ki_ngroups; /* number of groups */
- gid_t ki_groups[NGROUPS]; /* groups */
+ gid_t ki_groups[KI_NGROUPS]; /* groups */
vm_size_t ki_size; /* virtual size */
segsz_t ki_rssize; /* current resident set size in pages */
segsz_t ki_swrss; /* resident set size before last swap */
@@ -148,11 +152,12 @@ struct kinfo_proc {
char ki_rqindex; /* Run queue index */
u_char ki_oncpu; /* Which cpu we are on */
u_char ki_lastcpu; /* Last cpu we were on */
- char ki_comm[MAXCOMLEN+1]; /* command name */
+ char ki_ocomm[OCOMMLEN+1]; /* command name */
char ki_wmesg[WMESGLEN+1]; /* wchan message */
- char ki_login[MAXLOGNAME+1]; /* setlogin name */
+ char ki_login[LOGNAMELEN+1]; /* setlogin name */
char ki_mtxname[MTXNAMELEN+1]; /* mutex name */
- char ki_sparestrings[99]; /* spare string space */
+ char ki_comm[COMMLEN+1]; /* command name */
+ char ki_sparestrings[85]; /* spare string space */
struct rusage ki_rusage; /* process rusage statistics */
long ki_sflag; /* PS_* flags */
struct priority ki_pri; /* process priority */
OpenPOWER on IntegriCloud