- find_proc_names();
-
- ret = (int)strtol(str, &cp, 10);
- if (cp == str || *cp) {
- /* Assume this is a command string and find first matching pid */
- for (i=0; i < kp_nentries; i++) {
- if(kp_buffer[i].kp_proc.p_stat == 0)
- continue;
- else {
- if(!strcmp(str, kp_buffer[i].kp_proc.p_comm))
- {
- strncpy(proc_name, kp_buffer[i].kp_proc.p_comm, sizeof(proc_name)-1);
- proc_name[sizeof(proc_name)-1] = '\0';
- return(kp_buffer[i].kp_proc.p_pid);
- }
- }
+ find_proc_names();
+
+ ret = (int)strtol(str, &cp, 10);
+ if (cp == str || *cp) {
+ /* Assume this is a command string and find first matching pid */
+ for (i=0; i < kp_nentries; i++) {
+ if (kp_buffer[i].kp_proc.p_stat == 0)
+ continue;
+ else {
+ if (!strcmp(str, kp_buffer[i].kp_proc.p_comm)) {
+ strncpy(proc_name,
+ kp_buffer[i].kp_proc.p_comm,
+ sizeof(proc_name)-1);
+ proc_name[sizeof(proc_name)-1] = '\0';
+ return (kp_buffer[i].kp_proc.p_pid);
+ }
+ }