diff options
author | Matt Kraai <kraai@debian.org> | 2000-12-18 03:57:16 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-12-18 03:57:16 +0000 |
commit | 1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5 (patch) | |
tree | b85a425c19b299f5d8635599e11c78c96f12a4c2 /procps | |
parent | 0dab82997777bffb95d01d68e1628ee79207a03d (diff) | |
download | busybox-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.tar.gz |
Change calls to error_msg.* and strerror to use perror_msg.*.
Diffstat (limited to 'procps')
-rw-r--r-- | procps/kill.c | 6 | ||||
-rw-r--r-- | procps/ps.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/procps/kill.c b/procps/kill.c index caaa52a5b..8fa9da77d 100644 --- a/procps/kill.c +++ b/procps/kill.c @@ -204,10 +204,10 @@ extern int kill_main(int argc, char **argv) int pid; if (!isdigit(**argv)) - error_msg_and_die( "Bad PID: %s\n", strerror(errno)); + perror_msg_and_die( "Bad PID"); pid = strtol(*argv, NULL, 0); if (kill(pid, sig) != 0) - error_msg_and_die( "Could not kill pid '%d': %s\n", pid, strerror(errno)); + perror_msg_and_die( "Could not kill pid '%d'", pid); argv++; } } @@ -229,7 +229,7 @@ extern int kill_main(int argc, char **argv) if (*pidList==myPid) continue; if (kill(*pidList, sig) != 0) - error_msg_and_die( "Could not kill pid '%d': %s\n", *pidList, strerror(errno)); + perror_msg_and_die( "Could not kill pid '%d'", *pidList); } /* Note that we don't bother to free the memory * allocated in find_pid_by_name(). It will be freed diff --git a/procps/ps.c b/procps/ps.c index 357ece383..2b41a495f 100644 --- a/procps/ps.c +++ b/procps/ps.c @@ -216,11 +216,11 @@ extern int ps_main(int argc, char **argv) /* open device */ fd = open(device, O_RDONLY); if (fd < 0) - error_msg_and_die( "open failed for `%s': %s\n", device, strerror (errno)); + perror_msg_and_die( "open failed for `%s'", device); /* Find out how many processes there are */ if (ioctl (fd, DEVPS_GET_NUM_PIDS, &num_pids)<0) - error_msg_and_die( "\nDEVPS_GET_PID_LIST: %s\n", strerror (errno)); + perror_msg_and_die( "\nDEVPS_GET_PID_LIST"); /* Allocate some memory -- grab a few extras just in case * some new processes start up while we wait. The kernel will @@ -231,7 +231,7 @@ extern int ps_main(int argc, char **argv) /* Now grab the pid list */ if (ioctl (fd, DEVPS_GET_PID_LIST, pid_array)<0) - error_msg_and_die("\nDEVPS_GET_PID_LIST: %s\n", strerror (errno)); + perror_msg_and_die("\nDEVPS_GET_PID_LIST"); #ifdef BB_FEATURE_AUTOWIDTH ioctl(fileno(stdout), TIOCGWINSZ, &win); @@ -247,7 +247,7 @@ extern int ps_main(int argc, char **argv) info.pid = pid_array[i]; if (ioctl (fd, DEVPS_GET_PID_INFO, &info)<0) - error_msg_and_die("\nDEVPS_GET_PID_INFO: %s\n", strerror (errno)); + perror_msg_and_die("\nDEVPS_GET_PID_INFO"); /* Make some adjustments as needed */ my_getpwuid(uidName, info.euid); @@ -277,7 +277,7 @@ extern int ps_main(int argc, char **argv) /* close device */ if (close (fd) != 0) - error_msg_and_die("close failed for `%s': %s\n", device, strerror (errno)); + perror_msg_and_die("close failed for `%s'", device); exit (0); } |