Lines Matching refs:cmdline
2696 FILE *cmdline = fopen("/proc/cmdline", "re"); in RunInternal() local
2697 if (cmdline) { in RunInternal()
2698 fgets(cmdline_buf, sizeof(cmdline_buf), cmdline); in RunInternal()
2699 fclose(cmdline); in RunInternal()
3174 char cmdline[255]; in __for_each_pid() local
3180 memset(cmdline, 0, sizeof(cmdline)); in __for_each_pid()
3184 TEMP_FAILURE_RETRY(read(fd, cmdline, sizeof(cmdline) - 2)); in __for_each_pid()
3186 if (cmdline[0]) { in __for_each_pid()
3187 helper(pid, cmdline, arg); in __for_each_pid()
3195 TEMP_FAILURE_RETRY(read(fd, cmdline + 1, sizeof(cmdline) - 4)); in __for_each_pid()
3197 if (cmdline[1]) { in __for_each_pid()
3198 cmdline[0] = '['; in __for_each_pid()
3199 size_t len = strcspn(cmdline, "\f\b\r\n"); in __for_each_pid()
3200 cmdline[len] = ']'; in __for_each_pid()
3201 cmdline[len+1] = '\0'; in __for_each_pid()
3204 if (!cmdline[0]) { in __for_each_pid()
3205 strcpy(cmdline, "N/A"); in __for_each_pid()
3207 helper(pid, cmdline, arg); in __for_each_pid()
3213 static void for_each_pid_helper(int pid, const char *cmdline, void *arg) { in for_each_pid_helper() argument
3215 func(pid, cmdline); in for_each_pid_helper()
3227 static void for_each_tid_helper(int pid, const char *cmdline, void *arg) { in for_each_tid_helper() argument
3240 func(pid, pid, cmdline); in for_each_tid_helper()