Loading toolbox/ps.c +13 −10 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ static char *nexttok(char **strp) #define SHOW_POLICY 4 #define SHOW_CPU 8 #define SHOW_MACLABEL 16 #define SHOW_NUMERIC_UID 32 static int display_flags = 0; Loading Loading @@ -138,7 +139,7 @@ static int ps_line(int pid, int tid, char *namefilter) } pw = getpwuid(stats.st_uid); if(pw == 0) { if(pw == 0 || (display_flags & SHOW_NUMERIC_UID)) { sprintf(user,"%d",(int)stats.st_uid); } else { strcpy(user,pw->pw_name); Loading Loading @@ -214,6 +215,8 @@ int ps_main(int argc, char **argv) while(argc > 1){ if(!strcmp(argv[1],"-t")) { threads = 1; } else if(!strcmp(argv[1],"-n")) { display_flags |= SHOW_NUMERIC_UID; } else if(!strcmp(argv[1],"-x")) { display_flags |= SHOW_TIME; } else if(!strcmp(argv[1], "-Z")) { Loading Loading
toolbox/ps.c +13 −10 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ static char *nexttok(char **strp) #define SHOW_POLICY 4 #define SHOW_CPU 8 #define SHOW_MACLABEL 16 #define SHOW_NUMERIC_UID 32 static int display_flags = 0; Loading Loading @@ -138,7 +139,7 @@ static int ps_line(int pid, int tid, char *namefilter) } pw = getpwuid(stats.st_uid); if(pw == 0) { if(pw == 0 || (display_flags & SHOW_NUMERIC_UID)) { sprintf(user,"%d",(int)stats.st_uid); } else { strcpy(user,pw->pw_name); Loading Loading @@ -214,6 +215,8 @@ int ps_main(int argc, char **argv) while(argc > 1){ if(!strcmp(argv[1],"-t")) { threads = 1; } else if(!strcmp(argv[1],"-n")) { display_flags |= SHOW_NUMERIC_UID; } else if(!strcmp(argv[1],"-x")) { display_flags |= SHOW_TIME; } else if(!strcmp(argv[1], "-Z")) { Loading