aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-08-16 10:35:17 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-08-16 10:35:17 +0000
commit6a2f7f41cf7c544d6abce958f89c873b24f79b18 (patch)
tree6155700deea3477ee366aec5360909261ed53cd6
parent033e592cbc96c150c67ac9be7df65e314be5c8f8 (diff)
downloadbusybox-w32-6a2f7f41cf7c544d6abce958f89c873b24f79b18.tar.gz
busybox-w32-6a2f7f41cf7c544d6abce958f89c873b24f79b18.tar.bz2
busybox-w32-6a2f7f41cf7c544d6abce958f89c873b24f79b18.zip
whitespace fixes, no code changes
-rw-r--r--coreutils/dos2unix.c2
-rw-r--r--coreutils/expand.c2
-rw-r--r--coreutils/ln.c3
-rw-r--r--editors/vi.c6
-rw-r--r--libbb/getopt32.c16
-rw-r--r--loginutils/chpasswd.c2
-rw-r--r--miscutils/hdparm.c161
-rw-r--r--networking/httpd.c2
-rw-r--r--selinux/setfiles.c6
9 files changed, 101 insertions, 99 deletions
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index 115632f75..00688aac2 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -89,7 +89,7 @@ int dos2unix_main(int argc, char **argv)
89 } else { 89 } else {
90 conv_type = CT_UNIX2DOS; /* 1 */ 90 conv_type = CT_UNIX2DOS; /* 1 */
91 } 91 }
92 92
93 /* -u convert to unix, -d convert to dos */ 93 /* -u convert to unix, -d convert to dos */
94 opt_complementary = "u--d:d--u"; /* mutally exclusive */ 94 opt_complementary = "u--d:d--u"; /* mutally exclusive */
95 o = getopt32(argc, argv, "du"); 95 o = getopt32(argc, argv, "du");
diff --git a/coreutils/expand.c b/coreutils/expand.c
index 30815ff63..4b5fa1038 100644
--- a/coreutils/expand.c
+++ b/coreutils/expand.c
@@ -196,7 +196,7 @@ int expand_main(int argc, char **argv)
196 exit_status = EXIT_FAILURE; 196 exit_status = EXIT_FAILURE;
197 } 197 }
198 /* If stdin also clear EOF */ 198 /* If stdin also clear EOF */
199 if (file == stdin) 199 if (file == stdin)
200 clearerr(file); 200 clearerr(file);
201 } while (*++argv); 201 } while (*++argv);
202 202
diff --git a/coreutils/ln.c b/coreutils/ln.c
index 93a283d41..cffd4fdb5 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -54,7 +54,8 @@ int ln_main(int argc, char **argv)
54 54
55 if (is_directory(src, 55 if (is_directory(src,
56 (flag & LN_NODEREFERENCE) ^ LN_NODEREFERENCE, 56 (flag & LN_NODEREFERENCE) ^ LN_NODEREFERENCE,
57 NULL)) { 57 NULL)
58 ) {
58 src_name = xstrdup(*argv); 59 src_name = xstrdup(*argv);
59 src = concat_path_file(src, bb_get_last_path_component(src_name)); 60 src = concat_path_file(src, bb_get_last_path_component(src_name));
60 free(src_name); 61 free(src_name);
diff --git a/editors/vi.c b/editors/vi.c
index 74566499c..461cf9889 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -136,9 +136,9 @@ static char last_forward_char; // last char searched for with 'f'
136#if ENABLE_FEATURE_VI_READONLY 136#if ENABLE_FEATURE_VI_READONLY
137//static smallint vi_readonly, readonly; 137//static smallint vi_readonly, readonly;
138static smallint readonly_mode = 0; 138static smallint readonly_mode = 0;
139#define SET_READONLY_FILE(flags) ((flags) |= 0x01) 139#define SET_READONLY_FILE(flags) ((flags) |= 0x01)
140#define SET_READONLY_MODE(flags) ((flags) |= 0x02) 140#define SET_READONLY_MODE(flags) ((flags) |= 0x02)
141#define UNSET_READONLY_FILE(flags) ((flags) &= 0xfe) 141#define UNSET_READONLY_FILE(flags) ((flags) &= 0xfe)
142#else 142#else
143#define readonly_mode 0 143#define readonly_mode 0
144#define SET_READONLY_FILE(flags) 144#define SET_READONLY_FILE(flags)
diff --git a/libbb/getopt32.c b/libbb/getopt32.c
index 672d70a0a..c09956940 100644
--- a/libbb/getopt32.c
+++ b/libbb/getopt32.c
@@ -53,8 +53,8 @@ getopt32(int argc, char **argv, const char *applet_opts, ...)
53 char *pointer_to_arg_for_d; 53 char *pointer_to_arg_for_d;
54 54
55 flags = getopt32(argc, argv, "a:b:c:d:", 55 flags = getopt32(argc, argv, "a:b:c:d:",
56 &pointer_to_arg_for_a, &pointer_to_arg_for_b, 56 &pointer_to_arg_for_a, &pointer_to_arg_for_b,
57 &pointer_to_arg_for_c, &pointer_to_arg_for_d); 57 &pointer_to_arg_for_c, &pointer_to_arg_for_d);
58 58
59 The type of the pointer (char* or llist_t*) may be controlled 59 The type of the pointer (char* or llist_t*) may be controlled
60 by the "::" special separator that is set in the external string 60 by the "::" special separator that is set in the external string
@@ -121,9 +121,9 @@ const char *opt_complementary
121 opt_complementary = "ww"; 121 opt_complementary = "ww";
122 getopt32(argc, argv, "w", &w_counter); 122 getopt32(argc, argv, "w", &w_counter);
123 if (w_counter) 123 if (w_counter)
124 width = (w_counter == 1) ? 132 : INT_MAX; 124 width = (w_counter == 1) ? 132 : INT_MAX;
125 else 125 else
126 get_terminal_width(...&width...); 126 get_terminal_width(...&width...);
127 127
128 w_counter is a pointer to an integer. It has to be passed to 128 w_counter is a pointer to an integer. It has to be passed to
129 getopt32() after all other option argument sinks. 129 getopt32() after all other option argument sinks.
@@ -137,9 +137,9 @@ const char *opt_complementary
137 opt_complementary = "vv:b::b-c:c-b"; 137 opt_complementary = "vv:b::b-c:c-b";
138 f = getopt32(argc, argv, "vb:c", &my_b, &verbose_level); 138 f = getopt32(argc, argv, "vb:c", &my_b, &verbose_level);
139 if (f & 2) // -c after -b unsets -b flag 139 if (f & 2) // -c after -b unsets -b flag
140 while (my_b) { dosomething_with(my_b->data); my_b = my_b->link; } 140 while (my_b) { dosomething_with(my_b->data); my_b = my_b->link; }
141 if (my_b) // but llist is stored if -b is specified 141 if (my_b) // but llist is stored if -b is specified
142 free_llist(my_b); 142 free_llist(my_b);
143 if (verbose_level) printf("verbose level is %d\n", verbose_level); 143 if (verbose_level) printf("verbose level is %d\n", verbose_level);
144 144
145Special characters: 145Special characters:
@@ -200,9 +200,9 @@ Special characters:
200 opt = getopt32(argc, argv, "sd:x", &smax_print_depth); 200 opt = getopt32(argc, argv, "sd:x", &smax_print_depth);
201 201
202 if (opt & 2) 202 if (opt & 2)
203 max_print_depth = atoi(smax_print_depth); 203 max_print_depth = atoi(smax_print_depth);
204 if (opt & 4) 204 if (opt & 4)
205 printf("Detected odd -x usage\n"); 205 printf("Detected odd -x usage\n");
206 206
207 "--" A double dash between two options, or between an option and a group 207 "--" A double dash between two options, or between an option and a group
208 of options, means that they are mutually exclusive. Unlike 208 of options, means that they are mutually exclusive. Unlike
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c
index 6fb4dca7a..e2a717a02 100644
--- a/loginutils/chpasswd.c
+++ b/loginutils/chpasswd.c
@@ -31,7 +31,7 @@ int chpasswd_main(int argc, char **argv)
31 if (getuid()) 31 if (getuid())
32 bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); 32 bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
33 33
34 opt_complementary = "m--e:e--m"; 34 opt_complementary = "m--e:e--m";
35 USE_GETOPT_LONG(applet_long_options = chpasswd_longopts;) 35 USE_GETOPT_LONG(applet_long_options = chpasswd_longopts;)
36 opt = getopt32(argc, argv, "em"); 36 opt = getopt32(argc, argv, "em");
37 37
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 484c97061..c47cc4e9d 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -239,83 +239,84 @@ static const char *const ata1_cfg_str[] = { /* word 0 in ATA-1 mode */
239/* word 81: minor version number */ 239/* word 81: minor version number */
240#define MINOR_MAX 0x22 240#define MINOR_MAX 0x22
241#if ENABLE_FEATURE_HDPARM_GET_IDENTITY 241#if ENABLE_FEATURE_HDPARM_GET_IDENTITY
242static const char *minor_str[MINOR_MAX+2] = { /* word 81 value: */ 242static const char *const minor_str[MINOR_MAX + 2] = {
243 "Unspecified", /* 0x0000 */ 243 /* word 81 value: */
244 "ATA-1 X3T9.2 781D prior to rev.4", /* 0x0001 */ 244 "Unspecified", /* 0x0000 */
245 "ATA-1 published, ANSI X3.221-1994", /* 0x0002 */ 245 "ATA-1 X3T9.2 781D prior to rev.4", /* 0x0001 */
246 "ATA-1 X3T9.2 781D rev.4", /* 0x0003 */ 246 "ATA-1 published, ANSI X3.221-1994", /* 0x0002 */
247 "ATA-2 published, ANSI X3.279-1996", /* 0x0004 */ 247 "ATA-1 X3T9.2 781D rev.4", /* 0x0003 */
248 "ATA-2 X3T10 948D prior to rev.2k", /* 0x0005 */ 248 "ATA-2 published, ANSI X3.279-1996", /* 0x0004 */
249 "ATA-3 X3T10 2008D rev.1", /* 0x0006 */ 249 "ATA-2 X3T10 948D prior to rev.2k", /* 0x0005 */
250 "ATA-2 X3T10 948D rev.2k", /* 0x0007 */ 250 "ATA-3 X3T10 2008D rev.1", /* 0x0006 */
251 "ATA-3 X3T10 2008D rev.0", /* 0x0008 */ 251 "ATA-2 X3T10 948D rev.2k", /* 0x0007 */
252 "ATA-2 X3T10 948D rev.3", /* 0x0009 */ 252 "ATA-3 X3T10 2008D rev.0", /* 0x0008 */
253 "ATA-3 published, ANSI X3.298-199x", /* 0x000a */ 253 "ATA-2 X3T10 948D rev.3", /* 0x0009 */
254 "ATA-3 X3T10 2008D rev.6", /* 0x000b */ 254 "ATA-3 published, ANSI X3.298-199x", /* 0x000a */
255 "ATA-3 X3T13 2008D rev.7 and 7a", /* 0x000c */ 255 "ATA-3 X3T10 2008D rev.6", /* 0x000b */
256 "ATA/ATAPI-4 X3T13 1153D rev.6", /* 0x000d */ 256 "ATA-3 X3T13 2008D rev.7 and 7a", /* 0x000c */
257 "ATA/ATAPI-4 T13 1153D rev.13", /* 0x000e */ 257 "ATA/ATAPI-4 X3T13 1153D rev.6", /* 0x000d */
258 "ATA/ATAPI-4 X3T13 1153D rev.7", /* 0x000f */ 258 "ATA/ATAPI-4 T13 1153D rev.13", /* 0x000e */
259 "ATA/ATAPI-4 T13 1153D rev.18", /* 0x0010 */ 259 "ATA/ATAPI-4 X3T13 1153D rev.7", /* 0x000f */
260 "ATA/ATAPI-4 T13 1153D rev.15", /* 0x0011 */ 260 "ATA/ATAPI-4 T13 1153D rev.18", /* 0x0010 */
261 "ATA/ATAPI-4 published, ANSI INCITS 317-1998", /* 0x0012 */ 261 "ATA/ATAPI-4 T13 1153D rev.15", /* 0x0011 */
262 "ATA/ATAPI-5 T13 1321D rev.3", 262 "ATA/ATAPI-4 published, ANSI INCITS 317-1998", /* 0x0012 */
263 "ATA/ATAPI-4 T13 1153D rev.14", /* 0x0014 */ 263 "ATA/ATAPI-5 T13 1321D rev.3", /* 0x0013 */
264 "ATA/ATAPI-5 T13 1321D rev.1", /* 0x0015 */ 264 "ATA/ATAPI-4 T13 1153D rev.14", /* 0x0014 */
265 "ATA/ATAPI-5 published, ANSI INCITS 340-2000", /* 0x0016 */ 265 "ATA/ATAPI-5 T13 1321D rev.1", /* 0x0015 */
266 "ATA/ATAPI-4 T13 1153D rev.17", /* 0x0017 */ 266 "ATA/ATAPI-5 published, ANSI INCITS 340-2000", /* 0x0016 */
267 "ATA/ATAPI-6 T13 1410D rev.0", /* 0x0018 */ 267 "ATA/ATAPI-4 T13 1153D rev.17", /* 0x0017 */
268 "ATA/ATAPI-6 T13 1410D rev.3a", /* 0x0019 */ 268 "ATA/ATAPI-6 T13 1410D rev.0", /* 0x0018 */
269 "ATA/ATAPI-7 T13 1532D rev.1", /* 0x001a */ 269 "ATA/ATAPI-6 T13 1410D rev.3a", /* 0x0019 */
270 "ATA/ATAPI-6 T13 1410D rev.2", /* 0x001b */ 270 "ATA/ATAPI-7 T13 1532D rev.1", /* 0x001a */
271 "ATA/ATAPI-6 T13 1410D rev.1", /* 0x001c */ 271 "ATA/ATAPI-6 T13 1410D rev.2", /* 0x001b */
272 "ATA/ATAPI-7 published, ANSI INCITS 397-2005", /* 0x001d */ 272 "ATA/ATAPI-6 T13 1410D rev.1", /* 0x001c */
273 "ATA/ATAPI-7 T13 1532D rev.0", /* 0x001e */ 273 "ATA/ATAPI-7 published, ANSI INCITS 397-2005", /* 0x001d */
274 "Reserved" /* 0x001f */ 274 "ATA/ATAPI-7 T13 1532D rev.0", /* 0x001e */
275 "Reserved" /* 0x0020 */ 275 "Reserved" /* 0x001f */
276 "ATA/ATAPI-7 T13 1532D rev.4a", /* 0x0021 */ 276 "Reserved" /* 0x0020 */
277 "ATA/ATAPI-6 published, ANSI INCITS 361-2002", /* 0x0022 */ 277 "ATA/ATAPI-7 T13 1532D rev.4a", /* 0x0021 */
278 "Reserved" /* 0x0023-0xfffe*/ 278 "ATA/ATAPI-6 published, ANSI INCITS 361-2002", /* 0x0022 */
279 "Reserved" /* 0x0023-0xfffe */
279}; 280};
280#endif 281#endif
281static const char actual_ver[MINOR_MAX+2] = { 282static const char actual_ver[MINOR_MAX + 2] ALIGN1 = {
282 /* word 81 value: */ 283 /* word 81 value: */
283 0, /* 0x0000 WARNING: */ 284 0, /* 0x0000 WARNING: actual_ver[] array */
284 1, /* 0x0001 WARNING: */ 285 1, /* 0x0001 WARNING: corresponds */
285 1, /* 0x0002 WARNING: */ 286 1, /* 0x0002 WARNING: *exactly* */
286 1, /* 0x0003 WARNING: */ 287 1, /* 0x0003 WARNING: to the ATA/ */
287 2, /* 0x0004 WARNING: This array */ 288 2, /* 0x0004 WARNING: ATAPI version */
288 2, /* 0x0005 WARNING: corresponds */ 289 2, /* 0x0005 WARNING: listed in */
289 3, /* 0x0006 WARNING: *exactly* */ 290 3, /* 0x0006 WARNING: the */
290 2, /* 0x0007 WARNING: to the ATA/ */ 291 2, /* 0x0007 WARNING: minor_str */
291 3, /* 0x0008 WARNING: ATAPI version */ 292 3, /* 0x0008 WARNING: array */
292 2, /* 0x0009 WARNING: listed in */ 293 2, /* 0x0009 WARNING: above. */
293 3, /* 0x000a WARNING: the */ 294 3, /* 0x000a WARNING: */
294 3, /* 0x000b WARNING: minor_str */ 295 3, /* 0x000b WARNING: If you change */
295 3, /* 0x000c WARNING: array */ 296 3, /* 0x000c WARNING: that one, */
296 4, /* 0x000d WARNING: above. */ 297 4, /* 0x000d WARNING: change this one */
297 4, /* 0x000e WARNING: */ 298 4, /* 0x000e WARNING: too!!! */
298 4, /* 0x000f WARNING: if you change */ 299 4, /* 0x000f */
299 4, /* 0x0010 WARNING: that one, */ 300 4, /* 0x0010 */
300 4, /* 0x0011 WARNING: change this one */ 301 4, /* 0x0011 */
301 4, /* 0x0012 WARNING: too!!! */ 302 4, /* 0x0012 */
302 5, /* 0x0013 WARNING: */ 303 5, /* 0x0013 */
303 4, /* 0x0014 WARNING: */ 304 4, /* 0x0014 */
304 5, /* 0x0015 WARNING: */ 305 5, /* 0x0015 */
305 5, /* 0x0016 WARNING: */ 306 5, /* 0x0016 */
306 4, /* 0x0017 WARNING: */ 307 4, /* 0x0017 */
307 6, /* 0x0018 WARNING: */ 308 6, /* 0x0018 */
308 6, /* 0x0019 WARNING: */ 309 6, /* 0x0019 */
309 7, /* 0x001a WARNING: */ 310 7, /* 0x001a */
310 6, /* 0x001b WARNING: */ 311 6, /* 0x001b */
311 6, /* 0x001c WARNING: */ 312 6, /* 0x001c */
312 7, /* 0x001d WARNING: */ 313 7, /* 0x001d */
313 7, /* 0x001e WARNING: */ 314 7, /* 0x001e */
314 0, /* 0x001f WARNING: */ 315 0, /* 0x001f */
315 0, /* 0x0020 WARNING: */ 316 0, /* 0x0020 */
316 7, /* 0x0021 WARNING: */ 317 7, /* 0x0021 */
317 6, /* 0x0022 WARNING: */ 318 6, /* 0x0022 */
318 0 /* 0x0023-0xfffe */ 319 0 /* 0x0023-0xfffe */
319}; 320};
320 321
321/* words 82-84: cmds/feats supported */ 322/* words 82-84: cmds/feats supported */
@@ -343,11 +344,11 @@ static const char *const cmd_feat_str[] = {
343 "Removable Media feature set", /* word 82 bit 2 */ 344 "Removable Media feature set", /* word 82 bit 2 */
344 "Security Mode feature set", /* word 82 bit 1 */ 345 "Security Mode feature set", /* word 82 bit 1 */
345 "SMART feature set", /* word 82 bit 0 */ 346 "SMART feature set", /* word 82 bit 0 */
346 /* --------------*/ 347 /* -------------- */
347 "", /* word 83 bit 15: !valid bit */ 348 "", /* word 83 bit 15: !valid bit */
348 "", /* word 83 bit 14: valid bit */ 349 "", /* word 83 bit 14: valid bit */
349 "FLUSH CACHE EXT cmd", /* word 83 bit 13 */ 350 "FLUSH CACHE EXT cmd", /* word 83 bit 13 */
350 "Mandatory FLUSH CACHE cmd ", /* word 83 bit 12 */ 351 "Mandatory FLUSH CACHE cmd ", /* word 83 bit 12 */
351 "Device Configuration Overlay feature set ", 352 "Device Configuration Overlay feature set ",
352 "48-bit Address feature set ", /* word 83 bit 10 */ 353 "48-bit Address feature set ", /* word 83 bit 10 */
353 "", 354 "",
@@ -356,11 +357,11 @@ static const char *const cmd_feat_str[] = {
356 "SET FEATURES subcommand required to spinup after power up", 357 "SET FEATURES subcommand required to spinup after power up",
357 "Power-Up In Standby feature set", /* word 83 bit 5 */ 358 "Power-Up In Standby feature set", /* word 83 bit 5 */
358 "Removable Media Status Notification feature set", 359 "Removable Media Status Notification feature set",
359 "Adv. Power Management feature set",/* word 83 bit 3 */ 360 "Adv. Power Management feature set", /* word 83 bit 3 */
360 "CFA feature set", /* word 83 bit 2 */ 361 "CFA feature set", /* word 83 bit 2 */
361 "READ/WRITE DMA QUEUED", /* word 83 bit 1 */ 362 "READ/WRITE DMA QUEUED", /* word 83 bit 1 */
362 "DOWNLOAD MICROCODE cmd", /* word 83 bit 0 */ 363 "DOWNLOAD MICROCODE cmd", /* word 83 bit 0 */
363 /* --------------*/ 364 /* -------------- */
364 "", /* word 84 bit 15: !valid bit */ 365 "", /* word 84 bit 15: !valid bit */
365 "", /* word 84 bit 14: valid bit */ 366 "", /* word 84 bit 14: valid bit */
366 "", /* word 84 bit 13: reserved */ 367 "", /* word 84 bit 13: reserved */
diff --git a/networking/httpd.c b/networking/httpd.c
index 9a9489ed5..b44beaa8a 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1090,7 +1090,7 @@ static int sendCgi(const char *url,
1090 setenv1("REMOTE_ADDR", p); 1090 setenv1("REMOTE_ADDR", p);
1091 if (cp) *cp = ':'; 1091 if (cp) *cp = ':';
1092 } 1092 }
1093 setenv1("HTTP_USER_AGENT", user_agent); 1093 setenv1("HTTP_USER_AGENT", user_agent);
1094#if ENABLE_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV 1094#if ENABLE_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
1095 setenv_long("REMOTE_PORT", tcp_port); 1095 setenv_long("REMOTE_PORT", tcp_port);
1096#endif 1096#endif
diff --git a/selinux/setfiles.c b/selinux/setfiles.c
index dcc8cbb5f..08b911a03 100644
--- a/selinux/setfiles.c
+++ b/selinux/setfiles.c
@@ -264,15 +264,15 @@ static bool only_changed_user(const char *a, const char *b)
264 264
265static int restore(const char *file) 265static int restore(const char *file)
266{ 266{
267 char *my_file; 267 char *my_file;
268 struct stat my_sb; 268 struct stat my_sb;
269 int i, j, ret; 269 int i, j, ret;
270 char *context = NULL; 270 char *context = NULL;
271 char *newcon = NULL; 271 char *newcon = NULL;
272 bool user_only_changed = 0; 272 bool user_only_changed = 0;
273 int retval = 0; 273 int retval = 0;
274 274
275 my_file = bb_simplify_path(file); 275 my_file = bb_simplify_path(file);
276 276
277 i = match(my_file, &my_sb, &newcon); 277 i = match(my_file, &my_sb, &newcon);
278 278