[BusyBox-cvs] busybox/procps free.c,1.19,1.20 kill.c,1.47,1.48 pidof.c,1.7,1.8 renice.c,1.7,1.8 top.c,1.5,1.6
Manuel Novoa III
mjn3 at busybox.net
Wed Mar 19 09:13:30 UTC 2003
- Previous message: [BusyBox-cvs] busybox/findutils find.c,1.37,1.38 grep.c,1.76,1.77 xargs.c,1.24,1.25
- Next message: [BusyBox-cvs] busybox/include dump.h,1.1,1.2 libbb.h,1.95,1.96 usage.h,1.145,1.146
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/busybox/procps
In directory winder:/home/mjn3/work/busybox/procps
Modified Files:
free.c kill.c pidof.c renice.c top.c
Log Message:
Major coreutils update.
Index: free.c
===================================================================
RCS file: /var/cvs/busybox/procps/free.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- free.c 11 Jan 2003 20:40:20 -0000 1.19
+++ free.c 19 Mar 2003 09:12:49 -0000 1.20
@@ -63,7 +63,7 @@
}
if (argc > 1 && **(argv + 1) == '-')
- show_usage();
+ bb_show_usage();
printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free",
"shared", "buffers");
Index: kill.c
===================================================================
RCS file: /var/cvs/busybox/procps/kill.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- kill.c 9 Feb 2003 22:40:34 -0000 1.47
+++ kill.c 19 Mar 2003 09:12:49 -0000 1.48
@@ -44,7 +44,7 @@
#ifdef CONFIG_KILLALL
/* Figure out what we are trying to do here */
- whichApp = (strcmp(applet_name, "killall") == 0)? KILLALL : KILL;
+ whichApp = (strcmp(bb_applet_name, "killall") == 0)? KILLALL : KILL;
#else
whichApp = KILL;
#endif
@@ -54,7 +54,7 @@
argv++;
/* Parse any options */
if (argc < 1)
- show_usage();
+ bb_show_usage();
while (argc > 0 && **argv == '-') {
while (*++(*argv)) {
@@ -87,11 +87,11 @@
}
return EXIT_SUCCESS;
case '-':
- show_usage();
+ bb_show_usage();
default:
name = u_signal_names(*argv, &sig, 0);
if(name==NULL)
- error_msg_and_die( "bad signal name: %s", *argv);
+ bb_error_msg_and_die( "bad signal name: %s", *argv);
argc--;
argv++;
goto do_it_now;
@@ -109,10 +109,10 @@
int pid;
if (!isdigit(**argv))
- perror_msg_and_die( "Bad PID");
+ bb_perror_msg_and_die( "Bad PID");
pid = strtol(*argv, NULL, 0);
if (kill(pid, sig) != 0) {
- perror_msg( "Could not kill pid '%d'", pid);
+ bb_perror_msg( "Could not kill pid '%d'", pid);
errors++;
}
argv++;
@@ -130,7 +130,7 @@
if (*pidList <= 0) {
errors++;
if (quiet==0)
- error_msg( "%s: no process killed", *argv);
+ bb_error_msg( "%s: no process killed", *argv);
} else {
long *pl;
@@ -140,7 +140,7 @@
if (kill(*pl, sig) != 0) {
errors++;
if (quiet==0)
- perror_msg( "Could not kill pid '%ld'", *pl);
+ bb_perror_msg( "Could not kill pid '%ld'", *pl);
}
}
}
Index: pidof.c
===================================================================
RCS file: /var/cvs/busybox/procps/pidof.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pidof.c 25 Nov 2002 22:12:28 -0000 1.7
+++ pidof.c 19 Mar 2003 09:12:49 -0000 1.8
@@ -46,7 +46,7 @@
single_flag = 1;
break;
default:
- show_usage();
+ bb_show_usage();
}
}
Index: renice.c
===================================================================
RCS file: /var/cvs/busybox/procps/renice.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- renice.c 20 Feb 2001 06:14:08 -0000 1.7
+++ renice.c 19 Mar 2003 09:12:49 -0000 1.8
@@ -32,7 +32,7 @@
{
int prio, status = EXIT_SUCCESS;
- if (argc < 3) show_usage();
+ if (argc < 3) bb_show_usage();
prio = atoi(*++argv);
if (prio > 20) prio = 20;
@@ -45,7 +45,7 @@
if (setpriority(PRIO_PROCESS, ps, prio) == 0) {
printf("%d: old priority %d, new priority %d\n", ps, oldp, prio );
} else {
- perror_msg("%d: setpriority", ps);
+ bb_perror_msg("%d: setpriority", ps);
status = EXIT_FAILURE;
}
}
Index: top.c
===================================================================
RCS file: /var/cvs/busybox/procps/top.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- top.c 22 Oct 2002 12:21:12 -0000 1.5
+++ top.c 19 Mar 2003 09:12:49 -0000 1.6
@@ -155,11 +155,11 @@
#define FILE_TO_BUF(filename, fd) do{ \
if (fd == -1 && (fd = open(filename, O_RDONLY)) == -1) { \
- perror_msg_and_die("/proc not be mounted?"); \
+ bb_perror_msg_and_die("/proc not be mounted?"); \
} \
lseek(fd, 0L, SEEK_SET); \
if ((local_n = read(fd, buf, sizeof buf - 1)) < 0) { \
- perror_msg_and_die("%s", filename); \
+ bb_perror_msg_and_die("%s", filename); \
} \
buf[local_n] = '\0'; \
}while(0)
@@ -167,7 +167,7 @@
#define FILE_TO_BUF2(filename, fd) do{ \
lseek(fd, 0L, SEEK_SET); \
if ((local_n = read(fd, buf, sizeof buf - 1)) < 0) { \
- perror_msg_and_die("%s", filename); \
+ bb_perror_msg_and_die("%s", filename); \
} \
buf[local_n] = '\0'; \
}while(0)
@@ -313,19 +313,19 @@
unsigned long total, used, mfree, shared, buffers, cached;
/* read memory info */
- fp = xfopen("meminfo", "r");
+ fp = bb_xfopen("meminfo", "r");
fgets(buf, sizeof(buf), fp); /* skip first line */
if (fscanf(fp, "Mem: %lu %lu %lu %lu %lu %lu",
&total, &used, &mfree, &shared, &buffers, &cached) != 6) {
- error_msg_and_die("failed to read '%s'", "meminfo");
+ bb_error_msg_and_die("failed to read '%s'", "meminfo");
}
fclose(fp);
/* read load average */
- fp = xfopen("loadavg", "r");
+ fp = bb_xfopen("loadavg", "r");
if (fscanf(fp, "%f %f %f", &avg1, &avg2, &avg3) != 3) {
- error_msg_and_die("failed to read '%s'", "loadavg");
+ bb_error_msg_and_die("failed to read '%s'", "loadavg");
}
fclose(fp);
@@ -447,7 +447,7 @@
interval = atoi(optarg);
break;
default:
- show_usage();
+ bb_show_usage();
}
}
@@ -461,7 +461,7 @@
#endif
/* change to /proc */
if (chdir("/proc") < 0) {
- perror_msg_and_die("chdir('/proc')");
+ bb_perror_msg_and_die("chdir('/proc')");
}
#if defined CONFIG_FEATURE_USE_TERMIOS
tcgetattr(0, (void *) &initial_settings);
@@ -508,7 +508,7 @@
memcpy(top + n, p, sizeof(procps_status_t));
}
if (ntop == 0) {
- perror_msg_and_die("scandir('/proc')");
+ bb_perror_msg_and_die("scandir('/proc')");
}
#ifdef FEATURE_CPU_USAGE_PERCENTAGE
if(!Hertz) {
- Previous message: [BusyBox-cvs] busybox/findutils find.c,1.37,1.38 grep.c,1.76,1.77 xargs.c,1.24,1.25
- Next message: [BusyBox-cvs] busybox/include dump.h,1.1,1.2 libbb.h,1.95,1.96 usage.h,1.145,1.146
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the busybox-cvs
mailing list