diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-03-15 08:29:22 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-03-15 08:29:22 +0000 |
commit | c7bda1ce659294d6e22c06e087f6f265983c7578 (patch) | |
tree | 4c6d2217f4d8306c59cf1096f8664e1cfd167213 /util-linux | |
parent | 8854004b41065b3d081af7f3df13a100b0c8bfbe (diff) | |
download | busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.gz busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.bz2 busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.zip |
Remove trailing whitespace. Update copyright to include 2004.
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/Config.in | 10 | ||||
-rw-r--r-- | util-linux/Makefile | 2 | ||||
-rw-r--r-- | util-linux/Makefile.in | 2 | ||||
-rw-r--r-- | util-linux/dmesg.c | 4 | ||||
-rw-r--r-- | util-linux/fbset.c | 18 | ||||
-rw-r--r-- | util-linux/fdisk.c | 4 | ||||
-rw-r--r-- | util-linux/freeramdisk.c | 2 | ||||
-rw-r--r-- | util-linux/fsck_minix.c | 10 | ||||
-rw-r--r-- | util-linux/hwclock.c | 38 | ||||
-rw-r--r-- | util-linux/mkfs_minix.c | 8 | ||||
-rw-r--r-- | util-linux/more.c | 8 | ||||
-rw-r--r-- | util-linux/mount.c | 12 | ||||
-rw-r--r-- | util-linux/nfsmount.c | 12 | ||||
-rw-r--r-- | util-linux/pivot_root.c | 2 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 3 | ||||
-rw-r--r-- | util-linux/umount.c | 6 |
16 files changed, 70 insertions, 71 deletions
diff --git a/util-linux/Config.in b/util-linux/Config.in index 2bb9c09cc..c97e5c436 100644 --- a/util-linux/Config.in +++ b/util-linux/Config.in | |||
@@ -71,7 +71,7 @@ config CONFIG_FDISK | |||
71 | help | 71 | help |
72 | The fdisk utility is used to divide hard disks into one or more | 72 | The fdisk utility is used to divide hard disks into one or more |
73 | logical disks, which are generally called partitions. This utility | 73 | logical disks, which are generally called partitions. This utility |
74 | can be used to list and edit the set of partitions or BSD style | 74 | can be used to list and edit the set of partitions or BSD style |
75 | 'disk slices' that are defined on a hard drive. | 75 | 'disk slices' that are defined on a hard drive. |
76 | 76 | ||
77 | if !CONFIG_LFS | 77 | if !CONFIG_LFS |
@@ -84,7 +84,7 @@ config FDISK_SUPPORT_LARGE_DISKS | |||
84 | endif | 84 | endif |
85 | 85 | ||
86 | config CONFIG_FEATURE_FDISK_WRITABLE | 86 | config CONFIG_FEATURE_FDISK_WRITABLE |
87 | bool " Write support" | 87 | bool " Write support" |
88 | default y | 88 | default y |
89 | depends on CONFIG_FDISK | 89 | depends on CONFIG_FDISK |
90 | help | 90 | help |
@@ -95,7 +95,7 @@ config CONFIG_FEATURE_FDISK_WRITABLE | |||
95 | config CONFIG_FEATURE_AIX_LABEL | 95 | config CONFIG_FEATURE_AIX_LABEL |
96 | bool " Support AIX disklabels" | 96 | bool " Support AIX disklabels" |
97 | default n | 97 | default n |
98 | depends on CONFIG_FDISK && CONFIG_FEATURE_FDISK_WRITABLE | 98 | depends on CONFIG_FDISK && CONFIG_FEATURE_FDISK_WRITABLE |
99 | help | 99 | help |
100 | Enabling this option allows you to create or change AIX disklabels. | 100 | Enabling this option allows you to create or change AIX disklabels. |
101 | Most people can safely leave this option disabled. | 101 | Most people can safely leave this option disabled. |
@@ -111,7 +111,7 @@ config CONFIG_FEATURE_SGI_LABEL | |||
111 | config CONFIG_FEATURE_SUN_LABEL | 111 | config CONFIG_FEATURE_SUN_LABEL |
112 | bool " Support SUN disklabels" | 112 | bool " Support SUN disklabels" |
113 | default n | 113 | default n |
114 | depends on CONFIG_FDISK && CONFIG_FEATURE_FDISK_WRITABLE | 114 | depends on CONFIG_FDISK && CONFIG_FEATURE_FDISK_WRITABLE |
115 | help | 115 | help |
116 | Enabling this option allows you to create or change SUN disklabels. | 116 | Enabling this option allows you to create or change SUN disklabels. |
117 | Most people can safely leave this option disabled. | 117 | Most people can safely leave this option disabled. |
@@ -267,7 +267,7 @@ config CONFIG_RDATE | |||
267 | bool "rdate" | 267 | bool "rdate" |
268 | default n | 268 | default n |
269 | help | 269 | help |
270 | The rdate utility allows you to synchronize the date and time of your | 270 | The rdate utility allows you to synchronize the date and time of your |
271 | system clock with the date and time of a remote networked system using | 271 | system clock with the date and time of a remote networked system using |
272 | the RFC868 protocol, which is built into the inetd daemon on most | 272 | the RFC868 protocol, which is built into the inetd daemon on most |
273 | systems. | 273 | systems. |
diff --git a/util-linux/Makefile b/util-linux/Makefile index d2e496231..f2e2021f0 100644 --- a/util-linux/Makefile +++ b/util-linux/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
diff --git a/util-linux/Makefile.in b/util-linux/Makefile.in index 8cd5f1bd0..f56d57464 100644 --- a/util-linux/Makefile.in +++ b/util-linux/Makefile.in | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index b7d17840f..2ca882714 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c | |||
@@ -10,8 +10,8 @@ | |||
10 | * 1999-02-22 Arkadiusz Mi�kiewicz <misiek@misiek.eu.org> | 10 | * 1999-02-22 Arkadiusz Mi�kiewicz <misiek@misiek.eu.org> |
11 | * - added Native Language Support | 11 | * - added Native Language Support |
12 | * | 12 | * |
13 | * from util-linux -- adapted for busybox by | 13 | * from util-linux -- adapted for busybox by |
14 | * Erik Andersen <andersen@codepoet.org>. I ripped out Native Language | 14 | * Erik Andersen <andersen@codepoet.org>. I ripped out Native Language |
15 | * Support, replaced getopt, added some gotos for redundant stuff. | 15 | * Support, replaced getopt, added some gotos for redundant stuff. |
16 | * | 16 | * |
17 | * Audited and cleaned up on 7 March 2003 to reduce size of | 17 | * Audited and cleaned up on 7 March 2003 to reduce size of |
diff --git a/util-linux/fbset.c b/util-linux/fbset.c index b5f57b1e4..83bf309a3 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * | 20 | * |
21 | * This is a from-scratch implementation of fbset; but the de facto fbset | 21 | * This is a from-scratch implementation of fbset; but the de facto fbset |
22 | * implementation was a good reference. fbset (original) is released under | 22 | * implementation was a good reference. fbset (original) is released under |
23 | * the GPL, and is (c) 1995-1999 by: | 23 | * the GPL, and is (c) 1995-1999 by: |
24 | * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) | 24 | * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) |
25 | */ | 25 | */ |
26 | 26 | ||
@@ -89,8 +89,8 @@ static const int FBIOPUT_VSCREENINFO = 0x4601; | |||
89 | struct fb_bitfield { | 89 | struct fb_bitfield { |
90 | uint32_t offset; /* beginning of bitfield */ | 90 | uint32_t offset; /* beginning of bitfield */ |
91 | uint32_t length; /* length of bitfield */ | 91 | uint32_t length; /* length of bitfield */ |
92 | uint32_t msb_right; /* != 0 : Most significant bit is */ | 92 | uint32_t msb_right; /* != 0 : Most significant bit is */ |
93 | /* right */ | 93 | /* right */ |
94 | }; | 94 | }; |
95 | struct fb_var_screeninfo { | 95 | struct fb_var_screeninfo { |
96 | uint32_t xres; /* visible resolution */ | 96 | uint32_t xres; /* visible resolution */ |
@@ -106,7 +106,7 @@ struct fb_var_screeninfo { | |||
106 | struct fb_bitfield red; /* bitfield in fb mem if true color, */ | 106 | struct fb_bitfield red; /* bitfield in fb mem if true color, */ |
107 | struct fb_bitfield green; /* else only length is significant */ | 107 | struct fb_bitfield green; /* else only length is significant */ |
108 | struct fb_bitfield blue; | 108 | struct fb_bitfield blue; |
109 | struct fb_bitfield transp; /* transparency */ | 109 | struct fb_bitfield transp; /* transparency */ |
110 | 110 | ||
111 | uint32_t nonstd; /* != 0 Non standard pixel format */ | 111 | uint32_t nonstd; /* != 0 Non standard pixel format */ |
112 | 112 | ||
@@ -210,13 +210,13 @@ static int readmode(struct fb_var_screeninfo *base, const char *fn, | |||
210 | if ((p = strstr(buf, "geometry "))) { | 210 | if ((p = strstr(buf, "geometry "))) { |
211 | p += 9; | 211 | p += 9; |
212 | 212 | ||
213 | sscanf(p, "%d %d %d %d %d", | 213 | sscanf(p, "%d %d %d %d %d", |
214 | &(base->xres), &(base->yres), | 214 | &(base->xres), &(base->yres), |
215 | &(base->xres_virtual), &(base->yres_virtual), | 215 | &(base->xres_virtual), &(base->yres_virtual), |
216 | &(base->bits_per_pixel)); | 216 | &(base->bits_per_pixel)); |
217 | } else if ((p = strstr(buf, "timings "))) { | 217 | } else if ((p = strstr(buf, "timings "))) { |
218 | p += 8; | 218 | p += 8; |
219 | 219 | ||
220 | sscanf(p, "%d %d %d %d %d %d %d", | 220 | sscanf(p, "%d %d %d %d %d %d %d", |
221 | &(base->pixclock), | 221 | &(base->pixclock), |
222 | &(base->left_margin), &(base->right_margin), | 222 | &(base->left_margin), &(base->right_margin), |
@@ -271,7 +271,7 @@ static int readmode(struct fb_var_screeninfo *base, const char *fn, | |||
271 | base->sync |= FB_SYNC_EXT; | 271 | base->sync |= FB_SYNC_EXT; |
272 | } | 272 | } |
273 | } | 273 | } |
274 | 274 | ||
275 | if (strstr(buf, "endmode")) | 275 | if (strstr(buf, "endmode")) |
276 | return 1; | 276 | return 1; |
277 | } | 277 | } |
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 2374960df..f35aeb9f3 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
@@ -52,7 +52,7 @@ | |||
52 | #define BLKSSZGET _IO(0x12,104) /* get block device sector size */ | 52 | #define BLKSSZGET _IO(0x12,104) /* get block device sector size */ |
53 | 53 | ||
54 | /* Avoid conflicts with the 2.6 kernel headers, which define | 54 | /* Avoid conflicts with the 2.6 kernel headers, which define |
55 | * _IOR rather differently */ | 55 | * _IOR rather differently */ |
56 | #undef _IOR | 56 | #undef _IOR |
57 | #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) | 57 | #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) |
58 | #define BLKGETSIZE64 _IOR(0x12,114,uint64_t) | 58 | #define BLKGETSIZE64 _IOR(0x12,114,uint64_t) |
@@ -4279,7 +4279,7 @@ read_int(uint low, uint dflt, uint high, uint base, char *mesg) | |||
4279 | 4279 | ||
4280 | while (isdigit(*++line_ptr)) | 4280 | while (isdigit(*++line_ptr)) |
4281 | use_default = 0; | 4281 | use_default = 0; |
4282 | 4282 | ||
4283 | switch (*line_ptr) { | 4283 | switch (*line_ptr) { |
4284 | case 'c': | 4284 | case 'c': |
4285 | case 'C': | 4285 | case 'C': |
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c index 38267e61e..e5061dc34 100644 --- a/util-linux/freeramdisk.c +++ b/util-linux/freeramdisk.c | |||
@@ -45,7 +45,7 @@ freeramdisk_main(int argc, char **argv) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | fd = bb_xopen(argv[1], O_RDWR); | 47 | fd = bb_xopen(argv[1], O_RDWR); |
48 | 48 | ||
49 | result = ioctl(fd, BLKFLSBUF); | 49 | result = ioctl(fd, BLKFLSBUF); |
50 | #ifdef CONFIG_FEATURE_CLEAN_UP | 50 | #ifdef CONFIG_FEATURE_CLEAN_UP |
51 | close(fd); | 51 | close(fd); |
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 4d07e028f..709a2a143 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -49,7 +49,7 @@ | |||
49 | * 01.07.96 - Fixed the v2 fs stuff to use the right #defines and such | 49 | * 01.07.96 - Fixed the v2 fs stuff to use the right #defines and such |
50 | * for modern libcs (janl@math.uio.no, Nicolai Langfeldt) | 50 | * for modern libcs (janl@math.uio.no, Nicolai Langfeldt) |
51 | * | 51 | * |
52 | * 02.07.96 - Added C bit fiddling routines from rmk@ecs.soton.ac.uk | 52 | * 02.07.96 - Added C bit fiddling routines from rmk@ecs.soton.ac.uk |
53 | * (Russell King). He made them for ARM. It would seem | 53 | * (Russell King). He made them for ARM. It would seem |
54 | * that the ARM is powerful enough to do this in C whereas | 54 | * that the ARM is powerful enough to do this in C whereas |
55 | * i386 and m64k must use assembly to get it fast >:-) | 55 | * i386 and m64k must use assembly to get it fast >:-) |
@@ -57,7 +57,7 @@ | |||
57 | * (janl@math.uio.no, Nicolai Langfeldt) | 57 | * (janl@math.uio.no, Nicolai Langfeldt) |
58 | * | 58 | * |
59 | * 04.11.96 - Added minor fixes from Andreas Schwab to avoid compiler | 59 | * 04.11.96 - Added minor fixes from Andreas Schwab to avoid compiler |
60 | * warnings. Added mc68k bitops from | 60 | * warnings. Added mc68k bitops from |
61 | * Joerg Dorchain <dorchain@mpi-sb.mpg.de>. | 61 | * Joerg Dorchain <dorchain@mpi-sb.mpg.de>. |
62 | * | 62 | * |
63 | * 06.11.96 - Added v2 code submitted by Joerg Dorchain, but written by | 63 | * 06.11.96 - Added v2 code submitted by Joerg Dorchain, but written by |
@@ -83,7 +83,7 @@ | |||
83 | * -f force filesystem check even if filesystem marked as valid | 83 | * -f force filesystem check even if filesystem marked as valid |
84 | * | 84 | * |
85 | * The device may be a block device or a image of one, but this isn't | 85 | * The device may be a block device or a image of one, but this isn't |
86 | * enforced (but it's not much fun on a character device :-). | 86 | * enforced (but it's not much fun on a character device :-). |
87 | */ | 87 | */ |
88 | 88 | ||
89 | #include <stdio.h> | 89 | #include <stdio.h> |
@@ -1312,7 +1312,7 @@ static void free_name_list(void) | |||
1312 | { | 1312 | { |
1313 | int i; | 1313 | int i; |
1314 | 1314 | ||
1315 | if (name_list) { | 1315 | if (name_list) { |
1316 | for (i = 0; i < MAX_DEPTH; i++) { | 1316 | for (i = 0; i < MAX_DEPTH; i++) { |
1317 | free(name_list[i]); | 1317 | free(name_list[i]); |
1318 | } | 1318 | } |
@@ -1396,7 +1396,7 @@ extern int fsck_minix_main(int argc, char **argv) | |||
1396 | /* | 1396 | /* |
1397 | * Determine whether or not we should continue with the checking. | 1397 | * Determine whether or not we should continue with the checking. |
1398 | * This is based on the status of the filesystem valid and error | 1398 | * This is based on the status of the filesystem valid and error |
1399 | * flags and whether or not the -f switch was specified on the | 1399 | * flags and whether or not the -f switch was specified on the |
1400 | * command line. | 1400 | * command line. |
1401 | */ | 1401 | */ |
1402 | printf("%s, %s\n", bb_applet_name, program_version); | 1402 | printf("%s, %s\n", bb_applet_name, program_version); |
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index e089b1d81..fae511f9c 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c | |||
@@ -46,7 +46,7 @@ struct linux_rtc_time { | |||
46 | int tm_yday; | 46 | int tm_yday; |
47 | int tm_isdst; | 47 | int tm_isdst; |
48 | }; | 48 | }; |
49 | 49 | ||
50 | #define RTC_SET_TIME _IOW('p', 0x0a, struct linux_rtc_time) /* Set RTC time */ | 50 | #define RTC_SET_TIME _IOW('p', 0x0a, struct linux_rtc_time) /* Set RTC time */ |
51 | #define RTC_RD_TIME _IOR('p', 0x09, struct linux_rtc_time) /* Read RTC time */ | 51 | #define RTC_RD_TIME _IOR('p', 0x09, struct linux_rtc_time) /* Read RTC time */ |
52 | 52 | ||
@@ -71,17 +71,17 @@ static time_t read_rtc(int utc) | |||
71 | if ( ioctl ( rtc, RTC_RD_TIME, &tm ) < 0 ) | 71 | if ( ioctl ( rtc, RTC_RD_TIME, &tm ) < 0 ) |
72 | bb_perror_msg_and_die ( "Could not read time from RTC" ); | 72 | bb_perror_msg_and_die ( "Could not read time from RTC" ); |
73 | tm. tm_isdst = -1; // not known | 73 | tm. tm_isdst = -1; // not known |
74 | 74 | ||
75 | close ( rtc ); | 75 | close ( rtc ); |
76 | 76 | ||
77 | if ( utc ) { | 77 | if ( utc ) { |
78 | oldtz = getenv ( "TZ" ); | 78 | oldtz = getenv ( "TZ" ); |
79 | setenv ( "TZ", "UTC 0", 1 ); | 79 | setenv ( "TZ", "UTC 0", 1 ); |
80 | tzset ( ); | 80 | tzset ( ); |
81 | } | 81 | } |
82 | 82 | ||
83 | t = mktime ( &tm ); | 83 | t = mktime ( &tm ); |
84 | 84 | ||
85 | if ( utc ) { | 85 | if ( utc ) { |
86 | if ( oldtz ) | 86 | if ( oldtz ) |
87 | setenv ( "TZ", oldtz, 1 ); | 87 | setenv ( "TZ", oldtz, 1 ); |
@@ -101,13 +101,13 @@ static void write_rtc(time_t t, int utc) | |||
101 | if (( rtc = open ( "/dev/misc/rtc", O_WRONLY )) < 0 ) | 101 | if (( rtc = open ( "/dev/misc/rtc", O_WRONLY )) < 0 ) |
102 | bb_perror_msg_and_die ( "Could not access RTC" ); | 102 | bb_perror_msg_and_die ( "Could not access RTC" ); |
103 | } | 103 | } |
104 | 104 | ||
105 | tm = *( utc ? gmtime ( &t ) : localtime ( &t )); | 105 | tm = *( utc ? gmtime ( &t ) : localtime ( &t )); |
106 | tm. tm_isdst = 0; | 106 | tm. tm_isdst = 0; |
107 | 107 | ||
108 | if ( ioctl ( rtc, RTC_SET_TIME, &tm ) < 0 ) | 108 | if ( ioctl ( rtc, RTC_SET_TIME, &tm ) < 0 ) |
109 | bb_perror_msg_and_die ( "Could not set the RTC time" ); | 109 | bb_perror_msg_and_die ( "Could not set the RTC time" ); |
110 | 110 | ||
111 | close ( rtc ); | 111 | close ( rtc ); |
112 | } | 112 | } |
113 | 113 | ||
@@ -117,16 +117,16 @@ static int show_clock(int utc) | |||
117 | time_t t; | 117 | time_t t; |
118 | char buffer [64]; | 118 | char buffer [64]; |
119 | 119 | ||
120 | t = read_rtc ( utc ); | 120 | t = read_rtc ( utc ); |
121 | ptm = localtime ( &t ); /* Sets 'tzname[]' */ | 121 | ptm = localtime ( &t ); /* Sets 'tzname[]' */ |
122 | 122 | ||
123 | safe_strncpy ( buffer, ctime ( &t ), sizeof( buffer )); | 123 | safe_strncpy ( buffer, ctime ( &t ), sizeof( buffer )); |
124 | if ( buffer [0] ) | 124 | if ( buffer [0] ) |
125 | buffer [bb_strlen ( buffer ) - 1] = 0; | 125 | buffer [bb_strlen ( buffer ) - 1] = 0; |
126 | 126 | ||
127 | //printf ( "%s %.6f seconds %s\n", buffer, 0.0, utc ? "" : ( ptm-> tm_isdst ? tzname [1] : tzname [0] )); | 127 | //printf ( "%s %.6f seconds %s\n", buffer, 0.0, utc ? "" : ( ptm-> tm_isdst ? tzname [1] : tzname [0] )); |
128 | printf ( "%s %.6f seconds\n", buffer, 0.0 ); | 128 | printf ( "%s %.6f seconds\n", buffer, 0.0 ); |
129 | 129 | ||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
@@ -134,7 +134,7 @@ static int to_sys_clock(int utc) | |||
134 | { | 134 | { |
135 | struct timeval tv = { 0, 0 }; | 135 | struct timeval tv = { 0, 0 }; |
136 | const struct timezone tz = { timezone/60 - 60*daylight, 0 }; | 136 | const struct timezone tz = { timezone/60 - 60*daylight, 0 }; |
137 | 137 | ||
138 | tv. tv_sec = read_rtc ( utc ); | 138 | tv. tv_sec = read_rtc ( utc ); |
139 | 139 | ||
140 | if ( settimeofday ( &tv, &tz )) | 140 | if ( settimeofday ( &tv, &tz )) |
@@ -160,18 +160,18 @@ static int check_utc(void) | |||
160 | { | 160 | { |
161 | int utc = 0; | 161 | int utc = 0; |
162 | FILE *f = fopen ( "/var/lib/hwclock/adjtime", "r" ); | 162 | FILE *f = fopen ( "/var/lib/hwclock/adjtime", "r" ); |
163 | 163 | ||
164 | if ( f ) { | 164 | if ( f ) { |
165 | char buffer [128]; | 165 | char buffer [128]; |
166 | 166 | ||
167 | while ( fgets ( buffer, sizeof( buffer ), f )) { | 167 | while ( fgets ( buffer, sizeof( buffer ), f )) { |
168 | int len = bb_strlen ( buffer ); | 168 | int len = bb_strlen ( buffer ); |
169 | 169 | ||
170 | while ( len && isspace ( buffer [len - 1] )) | 170 | while ( len && isspace ( buffer [len - 1] )) |
171 | len--; | 171 | len--; |
172 | 172 | ||
173 | buffer [len] = 0; | 173 | buffer [len] = 0; |
174 | 174 | ||
175 | if ( strncmp ( buffer, "UTC", 3 ) == 0 ) { | 175 | if ( strncmp ( buffer, "UTC", 3 ) == 0 ) { |
176 | utc = 1; | 176 | utc = 1; |
177 | break; | 177 | break; |
@@ -224,6 +224,6 @@ static const struct option hwclock_long_options[] = { | |||
224 | return from_sys_clock ( utc ); | 224 | return from_sys_clock ( utc ); |
225 | } else { | 225 | } else { |
226 | /* default HWCLOCK_OPT_SHOW */ | 226 | /* default HWCLOCK_OPT_SHOW */ |
227 | return show_clock ( utc ); | 227 | return show_clock ( utc ); |
228 | } | 228 | } |
229 | } | 229 | } |
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 0f72b3592..3c140ef2a 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -35,7 +35,7 @@ | |||
35 | * | 35 | * |
36 | * 30.10.94 - added support for v2 filesystem | 36 | * 30.10.94 - added support for v2 filesystem |
37 | * (Andreas Schwab, schwab@issan.informatik.uni-dortmund.de) | 37 | * (Andreas Schwab, schwab@issan.informatik.uni-dortmund.de) |
38 | * | 38 | * |
39 | * 09.11.94 - Added test to prevent overwrite of mounted fs adapted | 39 | * 09.11.94 - Added test to prevent overwrite of mounted fs adapted |
40 | * from Theodore Ts'o's (tytso@athena.mit.edu) mke2fs | 40 | * from Theodore Ts'o's (tytso@athena.mit.edu) mke2fs |
41 | * program. (Daniel Quinlan, quinlan@yggdrasil.com) | 41 | * program. (Daniel Quinlan, quinlan@yggdrasil.com) |
@@ -56,7 +56,7 @@ | |||
56 | * -v for v2 filesystem | 56 | * -v for v2 filesystem |
57 | * | 57 | * |
58 | * The device may be a block device or a image of one, but this isn't | 58 | * The device may be a block device or a image of one, but this isn't |
59 | * enforced (but it's not much fun on a character device :-). | 59 | * enforced (but it's not much fun on a character device :-). |
60 | * | 60 | * |
61 | * Modified for BusyBox by Erik Andersen <andersen@debian.org> -- | 61 | * Modified for BusyBox by Erik Andersen <andersen@debian.org> -- |
62 | * removed getopt based parser and added a hand rolled one. | 62 | * removed getopt based parser and added a hand rolled one. |
@@ -702,7 +702,7 @@ extern int mkfs_minix_main(int argc, char **argv) | |||
702 | if (INODE_SIZE2 * MINIX2_INODES_PER_BLOCK != BLOCK_SIZE) | 702 | if (INODE_SIZE2 * MINIX2_INODES_PER_BLOCK != BLOCK_SIZE) |
703 | bb_error_msg_and_die("bad inode size"); | 703 | bb_error_msg_and_die("bad inode size"); |
704 | #endif | 704 | #endif |
705 | 705 | ||
706 | /* Parse options */ | 706 | /* Parse options */ |
707 | argv++; | 707 | argv++; |
708 | while (--argc >= 0 && *argv && **argv) { | 708 | while (--argc >= 0 && *argv && **argv) { |
@@ -755,7 +755,7 @@ extern int mkfs_minix_main(int argc, char **argv) | |||
755 | magic = MINIX_SUPER_MAGIC; | 755 | magic = MINIX_SUPER_MAGIC; |
756 | else if (i == 30) | 756 | else if (i == 30) |
757 | magic = MINIX_SUPER_MAGIC2; | 757 | magic = MINIX_SUPER_MAGIC2; |
758 | else | 758 | else |
759 | bb_show_usage(); | 759 | bb_show_usage(); |
760 | namelen = i; | 760 | namelen = i; |
761 | dirsize = i + 2; | 761 | dirsize = i + 2; |
diff --git a/util-linux/more.c b/util-linux/more.c index e3a1d8656..d7b7ce22f 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -3,10 +3,10 @@ | |||
3 | * Mini more implementation for busybox | 3 | * Mini more implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | 5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. |
6 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 6 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
7 | * | 7 | * |
8 | * Latest version blended together by Erik Andersen <andersen@codepoet.org>, | 8 | * Latest version blended together by Erik Andersen <andersen@codepoet.org>, |
9 | * based on the original more implementation by Bruce, and code from the | 9 | * based on the original more implementation by Bruce, and code from the |
10 | * Debian boot-floppies team. | 10 | * Debian boot-floppies team. |
11 | * | 11 | * |
12 | * Termios corrects by Vladimir Oleynik <dzo@simtreas.ru> | 12 | * Termios corrects by Vladimir Oleynik <dzo@simtreas.ru> |
@@ -101,7 +101,7 @@ extern int more_main(int argc, char **argv) | |||
101 | file = bb_wfopen(*argv, "r"); | 101 | file = bb_wfopen(*argv, "r"); |
102 | if(file==0) | 102 | if(file==0) |
103 | goto loop; | 103 | goto loop; |
104 | 104 | ||
105 | st.st_size = 0; | 105 | st.st_size = 0; |
106 | fstat(fileno(file), &st); | 106 | fstat(fileno(file), &st); |
107 | 107 | ||
@@ -158,7 +158,7 @@ extern int more_main(int argc, char **argv) | |||
158 | goto end; | 158 | goto end; |
159 | } | 159 | } |
160 | 160 | ||
161 | /* | 161 | /* |
162 | * There are two input streams to worry about here: | 162 | * There are two input streams to worry about here: |
163 | * | 163 | * |
164 | * c : the character we are reading from the file being "mored" | 164 | * c : the character we are reading from the file being "mored" |
diff --git a/util-linux/mount.c b/util-linux/mount.c index 8a1f4a11a..098e63663 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Mini mount implementation for busybox | 3 | * Mini mount implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | 5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. |
6 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 6 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -27,8 +27,8 @@ | |||
27 | * | 27 | * |
28 | * 1999-10-07 Erik Andersen <andersen@codepoet.org>. | 28 | * 1999-10-07 Erik Andersen <andersen@codepoet.org>. |
29 | * Rewrite of a lot of code. Removed mtab usage (I plan on | 29 | * Rewrite of a lot of code. Removed mtab usage (I plan on |
30 | * putting it back as a compile-time option some time), | 30 | * putting it back as a compile-time option some time), |
31 | * major adjustments to option parsing, and some serious | 31 | * major adjustments to option parsing, and some serious |
32 | * dieting all around. | 32 | * dieting all around. |
33 | * | 33 | * |
34 | * 1999-11-06 mtab suppport is back - andersee | 34 | * 1999-11-06 mtab suppport is back - andersee |
@@ -40,8 +40,8 @@ | |||
40 | * Rewrote fstab while loop and lower mount section. Can now do | 40 | * Rewrote fstab while loop and lower mount section. Can now do |
41 | * single mounts from fstab. Can override fstab options for single | 41 | * single mounts from fstab. Can override fstab options for single |
42 | * mount. Common mount_one call for single mounts and 'all'. Fixed | 42 | * mount. Common mount_one call for single mounts and 'all'. Fixed |
43 | * mtab updating and stale entries. Removed 'remount' default. | 43 | * mtab updating and stale entries. Removed 'remount' default. |
44 | * | 44 | * |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include <limits.h> | 47 | #include <limits.h> |
@@ -289,7 +289,7 @@ static int mount_one(char *blockDevice, char *directory, char *filesystemType, | |||
289 | } | 289 | } |
290 | 290 | ||
291 | if (read_proc && !status) { | 291 | if (read_proc && !status) { |
292 | 292 | ||
293 | f = bb_xfopen("/proc/filesystems", "r"); | 293 | f = bb_xfopen("/proc/filesystems", "r"); |
294 | 294 | ||
295 | while (fgets(buf, sizeof(buf), f) != NULL) { | 295 | while (fgets(buf, sizeof(buf), f) != NULL) { |
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c index 4241f79f5..34f23f5aa 100644 --- a/util-linux/nfsmount.c +++ b/util-linux/nfsmount.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * | 24 | * |
25 | * 1999-02-22 Arkadiusz Mi�kiewicz <misiek@misiek.eu.org> | 25 | * 1999-02-22 Arkadiusz Mi�kiewicz <misiek@misiek.eu.org> |
26 | * - added Native Language Support | 26 | * - added Native Language Support |
27 | * | 27 | * |
28 | * Modified by Olaf Kirch and Trond Myklebust for new NFS code, | 28 | * Modified by Olaf Kirch and Trond Myklebust for new NFS code, |
29 | * plus NFSv3 stuff. | 29 | * plus NFSv3 stuff. |
30 | */ | 30 | */ |
@@ -95,7 +95,7 @@ enum nfs_stat { | |||
95 | NFSERR_BADTYPE = 10007, /* v3 */ | 95 | NFSERR_BADTYPE = 10007, /* v3 */ |
96 | NFSERR_JUKEBOX = 10008 /* v3 */ | 96 | NFSERR_JUKEBOX = 10008 /* v3 */ |
97 | }; | 97 | }; |
98 | 98 | ||
99 | #define NFS_PROGRAM 100003 | 99 | #define NFS_PROGRAM 100003 |
100 | 100 | ||
101 | 101 | ||
@@ -445,7 +445,7 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
445 | 445 | ||
446 | for (opt = strtok(old_opts, ","); opt; opt = strtok(NULL, ",")) { | 446 | for (opt = strtok(old_opts, ","); opt; opt = strtok(NULL, ",")) { |
447 | if ((opteq = strchr(opt, '='))) { | 447 | if ((opteq = strchr(opt, '='))) { |
448 | val = atoi(opteq + 1); | 448 | val = atoi(opteq + 1); |
449 | *opteq = '\0'; | 449 | *opteq = '\0'; |
450 | if (!strcmp(opt, "rsize")) | 450 | if (!strcmp(opt, "rsize")) |
451 | data.rsize = val; | 451 | data.rsize = val; |
@@ -515,9 +515,9 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
515 | val = 0; | 515 | val = 0; |
516 | opt += 2; | 516 | opt += 2; |
517 | } | 517 | } |
518 | if (!strcmp(opt, "bg")) | 518 | if (!strcmp(opt, "bg")) |
519 | bg = val; | 519 | bg = val; |
520 | else if (!strcmp(opt, "fg")) | 520 | else if (!strcmp(opt, "fg")) |
521 | bg = !val; | 521 | bg = !val; |
522 | else if (!strcmp(opt, "soft")) | 522 | else if (!strcmp(opt, "soft")) |
523 | soft = val; | 523 | soft = val; |
@@ -872,7 +872,7 @@ fail: | |||
872 | if (fsock != -1) | 872 | if (fsock != -1) |
873 | close(fsock); | 873 | close(fsock); |
874 | return retval; | 874 | return retval; |
875 | } | 875 | } |
876 | 876 | ||
877 | /* | 877 | /* |
878 | * We need to translate between nfs status return values and | 878 | * We need to translate between nfs status return values and |
diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c index 39453a261..85e180c46 100644 --- a/util-linux/pivot_root.c +++ b/util-linux/pivot_root.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * busyboxed by Evin Robertson | 5 | * busyboxed by Evin Robertson |
6 | * pivot_root syscall stubbed by Erik Andersen, so it will compile | 6 | * pivot_root syscall stubbed by Erik Andersen, so it will compile |
7 | * regardless of the kernel being used. | 7 | * regardless of the kernel being used. |
8 | */ | 8 | */ |
9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
10 | #include <stdio.h> | 10 | #include <stdio.h> |
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 9da70756e..7c7031bce 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c | |||
@@ -2,8 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Mini swapon/swapoff implementation for busybox | 3 | * Mini swapon/swapoff implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | ||
7 | * | 6 | * |
8 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/util-linux/umount.c b/util-linux/umount.c index 5df597028..37a8f061e 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Mini umount implementation for busybox | 3 | * Mini umount implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -28,7 +28,7 @@ | |||
28 | #include <stdlib.h> | 28 | #include <stdlib.h> |
29 | #include "busybox.h" | 29 | #include "busybox.h" |
30 | 30 | ||
31 | /* Teach libc5 about realpath -- it includes it but the | 31 | /* Teach libc5 about realpath -- it includes it but the |
32 | * prototype is missing... */ | 32 | * prototype is missing... */ |
33 | #if (__GLIBC__ <= 2) && (__GLIBC_MINOR__ < 1) | 33 | #if (__GLIBC__ <= 2) && (__GLIBC_MINOR__ < 1) |
34 | extern char *realpath(const char *path, char *resolved_path); | 34 | extern char *realpath(const char *path, char *resolved_path); |
@@ -148,7 +148,7 @@ static char *mtab_first(void **iter) | |||
148 | return mtab_next(iter); | 148 | return mtab_next(iter); |
149 | } | 149 | } |
150 | 150 | ||
151 | /* Don't bother to clean up, since exit() does that | 151 | /* Don't bother to clean up, since exit() does that |
152 | * automagically, so we can save a few bytes */ | 152 | * automagically, so we can save a few bytes */ |
153 | #ifdef CONFIG_FEATURE_CLEAN_UP | 153 | #ifdef CONFIG_FEATURE_CLEAN_UP |
154 | static void mtab_free(void) | 154 | static void mtab_free(void) |