Remove trailing whitespace. Update copyright to include 2004.

This commit is contained in:
Eric Andersen
2004-03-15 08:29:22 +00:00
parent 8854004b41
commit c7bda1ce65
374 changed files with 2048 additions and 2051 deletions

View File

@@ -1,6 +1,6 @@
# Makefile for busybox
#
# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@@ -1,6 +1,6 @@
# Makefile for busybox
#
# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
/*
* Mini free implementation for busybox
*
* Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -64,11 +64,11 @@ extern int free_main(int argc, char **argv)
if (argc > 1 && **(argv + 1) == '-')
bb_show_usage();
printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free",
printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free",
"shared", "buffers");
printf("%6s%13ld%13ld%13ld%13ld%13ld\n", "Mem:", info.totalram,
info.totalram-info.freeram, info.freeram,
printf("%6s%13ld%13ld%13ld%13ld%13ld\n", "Mem:", info.totalram,
info.totalram-info.freeram, info.freeram,
info.sharedram, info.bufferram);
#ifndef __uClinux__

View File

@@ -3,7 +3,7 @@
* Mini kill/killall implementation for busybox
*
* Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>.
* Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
/*
* pidof implementation for busybox
*
* Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
/*
* Mini ps implementation(s) for busybox
*
* Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free

View File

@@ -31,17 +31,17 @@
extern int renice_main(int argc, char **argv)
{
int prio, status = EXIT_SUCCESS;
if (argc < 3) bb_show_usage();
prio = atoi(*++argv);
if (prio > 20) prio = 20;
if (prio < -20) prio = -20;
while (*++argv) {
int ps = atoi(*argv);
int oldp = getpriority(PRIO_PROCESS, ps);
if (setpriority(PRIO_PROCESS, ps, prio) == 0) {
printf("%d: old priority %d, new priority %d\n", ps, oldp, prio );
} else {

View File

@@ -17,7 +17,7 @@
* - added -p <preload> to preload values from a file
* v1.01.1
* - busybox applet aware by <solar@gentoo.org>
*
*
*/
#include <stdio.h>
@@ -70,7 +70,7 @@ static void dwrite_str(int fd, const char *buf)
}
/*
* sysctl_main()...
* sysctl_main()...
*/
int sysctl_main(int argc, char **argv)
{
@@ -126,7 +126,7 @@ int sysctl_main(int argc, char **argv)
/*
* sysctl_preload_file
* sysctl_preload_file
* preload the sysctl's from a conf file
* - we parse the file and then reform it (strip out whitespace)
*/
@@ -250,7 +250,7 @@ int sysctl_write_setting(const char *setting, int output)
/*
* Read a sysctl setting
* Read a sysctl setting
*
*/
int sysctl_read_setting(const char *setting, int output)
@@ -304,7 +304,7 @@ int sysctl_read_setting(const char *setting, int output)
/*
* Display all the sysctl settings
* Display all the sysctl settings
*
*/
int sysctl_display_all(const char *path, int output, int show_table)

View File

@@ -7,11 +7,11 @@
* This reads the PIDs of all processes and their status and shows
* the status of processes (first ones that fit to screen) at given
* intervals.
*
*
* NOTES:
* - At startup this changes to /proc, all the reads are then
* relative to that.
*
*
* (C) Eero Tamminen <oak at welho dot com>
*
* Rewroted by Vladimir Oleynik (C) 2002 <dzo@simtreas.ru>
@@ -332,7 +332,7 @@ static unsigned long display_generic(void)
fscanf(fp, "Mem: %lu %lu %lu %lu %lu %lu",
&total, &used, &mfree, &shared, &buffers, &cached);
} else {
/*
/*
* Revert to manual parsing, which incidentally already has the
* sizes in kilobytes. This should be safe for both 2.4 and
* 2.6.
@@ -341,7 +341,7 @@ static unsigned long display_generic(void)
fscanf(fp, "MemFree: %lu %s\n", &mfree, buf);
/*
/*
* MemShared: is no longer present in 2.6. Report this as 0,
* to maintain consistent behavior with normal procps.
*/
@@ -354,7 +354,7 @@ static unsigned long display_generic(void)
used = total - mfree;
}
fclose(fp);
/* read load average */
fp = bb_xfopen("loadavg", "r");
if (fscanf(fp, "%f %f %f", &avg1, &avg2, &avg3) != 3) {
@@ -371,7 +371,7 @@ static unsigned long display_generic(void)
cached /= 1024;
total /= 1024;
}
/* output memory info and load average */
/* clear screen & go to top */
printf("\e[H\e[J" "Mem: "
@@ -390,7 +390,7 @@ static void display_status(int count, int col)
procps_status_t *s = top;
char rss_str_buf[8];
unsigned long total_memory = display_generic();
#ifdef FEATURE_CPU_USAGE_PERCENTAGE
/* what info of the processes is shown */
printf("\n\e[7m PID USER STATUS RSS PPID %%CPU %%MEM COMMAND\e[0m\n");
@@ -404,7 +404,7 @@ static void display_status(int count, int col)
pmem = 1000.0 * s->rss / total_memory;
if (pmem > 999) pmem = 999;
if(s->rss > 10*1024)
sprintf(rss_str_buf, "%6ldM", s->rss/1024);
else
@@ -450,7 +450,7 @@ static void reset_term(void)
#endif
#endif /* CONFIG_FEATURE_CLEAN_UP */
}
static void sig_catcher (int sig)
{
reset_term();
@@ -609,6 +609,6 @@ int top_main(int argc, char **argv)
#endif /* CONFIG_FEATURE_USE_TERMIOS */
clearmems();
}
return EXIT_SUCCESS;
}

View File

@@ -2,7 +2,7 @@
/*
* Mini uptime implementation for busybox
*
* Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,8 +53,8 @@ extern int uptime_main(int argc, char **argv)
sysinfo(&info);
printf(" %2d:%02d%s up ",
current_time->tm_hour%12 ? current_time->tm_hour%12 : 12,
printf(" %2d:%02d%s up ",
current_time->tm_hour%12 ? current_time->tm_hour%12 : 12,
current_time->tm_min, current_time->tm_hour > 11 ? "pm" : "am");
updays = (int) info.uptime / (60*60*24);
if (updays)
@@ -67,9 +67,9 @@ extern int uptime_main(int argc, char **argv)
else
printf("%d min, ", upminutes);
printf("load average: %ld.%02ld, %ld.%02ld, %ld.%02ld\n",
LOAD_INT(info.loads[0]), LOAD_FRAC(info.loads[0]),
LOAD_INT(info.loads[1]), LOAD_FRAC(info.loads[1]),
printf("load average: %ld.%02ld, %ld.%02ld, %ld.%02ld\n",
LOAD_INT(info.loads[0]), LOAD_FRAC(info.loads[0]),
LOAD_INT(info.loads[1]), LOAD_FRAC(info.loads[1]),
LOAD_INT(info.loads[2]), LOAD_FRAC(info.loads[2]));
return EXIT_SUCCESS;