aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 6a699a7e6..a95de848b 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -836,7 +836,7 @@ enum { COMM_LEN = 16 };
836typedef struct { 836typedef struct {
837 DIR *dir; 837 DIR *dir;
838/* Fields are set to 0/NULL if failed to determine (or not requested) */ 838/* Fields are set to 0/NULL if failed to determine (or not requested) */
839 char *cmd; 839 /*char *cmd;*/
840 char *argv0; 840 char *argv0;
841 /*char *exe;*/ 841 /*char *exe;*/
842 USE_SELINUX(char *context;) 842 USE_SELINUX(char *context;)
@@ -852,7 +852,9 @@ typedef struct {
852 unsigned gid; 852 unsigned gid;
853 unsigned tty_major,tty_minor; 853 unsigned tty_major,tty_minor;
854 char state[4]; 854 char state[4];
855 /* basename of executable in exec(2), read from /proc/N/stat */ 855 /* basename of executable in exec(2), read from /proc/N/stat
856 * (if executable is symlink or script, it is NOT replaced
857 * by link target or interpreter name) */
856 char comm[COMM_LEN]; 858 char comm[COMM_LEN];
857 /* user/group? - use passwd/group parsing functions */ 859 /* user/group? - use passwd/group parsing functions */
858} procps_status_t; 860} procps_status_t;
@@ -863,9 +865,9 @@ enum {
863 PSSCAN_SID = 1 << 3, 865 PSSCAN_SID = 1 << 3,
864 PSSCAN_UIDGID = 1 << 4, 866 PSSCAN_UIDGID = 1 << 4,
865 PSSCAN_COMM = 1 << 5, 867 PSSCAN_COMM = 1 << 5,
866 PSSCAN_CMD = 1 << 6, 868 /* PSSCAN_CMD = 1 << 6, - use read_cmdline instead */
867 PSSCAN_ARGV0 = 1 << 7, 869 PSSCAN_ARGV0 = 1 << 7,
868 PSSCAN_EXE = 1 << 8, /* not implemented yet */ 870 /* PSSCAN_EXE = 1 << 8, - not implemented */
869 PSSCAN_STATE = 1 << 9, 871 PSSCAN_STATE = 1 << 9,
870 PSSCAN_VSZ = 1 << 10, 872 PSSCAN_VSZ = 1 << 10,
871 PSSCAN_RSS = 1 << 11, 873 PSSCAN_RSS = 1 << 11,
@@ -883,6 +885,9 @@ enum {
883procps_status_t* alloc_procps_scan(int flags); 885procps_status_t* alloc_procps_scan(int flags);
884void free_procps_scan(procps_status_t* sp); 886void free_procps_scan(procps_status_t* sp);
885procps_status_t* procps_scan(procps_status_t* sp, int flags); 887procps_status_t* procps_scan(procps_status_t* sp, int flags);
888/* Format cmdline (up to col chars) into char buf[col+1] */
889/* Puts [comm] if cmdline is empty (-> process is a kernel thread) */
890void read_cmdline(char *buf, int col, unsigned pid, const char *comm);
886pid_t *find_pid_by_name(const char* procName); 891pid_t *find_pid_by_name(const char* procName);
887pid_t *pidlist_reverse(pid_t *pidList); 892pid_t *pidlist_reverse(pid_t *pidList);
888 893