diff options
| author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-01-11 17:20:00 +0000 |
|---|---|---|
| committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-01-11 17:20:00 +0000 |
| commit | 8bcd78dd99c17ea33daf8fb670dc9489cb24168f (patch) | |
| tree | af4e797eef0a65f4e3dba94b325da0ec08452d36 | |
| parent | eac7a041006fbc2b18d2bbf26547d0780369fa5e (diff) | |
| download | busybox-w32-8bcd78dd99c17ea33daf8fb670dc9489cb24168f.tar.gz busybox-w32-8bcd78dd99c17ea33daf8fb670dc9489cb24168f.tar.bz2 busybox-w32-8bcd78dd99c17ea33daf8fb670dc9489cb24168f.zip | |
Trailing whitespace removal over entire tree
git-svn-id: svn://busybox.net/trunk/busybox@17252 69ca8d6d-28ef-0310-b511-8ec308f3f277
48 files changed, 310 insertions, 310 deletions
| @@ -71,7 +71,7 @@ endif | |||
| 71 | # In both cases the working directory must be the root of the kernel src. | 71 | # In both cases the working directory must be the root of the kernel src. |
| 72 | # 1) O= | 72 | # 1) O= |
| 73 | # Use "make O=dir/to/store/output/files/" | 73 | # Use "make O=dir/to/store/output/files/" |
| 74 | # | 74 | # |
| 75 | # 2) Set KBUILD_OUTPUT | 75 | # 2) Set KBUILD_OUTPUT |
| 76 | # Set the environment variable KBUILD_OUTPUT to point to the directory | 76 | # Set the environment variable KBUILD_OUTPUT to point to the directory |
| 77 | # where the output files shall be placed. | 77 | # where the output files shall be placed. |
| @@ -145,7 +145,7 @@ export srctree objtree VPATH TOPDIR | |||
| 145 | # SUBARCH tells the usermode build what the underlying arch is. That is set | 145 | # SUBARCH tells the usermode build what the underlying arch is. That is set |
| 146 | # first, and if a usermode build is happening, the "ARCH=um" on the command | 146 | # first, and if a usermode build is happening, the "ARCH=um" on the command |
| 147 | # line overrides the setting of ARCH below. If a native build is happening, | 147 | # line overrides the setting of ARCH below. If a native build is happening, |
| 148 | # then ARCH is assigned, getting whatever value it gets normally, and | 148 | # then ARCH is assigned, getting whatever value it gets normally, and |
| 149 | # SUBARCH is subsequently ignored. | 149 | # SUBARCH is subsequently ignored. |
| 150 | 150 | ||
| 151 | SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | 151 | SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ |
| @@ -229,7 +229,7 @@ export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD | |||
| 229 | # cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< | 229 | # cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< |
| 230 | # | 230 | # |
| 231 | # If $(quiet) is empty, the whole command will be printed. | 231 | # If $(quiet) is empty, the whole command will be printed. |
| 232 | # If it is set to "quiet_", only the short version will be printed. | 232 | # If it is set to "quiet_", only the short version will be printed. |
| 233 | # If it is set to "silent_", nothing wil be printed at all, since | 233 | # If it is set to "silent_", nothing wil be printed at all, since |
| 234 | # the variable $(silent_cmd_cc_o_c) doesn't exist. | 234 | # the variable $(silent_cmd_cc_o_c) doesn't exist. |
| 235 | # | 235 | # |
| @@ -313,7 +313,7 @@ export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \ | |||
| 313 | HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | 313 | HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS |
| 314 | 314 | ||
| 315 | export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS | 315 | export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS |
| 316 | export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE | 316 | export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE |
| 317 | export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE | 317 | export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE |
| 318 | 318 | ||
| 319 | # When compiling out-of-tree modules, put MODVERDIR in the module | 319 | # When compiling out-of-tree modules, put MODVERDIR in the module |
| @@ -351,7 +351,7 @@ endif | |||
| 351 | # catch them early, and hand them over to scripts/kconfig/Makefile | 351 | # catch them early, and hand them over to scripts/kconfig/Makefile |
| 352 | # It is allowed to specify more targets when calling make, including | 352 | # It is allowed to specify more targets when calling make, including |
| 353 | # mixing *config targets and build targets. | 353 | # mixing *config targets and build targets. |
| 354 | # For example 'make oldconfig all'. | 354 | # For example 'make oldconfig all'. |
| 355 | # Detect when mixed targets is specified, and make a second invocation | 355 | # Detect when mixed targets is specified, and make a second invocation |
| 356 | # of make so .config is not included in this case either (for *config). | 356 | # of make so .config is not included in this case either (for *config). |
| 357 | 357 | ||
| @@ -567,7 +567,7 @@ quiet_cmd_busybox__ ?= LINK $@ | |||
| 567 | -Wl,--start-group $(busybox-all) -Wl,--end-group | 567 | -Wl,--start-group $(busybox-all) -Wl,--end-group |
| 568 | 568 | ||
| 569 | # Generate System.map | 569 | # Generate System.map |
| 570 | quiet_cmd_sysmap = SYSMAP | 570 | quiet_cmd_sysmap = SYSMAP |
| 571 | cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap | 571 | cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap |
| 572 | 572 | ||
| 573 | # Link of busybox | 573 | # Link of busybox |
| @@ -623,7 +623,7 @@ endef | |||
| 623 | # First command is ':' to allow us to use + in front of this rule | 623 | # First command is ':' to allow us to use + in front of this rule |
| 624 | cmd_ksym_ld = $(cmd_busybox__) | 624 | cmd_ksym_ld = $(cmd_busybox__) |
| 625 | define rule_ksym_ld | 625 | define rule_ksym_ld |
| 626 | : | 626 | : |
| 627 | +$(call cmd,busybox_version) | 627 | +$(call cmd,busybox_version) |
| 628 | $(call cmd,busybox__) | 628 | $(call cmd,busybox__) |
| 629 | $(Q)echo 'cmd_$@ := $(cmd_busybox__)' > $(@D)/.$(@F).cmd | 629 | $(Q)echo 'cmd_$@ := $(cmd_busybox__)' > $(@D)/.$(@F).cmd |
| @@ -674,7 +674,7 @@ busybox: busybox_unstripped | |||
| 674 | $(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \ | 674 | $(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \ |
| 675 | busybox_unstripped -o $@ | 675 | busybox_unstripped -o $@ |
| 676 | 676 | ||
| 677 | # The actual objects are generated when descending, | 677 | # The actual objects are generated when descending, |
| 678 | # make sure no implicit rule kicks in | 678 | # make sure no implicit rule kicks in |
| 679 | $(sort $(busybox-all)): $(busybox-dirs) ; | 679 | $(sort $(busybox-all)): $(busybox-dirs) ; |
| 680 | 680 | ||
| @@ -707,7 +707,7 @@ _localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f))) | |||
| 707 | localver = $(subst $(space),, \ | 707 | localver = $(subst $(space),, \ |
| 708 | $(shell cat /dev/null $(_localver)) \ | 708 | $(shell cat /dev/null $(_localver)) \ |
| 709 | $(patsubst "%",%,$(CONFIG_LOCALVERSION))) | 709 | $(patsubst "%",%,$(CONFIG_LOCALVERSION))) |
| 710 | 710 | ||
| 711 | # If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called | 711 | # If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called |
| 712 | # and if the SCM is know a tag from the SCM is appended. | 712 | # and if the SCM is know a tag from the SCM is appended. |
| 713 | # The appended tag is determinded by the SCM used. | 713 | # The appended tag is determinded by the SCM used. |
| @@ -1235,7 +1235,7 @@ endif | |||
| 1235 | $(build)=$(build-dir) $(@:.ko=.o) | 1235 | $(build)=$(build-dir) $(@:.ko=.o) |
| 1236 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost | 1236 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost |
| 1237 | 1237 | ||
| 1238 | # FIXME Should go into a make.lib or something | 1238 | # FIXME Should go into a make.lib or something |
| 1239 | # =========================================================================== | 1239 | # =========================================================================== |
| 1240 | 1240 | ||
| 1241 | quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) | 1241 | quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) |
diff --git a/archival/gzip.c b/archival/gzip.c index bfe762128..b6705425e 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
| @@ -792,13 +792,13 @@ static void check_match(IPos start, IPos match, int length) | |||
| 792 | typedef uch extra_bits_t; | 792 | typedef uch extra_bits_t; |
| 793 | 793 | ||
| 794 | /* extra bits for each length code */ | 794 | /* extra bits for each length code */ |
| 795 | static const extra_bits_t extra_lbits[LENGTH_CODES]= { | 795 | static const extra_bits_t extra_lbits[LENGTH_CODES]= { |
| 796 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, | 796 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, |
| 797 | 4, 4, 5, 5, 5, 5, 0 | 797 | 4, 4, 5, 5, 5, 5, 0 |
| 798 | }; | 798 | }; |
| 799 | 799 | ||
| 800 | /* extra bits for each distance code */ | 800 | /* extra bits for each distance code */ |
| 801 | static const extra_bits_t extra_dbits[D_CODES] = { | 801 | static const extra_bits_t extra_dbits[D_CODES] = { |
| 802 | 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, | 802 | 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, |
| 803 | 10, 10, 11, 11, 12, 12, 13, 13 | 803 | 10, 10, 11, 11, 12, 12, 13, 13 |
| 804 | }; | 804 | }; |
diff --git a/archival/tar.c b/archival/tar.c index ee9007c47..2ba51adf7 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
| @@ -673,7 +673,7 @@ static void handle_SIGCHLD(int status) | |||
| 673 | if (WIFEXITED(status) && WEXITSTATUS(status)==0) | 673 | if (WIFEXITED(status) && WEXITSTATUS(status)==0) |
| 674 | /* child exited with 0 */ | 674 | /* child exited with 0 */ |
| 675 | return; | 675 | return; |
| 676 | /* Cannot happen? | 676 | /* Cannot happen? |
| 677 | if(!WIFSIGNALED(status) && !WIFEXITED(status)) return; */ | 677 | if(!WIFSIGNALED(status) && !WIFEXITED(status)) return; */ |
| 678 | child_error = 1; | 678 | child_error = 1; |
| 679 | } | 679 | } |
diff --git a/coreutils/chown.c b/coreutils/chown.c index 2f48610a8..da6b6abdd 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c | |||
| @@ -93,7 +93,7 @@ int chown_main(int argc, char **argv) | |||
| 93 | fileAction, // file action | 93 | fileAction, // file action |
| 94 | fileAction, // dir action | 94 | fileAction, // dir action |
| 95 | NULL, // user data | 95 | NULL, // user data |
| 96 | 0) // depth | 96 | 0) // depth |
| 97 | ) { | 97 | ) { |
| 98 | retval = EXIT_FAILURE; | 98 | retval = EXIT_FAILURE; |
| 99 | } | 99 | } |
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 06512119e..dc7d2aef8 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c | |||
| @@ -146,7 +146,7 @@ int uudecode_main(int argc, char **argv) | |||
| 146 | FILE *dst_stream; | 146 | FILE *dst_stream; |
| 147 | int mode; | 147 | int mode; |
| 148 | int ret; | 148 | int ret; |
| 149 | 149 | ||
| 150 | if (strncmp(line, "begin-base64 ", 13) == 0) { | 150 | if (strncmp(line, "begin-base64 ", 13) == 0) { |
| 151 | line_ptr = line + 13; | 151 | line_ptr = line + 13; |
| 152 | decode_fn_ptr = read_base64; | 152 | decode_fn_ptr = read_base64; |
diff --git a/docs/busybox.net/FAQ.html b/docs/busybox.net/FAQ.html index c751f7521..c07be9027 100644 --- a/docs/busybox.net/FAQ.html +++ b/docs/busybox.net/FAQ.html | |||
| @@ -82,7 +82,7 @@ have additions to this FAQ document, we would love to add them, | |||
| 82 | to determine which applet to run, as shown above. | 82 | to determine which applet to run, as shown above. |
| 83 | </p> | 83 | </p> |
| 84 | <p> | 84 | <p> |
| 85 | BusyBox also has a feature called the | 85 | BusyBox also has a feature called the |
| 86 | <a name="standalone_shell">"standalone shell"</a>, where the busybox | 86 | <a name="standalone_shell">"standalone shell"</a>, where the busybox |
| 87 | shell runs any built-in applets before checking the command path. This | 87 | shell runs any built-in applets before checking the command path. This |
| 88 | feature is also enabled by "make allyesconfig", and to try it out run | 88 | feature is also enabled by "make allyesconfig", and to try it out run |
| @@ -261,7 +261,7 @@ within each applet. More build coverage testing.</p></li> | |||
| 261 | 261 | ||
| 262 | <hr /> | 262 | <hr /> |
| 263 | <p> | 263 | <p> |
| 264 | <h2><a name="external">where can i find other small utilities since busybox | 264 | <h2><a name="external">where can i find other small utilities since busybox |
| 265 | does not include the features i want?</a></h2> | 265 | does not include the features i want?</a></h2> |
| 266 | <p> | 266 | <p> |
| 267 | we maintain such a <a href="tinyutils.html">list</a> on this site! | 267 | we maintain such a <a href="tinyutils.html">list</a> on this site! |
| @@ -941,7 +941,7 @@ text console scrolling...)</p> | |||
| 941 | 941 | ||
| 942 | <p>So will data always be read from the far end of a pipe at the | 942 | <p>So will data always be read from the far end of a pipe at the |
| 943 | same chunk sizes it was written in? Nope. Don't rely on that. For one | 943 | same chunk sizes it was written in? Nope. Don't rely on that. For one |
| 944 | counterexample, see <a href="http://www.faqs.org/rfcs/rfc896.html">rfc 896 | 944 | counterexample, see <a href="http://www.faqs.org/rfcs/rfc896.html">rfc 896 |
| 945 | for Nagle's algorithm</a>, which waits a fraction of a second or so before | 945 | for Nagle's algorithm</a>, which waits a fraction of a second or so before |
| 946 | sending out small amounts of data through a TCP/IP connection in case more | 946 | sending out small amounts of data through a TCP/IP connection in case more |
| 947 | data comes in that can be merged into the same packet. (In case you were | 947 | data comes in that can be merged into the same packet. (In case you were |
| @@ -1089,7 +1089,7 @@ aaronl :Aaron Lehmann | |||
| 1089 | beppu :John Beppu | 1089 | beppu :John Beppu |
| 1090 | dwhedon :David Whedon | 1090 | dwhedon :David Whedon |
| 1091 | erik :Erik Andersen | 1091 | erik :Erik Andersen |
| 1092 | gfeldman :Gennady Feldman | 1092 | gfeldman :Gennady Feldman |
| 1093 | jimg :Jim Gleason | 1093 | jimg :Jim Gleason |
| 1094 | kraai :Matt Kraai | 1094 | kraai :Matt Kraai |
| 1095 | markw :Mark Whitley | 1095 | markw :Mark Whitley |
diff --git a/docs/busybox.net/news.html b/docs/busybox.net/news.html index 5492d6767..cdffd48eb 100644 --- a/docs/busybox.net/news.html +++ b/docs/busybox.net/news.html | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | <li>grep: added -r, fixed -h | 28 | <li>grep: added -r, fixed -h |
| 29 | <li>watch: make it exec child like standard one does (was totally | 29 | <li>watch: make it exec child like standard one does (was totally |
| 30 | incompatible) | 30 | incompatible) |
| 31 | <li>tar: fix limitations which were preventing bbox tar usage | 31 | <li>tar: fix limitations which were preventing bbox tar usage |
| 32 | on big directories: long names and linknames, pax headers | 32 | on big directories: long names and linknames, pax headers |
| 33 | (Linux kernel tarballs have that). Fixed a number of obscure bugs. | 33 | (Linux kernel tarballs have that). Fixed a number of obscure bugs. |
| 34 | Raised max file limit (now 64Gb). Security fixes (/../ attacks). | 34 | Raised max file limit (now 64Gb). Security fixes (/../ attacks). |
diff --git a/docs/sigint.htm b/docs/sigint.htm index 6fe76bbef..e230f4df7 100644 --- a/docs/sigint.htm +++ b/docs/sigint.htm | |||
| @@ -40,7 +40,7 @@ scripts using <code>Control-C</code>. Or have interactive applications | |||
| 40 | that don't behave right when sending SIGINT. Examples are emacs'es | 40 | that don't behave right when sending SIGINT. Examples are emacs'es |
| 41 | that die on Control-g or shellscript statements that sometimes are | 41 | that die on Control-g or shellscript statements that sometimes are |
| 42 | executed and sometimes not, apparently not determined by the user's | 42 | executed and sometimes not, apparently not determined by the user's |
| 43 | intention. | 43 | intention. |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | </td></tr><tr><th valign=top align=left>Required knowledge: </th> | 46 | </td></tr><tr><th valign=top align=left>Required knowledge: </th> |
| @@ -101,7 +101,7 @@ just exit. | |||
| 101 | 101 | ||
| 102 | <p>Now imagine the user hits C-c while a shellscript is executing its | 102 | <p>Now imagine the user hits C-c while a shellscript is executing its |
| 103 | first program. The following programs receive SIGINT: program1 and | 103 | first program. The following programs receive SIGINT: program1 and |
| 104 | also the shell executing the script. program1 exits. | 104 | also the shell executing the script. program1 exits. |
| 105 | 105 | ||
| 106 | <p>But what should the shell do? If we say that it is only the | 106 | <p>But what should the shell do? If we say that it is only the |
| 107 | innermost's programs business to react on SIGINT, the shell will do | 107 | innermost's programs business to react on SIGINT, the shell will do |
| @@ -351,7 +351,7 @@ that do not properly communicate the required information up to the | |||
| 351 | calling program. | 351 | calling program. |
| 352 | 352 | ||
| 353 | <p>Unless a program messes with signal handling, the system does this | 353 | <p>Unless a program messes with signal handling, the system does this |
| 354 | automatically. | 354 | automatically. |
| 355 | 355 | ||
| 356 | <p>There are programs that want to exit on SIGINT, but they don't let | 356 | <p>There are programs that want to exit on SIGINT, but they don't let |
| 357 | the system do the automatic exit, because they want to do some | 357 | the system do the automatic exit, because they want to do some |
| @@ -425,7 +425,7 @@ Notes: | |||
| 425 | special numeric value. People often assume this since the manuals for | 425 | special numeric value. People often assume this since the manuals for |
| 426 | shells often list some return value for exactly this. But this is just | 426 | shells often list some return value for exactly this. But this is just |
| 427 | a convention for your shell script. It does not work from one UNIX API | 427 | a convention for your shell script. It does not work from one UNIX API |
| 428 | program to another. | 428 | program to another. |
| 429 | 429 | ||
| 430 | <P>All that happens is that the shell sets the "$?" variable to a | 430 | <P>All that happens is that the shell sets the "$?" variable to a |
| 431 | special numeric value for the convenience of your script, because your | 431 | special numeric value for the convenience of your script, because your |
| @@ -571,7 +571,7 @@ comments the scripts echo. | |||
| 571 | <tr valign=top align=left> | 571 | <tr valign=top align=left> |
| 572 | <td>IUE</td> | 572 | <td>IUE</td> |
| 573 | <td>The shell executing a script exits immediately if it receives | 573 | <td>The shell executing a script exits immediately if it receives |
| 574 | SIGINT.</td> | 574 | SIGINT.</td> |
| 575 | <td>4.4BSD ash (ash), NetBSD, FreeBSD prior to 3.0/22.8</td> | 575 | <td>4.4BSD ash (ash), NetBSD, FreeBSD prior to 3.0/22.8</td> |
| 576 | <td>The editor session is lost and subsequent commands are not | 576 | <td>The editor session is lost and subsequent commands are not |
| 577 | executed.</td> | 577 | executed.</td> |
| @@ -605,7 +605,7 @@ will further commands from the script be executed. </td> | |||
| 605 | signal (either it had the default handler for SIGINT or it killed | 605 | signal (either it had the default handler for SIGINT or it killed |
| 606 | itself). </td> | 606 | itself). </td> |
| 607 | <td>bash (Linux /bin/sh), most commercial /bin/sh, FreeBSD /bin/sh | 607 | <td>bash (Linux /bin/sh), most commercial /bin/sh, FreeBSD /bin/sh |
| 608 | from 3.0/2.2.8.</td> | 608 | from 3.0/2.2.8.</td> |
| 609 | <td>The editor continues as normal and subsequent commands are | 609 | <td>The editor continues as normal and subsequent commands are |
| 610 | executed. </td> | 610 | executed. </td> |
| 611 | <td>The editor continues as normal and subsequent commands are | 611 | <td>The editor continues as normal and subsequent commands are |
| @@ -615,7 +615,7 @@ child exits, but only if the child exited with signal status. If | |||
| 615 | the child did a normal exit (even if it received SIGINT, but catches | 615 | the child did a normal exit (even if it received SIGINT, but catches |
| 616 | it), the script will continue. </td> | 616 | it), the script will continue. </td> |
| 617 | <td>The child must be implemented right, or the user will not be able | 617 | <td>The child must be implemented right, or the user will not be able |
| 618 | to break shell scripts reliably.</td> | 618 | to break shell scripts reliably.</td> |
| 619 | </tr> | 619 | </tr> |
| 620 | 620 | ||
| 621 | </table> | 621 | </table> |
diff --git a/docs/tar_pax.txt b/docs/tar_pax.txt index 8a3f1e755..e56c27b16 100644 --- a/docs/tar_pax.txt +++ b/docs/tar_pax.txt | |||
| @@ -4,197 +4,197 @@ for everything (filename, uid, filesize etc) which can overflow. | |||
| 4 | 4 | ||
| 5 | pax Header Block | 5 | pax Header Block |
| 6 | 6 | ||
| 7 | The pax header block shall be identical to the ustar header block | 7 | The pax header block shall be identical to the ustar header block |
| 8 | described in ustar Interchange Format, except that two additional | 8 | described in ustar Interchange Format, except that two additional |
| 9 | typeflag values are defined: | 9 | typeflag values are defined: |
| 10 | 10 | ||
| 11 | x | 11 | x |
| 12 | Represents extended header records for the following file in | 12 | Represents extended header records for the following file in |
| 13 | the archive (which shall have its own ustar header block). | 13 | the archive (which shall have its own ustar header block). |
| 14 | 14 | ||
| 15 | g | 15 | g |
| 16 | Represents global extended header records for the following | 16 | Represents global extended header records for the following |
| 17 | files in the archive. Each value shall affect all subsequent files | 17 | files in the archive. Each value shall affect all subsequent files |
| 18 | that do not override that value in their own extended header | 18 | that do not override that value in their own extended header |
| 19 | record and until another global extended header record is reached | 19 | record and until another global extended header record is reached |
| 20 | that provides another value for the same field. The typeflag g | 20 | that provides another value for the same field. The typeflag g |
| 21 | global headers should not be used with interchange media that | 21 | global headers should not be used with interchange media that |
| 22 | could suffer partial data loss in transporting the archive. | 22 | could suffer partial data loss in transporting the archive. |
| 23 | 23 | ||
| 24 | For both of these types, the size field shall be the size of the | 24 | For both of these types, the size field shall be the size of the |
| 25 | extended header records in octets. The other fields in the header | 25 | extended header records in octets. The other fields in the header |
| 26 | block are not meaningful to this version of the pax utility. | 26 | block are not meaningful to this version of the pax utility. |
| 27 | However, if this archive is read by a pax utility conforming to | 27 | However, if this archive is read by a pax utility conforming to |
| 28 | the ISO POSIX-2:1993 standard, the header block fields are used to | 28 | the ISO POSIX-2:1993 standard, the header block fields are used to |
| 29 | create a regular file that contains the extended header records as | 29 | create a regular file that contains the extended header records as |
| 30 | data. Therefore, header block field values should be selected to | 30 | data. Therefore, header block field values should be selected to |
| 31 | provide reasonable file access to this regular file. | 31 | provide reasonable file access to this regular file. |
| 32 | 32 | ||
| 33 | A further difference from the ustar header block is that data | 33 | A further difference from the ustar header block is that data |
| 34 | blocks for files of typeflag 1 (the digit one) (hard link) may be | 34 | blocks for files of typeflag 1 (the digit one) (hard link) may be |
| 35 | included, which means that the size field may be greater than | 35 | included, which means that the size field may be greater than |
| 36 | zero. | 36 | zero. |
| 37 | 37 | ||
| 38 | pax Extended Header | 38 | pax Extended Header |
| 39 | 39 | ||
| 40 | An extended header shall consist of one or more records, each | 40 | An extended header shall consist of one or more records, each |
| 41 | constructed as follows: | 41 | constructed as follows: |
| 42 | 42 | ||
| 43 | "%d %s=%s\n", <length>, <keyword>, <value> | 43 | "%d %s=%s\n", <length>, <keyword>, <value> |
| 44 | 44 | ||
| 45 | The <length> field shall be the decimal length of the extended | 45 | The <length> field shall be the decimal length of the extended |
| 46 | header record in octets, including length string itself and the | 46 | header record in octets, including length string itself and the |
| 47 | trailing <newline>. | 47 | trailing <newline>. |
| 48 | 48 | ||
| 49 | [skip] | 49 | [skip] |
| 50 | 50 | ||
| 51 | atime | 51 | atime |
| 52 | The file access time for the following file(s), equivalent to | 52 | The file access time for the following file(s), equivalent to |
| 53 | the value of the st_atime member of the stat structure for a file, | 53 | the value of the st_atime member of the stat structure for a file, |
| 54 | as described by the stat() function. The access time shall be | 54 | as described by the stat() function. The access time shall be |
| 55 | restored if the process has the appropriate privilege required to | 55 | restored if the process has the appropriate privilege required to |
| 56 | do so. The format of the <value> shall be as described in pax | 56 | do so. The format of the <value> shall be as described in pax |
| 57 | Extended Header File Times. | 57 | Extended Header File Times. |
| 58 | 58 | ||
| 59 | charset | 59 | charset |
| 60 | The name of the character set used to encode the data in the | 60 | The name of the character set used to encode the data in the |
| 61 | following file(s). | 61 | following file(s). |
| 62 | 62 | ||
| 63 | The encoding is included in an extended header for information | 63 | The encoding is included in an extended header for information |
| 64 | only; when pax is used as described in IEEE Std 1003.1-2001, it | 64 | only; when pax is used as described in IEEE Std 1003.1-2001, it |
| 65 | shall not translate the file data into any other encoding. The | 65 | shall not translate the file data into any other encoding. The |
| 66 | BINARY entry indicates unencoded binary data. | 66 | BINARY entry indicates unencoded binary data. |
| 67 | 67 | ||
| 68 | When used in write or copy mode, it is implementation-defined | 68 | When used in write or copy mode, it is implementation-defined |
| 69 | whether pax includes a charset extended header record for a file. | 69 | whether pax includes a charset extended header record for a file. |
| 70 | 70 | ||
| 71 | comment | 71 | comment |
| 72 | A series of characters used as a comment. All characters in | 72 | A series of characters used as a comment. All characters in |
| 73 | the <value> field shall be ignored by pax. | 73 | the <value> field shall be ignored by pax. |
| 74 | 74 | ||
| 75 | gid | 75 | gid |
| 76 | The group ID of the group that owns the file, expressed as a | 76 | The group ID of the group that owns the file, expressed as a |
| 77 | decimal number using digits from the ISO/IEC 646:1991 standard. | 77 | decimal number using digits from the ISO/IEC 646:1991 standard. |
| 78 | This record shall override the gid field in the following header | 78 | This record shall override the gid field in the following header |
| 79 | block(s). When used in write or copy mode, pax shall include a gid | 79 | block(s). When used in write or copy mode, pax shall include a gid |
| 80 | extended header record for each file whose group ID is greater | 80 | extended header record for each file whose group ID is greater |
| 81 | than 2097151 (octal 7777777). | 81 | than 2097151 (octal 7777777). |
| 82 | 82 | ||
| 83 | gname | 83 | gname |
| 84 | The group of the file(s), formatted as a group name in the | 84 | The group of the file(s), formatted as a group name in the |
| 85 | group database. This record shall override the gid and gname | 85 | group database. This record shall override the gid and gname |
| 86 | fields in the following header block(s), and any gid extended | 86 | fields in the following header block(s), and any gid extended |
| 87 | header record. When used in read, copy, or list mode, pax shall | 87 | header record. When used in read, copy, or list mode, pax shall |
| 88 | translate the name from the UTF-8 encoding in the header record to | 88 | translate the name from the UTF-8 encoding in the header record to |
| 89 | the character set appropriate for the group database on the | 89 | the character set appropriate for the group database on the |
| 90 | receiving system. If any of the UTF-8 characters cannot be | 90 | receiving system. If any of the UTF-8 characters cannot be |
| 91 | translated, and if the -o invalid= UTF-8 option is not specified, | 91 | translated, and if the -o invalid= UTF-8 option is not specified, |
| 92 | the results are implementation-defined. When used in write or copy | 92 | the results are implementation-defined. When used in write or copy |
| 93 | mode, pax shall include a gname extended header record for each | 93 | mode, pax shall include a gname extended header record for each |
| 94 | file whose group name cannot be represented entirely with the | 94 | file whose group name cannot be represented entirely with the |
| 95 | letters and digits of the portable character set. | 95 | letters and digits of the portable character set. |
| 96 | 96 | ||
| 97 | linkpath | 97 | linkpath |
| 98 | The pathname of a link being created to another file, of any | 98 | The pathname of a link being created to another file, of any |
| 99 | type, previously archived. This record shall override the linkname | 99 | type, previously archived. This record shall override the linkname |
| 100 | field in the following ustar header block(s). The following ustar | 100 | field in the following ustar header block(s). The following ustar |
| 101 | header block shall determine the type of link created. If typeflag | 101 | header block shall determine the type of link created. If typeflag |
| 102 | of the following header block is 1, it shall be a hard link. If | 102 | of the following header block is 1, it shall be a hard link. If |
| 103 | typeflag is 2, it shall be a symbolic link and the linkpath value | 103 | typeflag is 2, it shall be a symbolic link and the linkpath value |
| 104 | shall be the contents of the symbolic link. The pax utility shall | 104 | shall be the contents of the symbolic link. The pax utility shall |
| 105 | translate the name of the link (contents of the symbolic link) | 105 | translate the name of the link (contents of the symbolic link) |
| 106 | from the UTF-8 encoding to the character set appropriate for the | 106 | from the UTF-8 encoding to the character set appropriate for the |
| 107 | local file system. When used in write or copy mode, pax shall | 107 | local file system. When used in write or copy mode, pax shall |
| 108 | include a linkpath extended header record for each link whose | 108 | include a linkpath extended header record for each link whose |
| 109 | pathname cannot be represented entirely with the members of the | 109 | pathname cannot be represented entirely with the members of the |
| 110 | portable character set other than NUL. | 110 | portable character set other than NUL. |
| 111 | 111 | ||
| 112 | mtime | 112 | mtime |
| 113 | The file modification time of the following file(s), | 113 | The file modification time of the following file(s), |
| 114 | equivalent to the value of the st_mtime member of the stat | 114 | equivalent to the value of the st_mtime member of the stat |
| 115 | structure for a file, as described in the stat() function. This | 115 | structure for a file, as described in the stat() function. This |
| 116 | record shall override the mtime field in the following header | 116 | record shall override the mtime field in the following header |
| 117 | block(s). The modification time shall be restored if the process | 117 | block(s). The modification time shall be restored if the process |
| 118 | has the appropriate privilege required to do so. The format of the | 118 | has the appropriate privilege required to do so. The format of the |
| 119 | <value> shall be as described in pax Extended Header File Times. | 119 | <value> shall be as described in pax Extended Header File Times. |
| 120 | 120 | ||
| 121 | path | 121 | path |
| 122 | The pathname of the following file(s). This record shall | 122 | The pathname of the following file(s). This record shall |
| 123 | override the name and prefix fields in the following header | 123 | override the name and prefix fields in the following header |
| 124 | block(s). The pax utility shall translate the pathname of the file | 124 | block(s). The pax utility shall translate the pathname of the file |
| 125 | from the UTF-8 encoding to the character set appropriate for the | 125 | from the UTF-8 encoding to the character set appropriate for the |
| 126 | local file system. | 126 | local file system. |
| 127 | 127 | ||
| 128 | When used in write or copy mode, pax shall include a path | 128 | When used in write or copy mode, pax shall include a path |
| 129 | extended header record for each file whose pathname cannot be | 129 | extended header record for each file whose pathname cannot be |
| 130 | represented entirely with the members of the portable character | 130 | represented entirely with the members of the portable character |
| 131 | set other than NUL. | 131 | set other than NUL. |
| 132 | 132 | ||
| 133 | realtime.any | 133 | realtime.any |
| 134 | The keywords prefixed by "realtime." are reserved for future | 134 | The keywords prefixed by "realtime." are reserved for future |
| 135 | standardization. | 135 | standardization. |
| 136 | 136 | ||
| 137 | security.any | 137 | security.any |
| 138 | The keywords prefixed by "security." are reserved for future | 138 | The keywords prefixed by "security." are reserved for future |
| 139 | standardization. | 139 | standardization. |
| 140 | 140 | ||
| 141 | size | 141 | size |
| 142 | The size of the file in octets, expressed as a decimal number | 142 | The size of the file in octets, expressed as a decimal number |
| 143 | using digits from the ISO/IEC 646:1991 standard. This record shall | 143 | using digits from the ISO/IEC 646:1991 standard. This record shall |
| 144 | override the size field in the following header block(s). When | 144 | override the size field in the following header block(s). When |
| 145 | used in write or copy mode, pax shall include a size extended | 145 | used in write or copy mode, pax shall include a size extended |
| 146 | header record for each file with a size value greater than | 146 | header record for each file with a size value greater than |
| 147 | 8589934591 (octal 77777777777). | 147 | 8589934591 (octal 77777777777). |
| 148 | 148 | ||
| 149 | uid | 149 | uid |
| 150 | The user ID of the file owner, expressed as a decimal number | 150 | The user ID of the file owner, expressed as a decimal number |
| 151 | using digits from the ISO/IEC 646:1991 standard. This record shall | 151 | using digits from the ISO/IEC 646:1991 standard. This record shall |
| 152 | override the uid field in the following header block(s). When used | 152 | override the uid field in the following header block(s). When used |
| 153 | in write or copy mode, pax shall include a uid extended header | 153 | in write or copy mode, pax shall include a uid extended header |
| 154 | record for each file whose owner ID is greater than 2097151 (octal | 154 | record for each file whose owner ID is greater than 2097151 (octal |
| 155 | 7777777). | 155 | 7777777). |
| 156 | 156 | ||
| 157 | uname | 157 | uname |
| 158 | The owner of the following file(s), formatted as a user name | 158 | The owner of the following file(s), formatted as a user name |
| 159 | in the user database. This record shall override the uid and uname | 159 | in the user database. This record shall override the uid and uname |
| 160 | fields in the following header block(s), and any uid extended | 160 | fields in the following header block(s), and any uid extended |
| 161 | header record. When used in read, copy, or list mode, pax shall | 161 | header record. When used in read, copy, or list mode, pax shall |
| 162 | translate the name from the UTF-8 encoding in the header record to | 162 | translate the name from the UTF-8 encoding in the header record to |
| 163 | the character set appropriate for the user database on the | 163 | the character set appropriate for the user database on the |
| 164 | receiving system. If any of the UTF-8 characters cannot be | 164 | receiving system. If any of the UTF-8 characters cannot be |
| 165 | translated, and if the -o invalid= UTF-8 option is not specified, | 165 | translated, and if the -o invalid= UTF-8 option is not specified, |
| 166 | the results are implementation-defined. When used in write or copy | 166 | the results are implementation-defined. When used in write or copy |
| 167 | mode, pax shall include a uname extended header record for each | 167 | mode, pax shall include a uname extended header record for each |
| 168 | file whose user name cannot be represented entirely with the | 168 | file whose user name cannot be represented entirely with the |
| 169 | letters and digits of the portable character set. | 169 | letters and digits of the portable character set. |
| 170 | 170 | ||
| 171 | If the <value> field is zero length, it shall delete any header | 171 | If the <value> field is zero length, it shall delete any header |
| 172 | block field, previously entered extended header value, or global | 172 | block field, previously entered extended header value, or global |
| 173 | extended header value of the same name. | 173 | extended header value of the same name. |
| 174 | 174 | ||
| 175 | If a keyword in an extended header record (or in a -o | 175 | If a keyword in an extended header record (or in a -o |
| 176 | option-argument) overrides or deletes a corresponding field in the | 176 | option-argument) overrides or deletes a corresponding field in the |
| 177 | ustar header block, pax shall ignore the contents of that header | 177 | ustar header block, pax shall ignore the contents of that header |
| 178 | block field. | 178 | block field. |
| 179 | 179 | ||
| 180 | Unlike the ustar header block fields, NULs shall not delimit | 180 | Unlike the ustar header block fields, NULs shall not delimit |
| 181 | <value>s; all characters within the <value> field shall be | 181 | <value>s; all characters within the <value> field shall be |
| 182 | considered data for the field. None of the length limitations of | 182 | considered data for the field. None of the length limitations of |
| 183 | the ustar header block fields in ustar Header Block shall apply to | 183 | the ustar header block fields in ustar Header Block shall apply to |
| 184 | the extended header records. | 184 | the extended header records. |
| 185 | 185 | ||
| 186 | pax Extended Header File Times | 186 | pax Extended Header File Times |
| 187 | 187 | ||
| 188 | Time records shall be formatted as a decimal representation of the | 188 | Time records shall be formatted as a decimal representation of the |
| 189 | time in seconds since the Epoch. If a period ( '.' ) decimal point | 189 | time in seconds since the Epoch. If a period ( '.' ) decimal point |
| 190 | character is present, the digits to the right of the point shall | 190 | character is present, the digits to the right of the point shall |
| 191 | represent the units of a subsecond timing granularity. In read or | 191 | represent the units of a subsecond timing granularity. In read or |
| 192 | copy mode, the pax utility shall truncate the time of a file to | 192 | copy mode, the pax utility shall truncate the time of a file to |
| 193 | the greatest value that is not greater than the input header | 193 | the greatest value that is not greater than the input header |
| 194 | file time. In write or copy mode, the pax utility shall output a | 194 | file time. In write or copy mode, the pax utility shall output a |
| 195 | time exactly if it can be represented exactly as a decimal number, | 195 | time exactly if it can be represented exactly as a decimal number, |
| 196 | and otherwise shall generate only enough digits so that the same | 196 | and otherwise shall generate only enough digits so that the same |
| 197 | time shall be recovered if the file is extracted on a system whose | 197 | time shall be recovered if the file is extracted on a system whose |
| 198 | underlying implementation supports the same time granularity. | 198 | underlying implementation supports the same time granularity. |
| 199 | 199 | ||
| 200 | Example from Linux kernel archive tarball: | 200 | Example from Linux kernel archive tarball: |
diff --git a/e2fsprogs/old_e2fsprogs/blkid/probe.h b/e2fsprogs/old_e2fsprogs/blkid/probe.h index 78f796419..0fd16a771 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/probe.h +++ b/e2fsprogs/old_e2fsprogs/blkid/probe.h | |||
| @@ -238,7 +238,7 @@ struct ocfs_volume_header { | |||
| 238 | 238 | ||
| 239 | struct ocfs_volume_label { | 239 | struct ocfs_volume_label { |
| 240 | unsigned char disk_lock[48]; | 240 | unsigned char disk_lock[48]; |
| 241 | char label[64]; | 241 | char label[64]; |
| 242 | unsigned char label_len[2]; | 242 | unsigned char label_len[2]; |
| 243 | unsigned char vol_id[16]; | 243 | unsigned char vol_id[16]; |
| 244 | unsigned char vol_id_len[2]; | 244 | unsigned char vol_id_len[2]; |
diff --git a/editors/awk.c b/editors/awk.c index f8b26662a..9ed2781be 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
| @@ -1930,11 +1930,11 @@ static var *exec_builtin(node *op, var *res) | |||
| 1930 | s[n] = '\0'; | 1930 | s[n] = '\0'; |
| 1931 | setvar_p(res, s); | 1931 | setvar_p(res, s); |
| 1932 | break; | 1932 | break; |
| 1933 | 1933 | ||
| 1934 | case B_an: | 1934 | case B_an: |
| 1935 | setvar_i(res, (long)getvar_i(av[0]) & (long)getvar_i(av[1])); | 1935 | setvar_i(res, (long)getvar_i(av[0]) & (long)getvar_i(av[1])); |
| 1936 | break; | 1936 | break; |
| 1937 | 1937 | ||
| 1938 | case B_co: | 1938 | case B_co: |
| 1939 | setvar_i(res, ~(long)getvar_i(av[0])); | 1939 | setvar_i(res, ~(long)getvar_i(av[0])); |
| 1940 | break; | 1940 | break; |
diff --git a/include/libbb.h b/include/libbb.h index c4d187e00..704f34e56 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * | 4 | * |
| 5 | * Based in part on code from sash, Copyright (c) 1999 by David I. Bell | 5 | * Based in part on code from sash, Copyright (c) 1999 by David I. Bell |
| 6 | * Permission has been granted to redistribute this code under the GPL. | 6 | * Permission has been granted to redistribute this code under the GPL. |
| 7 | * | 7 | * |
| 8 | * Licensed under the GPL version 2, see the file LICENSE in this tarball. | 8 | * Licensed under the GPL version 2, see the file LICENSE in this tarball. |
| 9 | */ | 9 | */ |
| 10 | #ifndef __LIBBUSYBOX_H__ | 10 | #ifndef __LIBBUSYBOX_H__ |
diff --git a/libbb/copy_file.c b/libbb/copy_file.c index 0135831fe..632064eaa 100644 --- a/libbb/copy_file.c +++ b/libbb/copy_file.c | |||
| @@ -144,7 +144,7 @@ int copy_file(const char *source, const char *dest, int flags) | |||
| 144 | 144 | ||
| 145 | } else if (S_ISREG(source_stat.st_mode) | 145 | } else if (S_ISREG(source_stat.st_mode) |
| 146 | // Huh? DEREF uses stat, which never returns links IIRC... | 146 | // Huh? DEREF uses stat, which never returns links IIRC... |
| 147 | || (FLAGS_DEREF && S_ISLNK(source_stat.st_mode)) | 147 | || (FLAGS_DEREF && S_ISLNK(source_stat.st_mode)) |
| 148 | ) { | 148 | ) { |
| 149 | int src_fd; | 149 | int src_fd; |
| 150 | int dst_fd; | 150 | int dst_fd; |
diff --git a/libbb/copyfd.c b/libbb/copyfd.c index 17bf4fbc2..0d0ec2232 100644 --- a/libbb/copyfd.c +++ b/libbb/copyfd.c | |||
| @@ -60,7 +60,7 @@ static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size) | |||
| 60 | size -= rd; | 60 | size -= rd; |
| 61 | if (!size) { | 61 | if (!size) { |
| 62 | /* 'size' bytes copied - all done */ | 62 | /* 'size' bytes copied - all done */ |
| 63 | status = 0; | 63 | status = 0; |
| 64 | break; | 64 | break; |
| 65 | } | 65 | } |
| 66 | } | 66 | } |
diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c index a27693f66..5078f49ea 100644 --- a/libbb/get_line_from_file.c +++ b/libbb/get_line_from_file.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | #include "libbb.h" | 12 | #include "libbb.h" |
| 13 | 13 | ||
| 14 | /* This function reads an entire line from a text file, up to a newline | 14 | /* This function reads an entire line from a text file, up to a newline |
| 15 | * or NUL byte, inclusive. It returns a malloc'ed char * which must be | 15 | * or NUL byte, inclusive. It returns a malloc'ed char * which must be |
| 16 | * stored and free'ed by the caller. If end is null '\n' isn't considered | 16 | * stored and free'ed by the caller. If end is null '\n' isn't considered |
| 17 | * end of line. If end isn't null, length of the chunk read is stored in it. */ | 17 | * end of line. If end isn't null, length of the chunk read is stored in it. */ |
diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 50343fdab..f93438df0 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c | |||
| @@ -79,7 +79,7 @@ const struct option *applet_long_options | |||
| 79 | (see getopt(3)) | 79 | (see getopt(3)) |
| 80 | 80 | ||
| 81 | static const struct option applet_long_options[] = { | 81 | static const struct option applet_long_options[] = { |
| 82 | //name,has_arg,flag,val | 82 | //name,has_arg,flag,val |
| 83 | { "verbose", 0, 0, 'v' }, | 83 | { "verbose", 0, 0, 'v' }, |
| 84 | { 0, 0, 0, 0 } | 84 | { 0, 0, 0, 0 } |
| 85 | }; | 85 | }; |
diff --git a/libbb/procps.c b/libbb/procps.c index 017710ff4..a799bf927 100644 --- a/libbb/procps.c +++ b/libbb/procps.c | |||
| @@ -141,7 +141,7 @@ procps_status_t* procps_scan(procps_status_t* sp, int flags) | |||
| 141 | sp->uid = sb.st_uid; | 141 | sp->uid = sb.st_uid; |
| 142 | sp->gid = sb.st_gid; | 142 | sp->gid = sb.st_gid; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | if (flags & PSSCAN_STAT) { | 145 | if (flags & PSSCAN_STAT) { |
| 146 | char *cp; | 146 | char *cp; |
| 147 | /* see proc(5) for some details on this */ | 147 | /* see proc(5) for some details on this */ |
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index 121a3dffd..25a87b88e 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c | |||
| @@ -33,7 +33,7 @@ static int true_action(const char *fileName, struct stat *statbuf, void* userDat | |||
| 33 | * | 33 | * |
| 34 | * if !depthFirst, dirAction return value of 0 (FALSE) or 2 (SKIP) | 34 | * if !depthFirst, dirAction return value of 0 (FALSE) or 2 (SKIP) |
| 35 | * prevents recursion into that directory, instead | 35 | * prevents recursion into that directory, instead |
| 36 | * recursive_action() returns 0 (if FALSE) or 1 (if SKIP). | 36 | * recursive_action() returns 0 (if FALSE) or 1 (if SKIP). |
| 37 | * | 37 | * |
| 38 | * followLinks=0/1 differs mainly in handling of links to dirs. | 38 | * followLinks=0/1 differs mainly in handling of links to dirs. |
| 39 | * 0: lstat(statbuf). Calls fileAction on link name even if points to dir. | 39 | * 0: lstat(statbuf). Calls fileAction on link name even if points to dir. |
diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 5766e5de3..ea0b89a9b 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c | |||
| @@ -115,7 +115,7 @@ static int adduser(struct passwd *p, unsigned long flags) | |||
| 115 | fseek(file, 0, SEEK_END); | 115 | fseek(file, 0, SEEK_END); |
| 116 | fprintf(file, "%s:!:%ld:%d:%d:%d:::\n", | 116 | fprintf(file, "%s:!:%ld:%d:%d:%d:::\n", |
| 117 | p->pw_name, /* username */ | 117 | p->pw_name, /* username */ |
| 118 | time(NULL) / 86400, /* sp->sp_lstchg */ | 118 | time(NULL) / 86400, /* sp->sp_lstchg */ |
| 119 | 0, /* sp->sp_min */ | 119 | 0, /* sp->sp_min */ |
| 120 | 99999, /* sp->sp_max */ | 120 | 99999, /* sp->sp_max */ |
| 121 | 7); /* sp->sp_warn */ | 121 | 7); /* sp->sp_warn */ |
diff --git a/loginutils/deluser.c b/loginutils/deluser.c index 869b22013..d07fd22ac 100644 --- a/loginutils/deluser.c +++ b/loginutils/deluser.c | |||
| @@ -19,7 +19,7 @@ static void del_line_matching(const char *login, const char *filename) | |||
| 19 | int len = strlen(login); | 19 | int len = strlen(login); |
| 20 | int found = 0; | 20 | int found = 0; |
| 21 | llist_t *plist = NULL; | 21 | llist_t *plist = NULL; |
| 22 | 22 | ||
| 23 | passwd = fopen_or_warn(filename, "r"); | 23 | passwd = fopen_or_warn(filename, "r"); |
| 24 | if (!passwd) return; | 24 | if (!passwd) return; |
| 25 | 25 | ||
diff --git a/networking/dnsd.c b/networking/dnsd.c index 6f1ec0ea4..1fb9ccfe5 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
| @@ -230,7 +230,7 @@ static int table_lookup(uint16_t type, uint8_t * as, uint8_t * qs) | |||
| 230 | char *p,*q; | 230 | char *p,*q; |
| 231 | q = (char *)&(qs[1]); | 231 | q = (char *)&(qs[1]); |
| 232 | p = &(d->name[1]); | 232 | p = &(d->name[1]); |
| 233 | fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d", | 233 | fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d", |
| 234 | __FUNCTION__, strlen(p), (int)(d->name[0]), p, q, strlen(q)); | 234 | __FUNCTION__, strlen(p), (int)(d->name[0]), p, q, strlen(q)); |
| 235 | #endif | 235 | #endif |
| 236 | if (type == REQ_A) { /* search by host name */ | 236 | if (type == REQ_A) { /* search by host name */ |
| @@ -247,7 +247,7 @@ static int table_lookup(uint16_t type, uint8_t * as, uint8_t * qs) | |||
| 247 | #endif | 247 | #endif |
| 248 | return 0; | 248 | return 0; |
| 249 | } | 249 | } |
| 250 | } else | 250 | } else |
| 251 | if (type == REQ_PTR) { /* search by IP-address */ | 251 | if (type == REQ_PTR) { /* search by IP-address */ |
| 252 | if (!strncmp((char*)&d->rip[1], (char*)&qs[1], strlen(d->rip)-1)) { | 252 | if (!strncmp((char*)&d->rip[1], (char*)&qs[1], strlen(d->rip)-1)) { |
| 253 | strcpy((char *)as, d->name); | 253 | strcpy((char *)as, d->name); |
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c index 8967a7a38..7eac48065 100644 --- a/networking/fakeidentd.c +++ b/networking/fakeidentd.c | |||
| @@ -240,68 +240,68 @@ int fakeidentd_main(int argc, char **argv) | |||
| 240 | 240 | ||
| 241 | /* main loop where we process all events and never exit */ | 241 | /* main loop where we process all events and never exit */ |
| 242 | while (1) { | 242 | while (1) { |
| 243 | fd_set rfds = G.readfds; | 243 | fd_set rfds = G.readfds; |
| 244 | struct timeval tv = { 15, 0 }; | 244 | struct timeval tv = { 15, 0 }; |
| 245 | int i; | 245 | int i; |
| 246 | int tim = time(NULL); | 246 | int tim = time(NULL); |
| 247 | 247 | ||
| 248 | select(G.conncnt + FCS, &rfds, NULL, NULL, G.conncnt? &tv: NULL); | 248 | select(G.conncnt + FCS, &rfds, NULL, NULL, G.conncnt? &tv: NULL); |
| 249 | 249 | ||
| 250 | for (i = G.conncnt - 1; i >= 0; i--) { | 250 | for (i = G.conncnt - 1; i >= 0; i--) { |
| 251 | int s = i + FCS; | 251 | int s = i + FCS; |
| 252 | 252 | ||
| 253 | if (FD_ISSET(s, &rfds)) { | 253 | if (FD_ISSET(s, &rfds)) { |
| 254 | char *buf = conns[i].buf; | 254 | char *buf = conns[i].buf; |
| 255 | unsigned int len = conns[i].len; | 255 | unsigned int len = conns[i].len; |
| 256 | unsigned int l; | 256 | unsigned int l; |
| 257 | 257 | ||
| 258 | if ((l = read(s, buf + len, sizeof(conns[0].buf) - len)) > 0) { | 258 | if ((l = read(s, buf + len, sizeof(conns[0].buf) - len)) > 0) { |
| 259 | if (checkInput(buf, len, l)) { | 259 | if (checkInput(buf, len, l)) { |
| 260 | reply(s, buf); | 260 | reply(s, buf); |
| 261 | goto deleteconn; | 261 | goto deleteconn; |
| 262 | } else if (len + l >= sizeof(conns[0].buf)) { | 262 | } else if (len + l >= sizeof(conns[0].buf)) { |
| 263 | replyError(s, "X-INVALID-REQUEST"); | 263 | replyError(s, "X-INVALID-REQUEST"); |
| 264 | goto deleteconn; | 264 | goto deleteconn; |
| 265 | } else { | ||
| 266 | conns[i].len += l; | ||
| 267 | } | ||
| 265 | } else { | 268 | } else { |
| 266 | conns[i].len += l; | 269 | goto deleteconn; |
| 267 | } | 270 | } |
| 268 | } else { | ||
| 269 | goto deleteconn; | ||
| 270 | } | ||
| 271 | 271 | ||
| 272 | conns[i].lasttime = tim; | 272 | conns[i].lasttime = tim; |
| 273 | continue; | 273 | continue; |
| 274 | 274 | ||
| 275 | deleteconn: | 275 | deleteconn: |
| 276 | deleteConn(s); | ||
| 277 | } else { | ||
| 278 | /* implement as time_after() in linux kernel sources ... */ | ||
| 279 | if (conns[i].lasttime + MAXIDLETIME <= tim) { | ||
| 280 | replyError(s, "X-TIMEOUT"); | ||
| 281 | deleteConn(s); | 276 | deleteConn(s); |
| 277 | } else { | ||
| 278 | /* implement as time_after() in linux kernel sources ... */ | ||
| 279 | if (conns[i].lasttime + MAXIDLETIME <= tim) { | ||
| 280 | replyError(s, "X-TIMEOUT"); | ||
| 281 | deleteConn(s); | ||
| 282 | } | ||
| 282 | } | 283 | } |
| 283 | } | 284 | } |
| 284 | } | ||
| 285 | 285 | ||
| 286 | if (FD_ISSET(0, &rfds)) { | 286 | if (FD_ISSET(0, &rfds)) { |
| 287 | int s = accept(0, NULL, 0); | 287 | int s = accept(0, NULL, 0); |
| 288 | 288 | ||
| 289 | if (s < 0) { | 289 | if (s < 0) { |
| 290 | if (errno != EINTR) /* EINTR */ | 290 | if (errno != EINTR) /* EINTR */ |
| 291 | bb_perror_msg("accept"); | 291 | bb_perror_msg("accept"); |
| 292 | } else { | 292 | } else { |
| 293 | if (G.conncnt == MAXCONNS) | 293 | if (G.conncnt == MAXCONNS) |
| 294 | i = closeOldest(); | 294 | i = closeOldest(); |
| 295 | else | 295 | else |
| 296 | i = G.conncnt++; | 296 | i = G.conncnt++; |
| 297 | 297 | ||
| 298 | movefd(s, i + FCS); /* move if not already there */ | 298 | movefd(s, i + FCS); /* move if not already there */ |
| 299 | FD_SET(i + FCS, &G.readfds); | 299 | FD_SET(i + FCS, &G.readfds); |
| 300 | 300 | ||
| 301 | conns[i].len = 0; | 301 | conns[i].len = 0; |
| 302 | conns[i].lasttime = time(NULL); | 302 | conns[i].lasttime = time(NULL); |
| 303 | } | ||
| 303 | } | 304 | } |
| 304 | } | ||
| 305 | } /* end of while (1) */ | 305 | } /* end of while (1) */ |
| 306 | 306 | ||
| 307 | return 0; | 307 | return 0; |
diff --git a/networking/httpd.c b/networking/httpd.c index da33146de..818590f78 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
| @@ -715,7 +715,7 @@ static char *decodeString(char *orig, int option_d) | |||
| 715 | } | 715 | } |
| 716 | value1 = value1 * 16 + value2; | 716 | value1 = value1 * 16 + value2; |
| 717 | if (!option_d && (value1 == '/' || value1 == '\0')) { | 717 | if (!option_d && (value1 == '/' || value1 == '\0')) { |
| 718 | /* caller takes it as indication of invalid | 718 | /* caller takes it as indication of invalid |
| 719 | * (dangerous wrt exploits) chars */ | 719 | * (dangerous wrt exploits) chars */ |
| 720 | return orig + 1; | 720 | return orig + 1; |
| 721 | } | 721 | } |
| @@ -998,7 +998,7 @@ static int sendCgi(const char *url, | |||
| 998 | pid = fork(); | 998 | pid = fork(); |
| 999 | if (pid < 0) | 999 | if (pid < 0) |
| 1000 | return 0; | 1000 | return 0; |
| 1001 | 1001 | ||
| 1002 | if (!pid) { | 1002 | if (!pid) { |
| 1003 | /* child process */ | 1003 | /* child process */ |
| 1004 | char *script; | 1004 | char *script; |
diff --git a/networking/interface.c b/networking/interface.c index 6d23e9bfc..d47059220 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
| @@ -116,7 +116,7 @@ static int INET_getsock(char *bufp, struct sockaddr *sap) | |||
| 116 | sock_in = (struct sockaddr_in *) sap; | 116 | sock_in = (struct sockaddr_in *) sap; |
| 117 | sock_in->sin_family = AF_INET; | 117 | sock_in->sin_family = AF_INET; |
| 118 | sock_in->sin_port = 0; | 118 | sock_in->sin_port = 0; |
| 119 | 119 | ||
| 120 | val = 0; | 120 | val = 0; |
| 121 | bp = (char *) &val; | 121 | bp = (char *) &val; |
| 122 | for (i = 0; i < sizeof(sock_in->sin_addr.s_addr); i++) { | 122 | for (i = 0; i < sizeof(sock_in->sin_addr.s_addr); i++) { |
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 2ff99570e..c4c3fc2ca 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
| @@ -562,7 +562,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) | |||
| 562 | if (matches(*argv, "cache") == 0) { | 562 | if (matches(*argv, "cache") == 0) { |
| 563 | filter.tb = -1; | 563 | filter.tb = -1; |
| 564 | #if 0 && ENABLE_FEATURE_IP_RULE | 564 | #if 0 && ENABLE_FEATURE_IP_RULE |
| 565 | 565 | ||
| 566 | #else | 566 | #else |
| 567 | } else if (matches(*argv, "main") != 0) { | 567 | } else if (matches(*argv, "main") != 0) { |
| 568 | invarg(*argv, "table"); | 568 | invarg(*argv, "table"); |
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index a14fa4e42..f429763eb 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c | |||
| @@ -169,7 +169,7 @@ int ll_name_to_index(char *name) | |||
| 169 | * to the reader... Jean II */ | 169 | * to the reader... Jean II */ |
| 170 | return ifr.ifr_ifindex; | 170 | return ifr.ifr_ifindex; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | return 0; | 173 | return 0; |
| 174 | } | 174 | } |
| 175 | 175 | ||
diff --git a/networking/nslookup.c b/networking/nslookup.c index cc5ff95d6..4beecc63b 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | * $ nslookup yahoo.com | 23 | * $ nslookup yahoo.com |
| 24 | * Server: 128.193.0.10 | 24 | * Server: 128.193.0.10 |
| 25 | * Address: 128.193.0.10#53 | 25 | * Address: 128.193.0.10#53 |
| 26 | * | 26 | * |
| 27 | * Non-authoritative answer: | 27 | * Non-authoritative answer: |
| 28 | * Name: yahoo.com | 28 | * Name: yahoo.com |
| 29 | * Address: 216.109.112.135 | 29 | * Address: 216.109.112.135 |
| @@ -33,11 +33,11 @@ | |||
| 33 | * $ nslookup 204.152.191.37 | 33 | * $ nslookup 204.152.191.37 |
| 34 | * Server: 128.193.4.20 | 34 | * Server: 128.193.4.20 |
| 35 | * Address: 128.193.4.20#53 | 35 | * Address: 128.193.4.20#53 |
| 36 | * | 36 | * |
| 37 | * Non-authoritative answer: | 37 | * Non-authoritative answer: |
| 38 | * 37.191.152.204.in-addr.arpa canonical name = 37.32-27.191.152.204.in-addr.arpa. | 38 | * 37.191.152.204.in-addr.arpa canonical name = 37.32-27.191.152.204.in-addr.arpa. |
| 39 | * 37.32-27.191.152.204.in-addr.arpa name = zeus-pub2.kernel.org. | 39 | * 37.32-27.191.152.204.in-addr.arpa name = zeus-pub2.kernel.org. |
| 40 | * | 40 | * |
| 41 | * Authoritative answers can be found from: | 41 | * Authoritative answers can be found from: |
| 42 | * 32-27.191.152.204.in-addr.arpa nameserver = ns1.kernel.org. | 42 | * 32-27.191.152.204.in-addr.arpa nameserver = ns1.kernel.org. |
| 43 | * 32-27.191.152.204.in-addr.arpa nameserver = ns2.kernel.org. | 43 | * 32-27.191.152.204.in-addr.arpa nameserver = ns2.kernel.org. |
diff --git a/networking/ping6.c b/networking/ping6.c index fd18cc877..5cb02f51a 100644 --- a/networking/ping6.c +++ b/networking/ping6.c | |||
| @@ -420,7 +420,7 @@ int ping6_main(int argc, char **argv) | |||
| 420 | datalen = DEFDATALEN; /* initialized here rather than in global scope to work around gcc bug */ | 420 | datalen = DEFDATALEN; /* initialized here rather than in global scope to work around gcc bug */ |
| 421 | 421 | ||
| 422 | /* exactly one argument needed, -v and -q don't mix */ | 422 | /* exactly one argument needed, -v and -q don't mix */ |
| 423 | opt_complementary = "=1:q--v:v--q"; | 423 | opt_complementary = "=1:q--v:v--q"; |
| 424 | getopt32(argc, argv, OPT_STRING, &opt_c, &opt_s, &opt_I); | 424 | getopt32(argc, argv, OPT_STRING, &opt_c, &opt_s, &opt_I); |
| 425 | if (option_mask32 & 4) pingcount = xatoul(opt_c); // -c | 425 | if (option_mask32 & 4) pingcount = xatoul(opt_c); // -c |
| 426 | if (option_mask32 & 8) datalen = xatou16(opt_s); // -s | 426 | if (option_mask32 & 8) datalen = xatou16(opt_s); // -s |
diff --git a/networking/telnetd.c b/networking/telnetd.c index a0ee2c345..dd5d55de0 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
| @@ -286,7 +286,7 @@ make_new_session( | |||
| 286 | ts->shell_pid = pid; | 286 | ts->shell_pid = pid; |
| 287 | return ts; | 287 | return ts; |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | /* child */ | 290 | /* child */ |
| 291 | 291 | ||
| 292 | /* open the child's side of the tty. */ | 292 | /* open the child's side of the tty. */ |
diff --git a/procps/Config.in b/procps/Config.in index 20d5f9bf2..e58b89f85 100644 --- a/procps/Config.in +++ b/procps/Config.in | |||
| @@ -42,7 +42,7 @@ config KILLALL5 | |||
| 42 | bool "killall5" | 42 | bool "killall5" |
| 43 | default n | 43 | default n |
| 44 | depends on KILL | 44 | depends on KILL |
| 45 | 45 | ||
| 46 | config PIDOF | 46 | config PIDOF |
| 47 | bool "pidof" | 47 | bool "pidof" |
| 48 | default n | 48 | default n |
diff --git a/procps/top.c b/procps/top.c index d1fbfe6e1..712544318 100644 --- a/procps/top.c +++ b/procps/top.c | |||
| @@ -271,7 +271,7 @@ static unsigned long display_generic(int scr_width) | |||
| 271 | used, mfree, shared, buffers, cached); | 271 | used, mfree, shared, buffers, cached); |
| 272 | 272 | ||
| 273 | printf(OPT_BATCH_MODE ? "%s\n" : "\e[H\e[J%s\n", scrbuf); | 273 | printf(OPT_BATCH_MODE ? "%s\n" : "\e[H\e[J%s\n", scrbuf); |
| 274 | 274 | ||
| 275 | snprintf(scrbuf, scr_width, "Load average: %s", buf); | 275 | snprintf(scrbuf, scr_width, "Load average: %s", buf); |
| 276 | printf("%s\n", scrbuf); | 276 | printf("%s\n", scrbuf); |
| 277 | 277 | ||
diff --git a/runit/chpst.c b/runit/chpst.c index 14b8b5a15..4662a4a83 100644 --- a/runit/chpst.c +++ b/runit/chpst.c | |||
| @@ -290,7 +290,7 @@ int chpst_main(int argc, char **argv) | |||
| 290 | } | 290 | } |
| 291 | argv += optind; | 291 | argv += optind; |
| 292 | if (!argv || !*argv) bb_show_usage(); | 292 | if (!argv || !*argv) bb_show_usage(); |
| 293 | 293 | ||
| 294 | if (OPT_pgrp) setsid(); | 294 | if (OPT_pgrp) setsid(); |
| 295 | if (env_dir) edir(env_dir); | 295 | if (env_dir) edir(env_dir); |
| 296 | if (root) { | 296 | if (root) { |
diff --git a/runit/runit_lib.c b/runit/runit_lib.c index 8612a1b94..b885a3412 100644 --- a/runit/runit_lib.c +++ b/runit/runit_lib.c | |||
| @@ -84,7 +84,7 @@ int buffer_feed(buffer *s) | |||
| 84 | int buffer_bget(buffer *s,char *buf,unsigned len) | 84 | int buffer_bget(buffer *s,char *buf,unsigned len) |
| 85 | { | 85 | { |
| 86 | int r; | 86 | int r; |
| 87 | 87 | ||
| 88 | if (s->p > 0) return getthis(s,buf,len); | 88 | if (s->p > 0) return getthis(s,buf,len); |
| 89 | if (s->n <= len) return oneread(s->op,s->fd,buf,s->n); | 89 | if (s->n <= len) return oneread(s->op,s->fd,buf,s->n); |
| 90 | r = buffer_feed(s); if (r <= 0) return r; | 90 | r = buffer_feed(s); if (r <= 0) return r; |
| @@ -94,7 +94,7 @@ int buffer_bget(buffer *s,char *buf,unsigned len) | |||
| 94 | int buffer_get(buffer *s,char *buf,unsigned len) | 94 | int buffer_get(buffer *s,char *buf,unsigned len) |
| 95 | { | 95 | { |
| 96 | int r; | 96 | int r; |
| 97 | 97 | ||
| 98 | if (s->p > 0) return getthis(s,buf,len); | 98 | if (s->p > 0) return getthis(s,buf,len); |
| 99 | if (s->n <= len) return oneread(s->op,s->fd,buf,len); | 99 | if (s->n <= len) return oneread(s->op,s->fd,buf,len); |
| 100 | r = buffer_feed(s); if (r <= 0) return r; | 100 | r = buffer_feed(s); if (r <= 0) return r; |
| @@ -135,7 +135,7 @@ static int allwrite(int (*op)(int fd,char *buf,unsigned len),int fd,const char * | |||
| 135 | int buffer_flush(buffer *s) | 135 | int buffer_flush(buffer *s) |
| 136 | { | 136 | { |
| 137 | int p; | 137 | int p; |
| 138 | 138 | ||
| 139 | p = s->p; | 139 | p = s->p; |
| 140 | if (!p) return 0; | 140 | if (!p) return 0; |
| 141 | s->p = 0; | 141 | s->p = 0; |
| @@ -145,7 +145,7 @@ int buffer_flush(buffer *s) | |||
| 145 | int buffer_putalign(buffer *s,const char *buf,unsigned len) | 145 | int buffer_putalign(buffer *s,const char *buf,unsigned len) |
| 146 | { | 146 | { |
| 147 | unsigned n; | 147 | unsigned n; |
| 148 | 148 | ||
| 149 | while (len > (n = s->n - s->p)) { | 149 | while (len > (n = s->n - s->p)) { |
| 150 | memcpy(s->x + s->p,buf,n); | 150 | memcpy(s->x + s->p,buf,n); |
| 151 | s->p += n; | 151 | s->p += n; |
| @@ -162,7 +162,7 @@ int buffer_putalign(buffer *s,const char *buf,unsigned len) | |||
| 162 | int buffer_put(buffer *s,const char *buf,unsigned len) | 162 | int buffer_put(buffer *s,const char *buf,unsigned len) |
| 163 | { | 163 | { |
| 164 | unsigned n; | 164 | unsigned n; |
| 165 | 165 | ||
| 166 | n = s->n; | 166 | n = s->n; |
| 167 | if (len > n - s->p) { | 167 | if (len > n - s->p) { |
| 168 | if (buffer_flush(s) == -1) return -1; | 168 | if (buffer_flush(s) == -1) return -1; |
| @@ -487,7 +487,7 @@ void taia_sub(struct taia *t,const struct taia *u,const struct taia *v) | |||
| 487 | { | 487 | { |
| 488 | unsigned long unano = u->nano; | 488 | unsigned long unano = u->nano; |
| 489 | unsigned long uatto = u->atto; | 489 | unsigned long uatto = u->atto; |
| 490 | 490 | ||
| 491 | t->sec.x = u->sec.x - v->sec.x; | 491 | t->sec.x = u->sec.x - v->sec.x; |
| 492 | t->nano = unano - v->nano; | 492 | t->nano = unano - v->nano; |
| 493 | t->atto = uatto - v->atto; | 493 | t->atto = uatto - v->atto; |
diff --git a/runit/runsv.c b/runit/runsv.c index 9e117fe0a..aace041a8 100644 --- a/runit/runsv.c +++ b/runit/runsv.c | |||
| @@ -300,7 +300,7 @@ static void startservice(struct svdir *s) | |||
| 300 | fatal_cannot("setup filedescriptor for ./log/run"); | 300 | fatal_cannot("setup filedescriptor for ./log/run"); |
| 301 | close(logpipe[1]); | 301 | close(logpipe[1]); |
| 302 | if (chdir("./log") == -1) | 302 | if (chdir("./log") == -1) |
| 303 | fatal_cannot("change directory to ./log"); | 303 | fatal_cannot("change directory to ./log"); |
| 304 | } else { | 304 | } else { |
| 305 | if (fd_copy(1, logpipe[1]) == -1) | 305 | if (fd_copy(1, logpipe[1]) == -1) |
| 306 | fatal_cannot("setup filedescriptor for ./run"); | 306 | fatal_cannot("setup filedescriptor for ./run"); |
| @@ -405,7 +405,7 @@ int runsv_main(int argc, char **argv) | |||
| 405 | coe(selfpipe[1]); | 405 | coe(selfpipe[1]); |
| 406 | ndelay_on(selfpipe[0]); | 406 | ndelay_on(selfpipe[0]); |
| 407 | ndelay_on(selfpipe[1]); | 407 | ndelay_on(selfpipe[1]); |
| 408 | 408 | ||
| 409 | sig_block(sig_child); | 409 | sig_block(sig_child); |
| 410 | sig_catch(sig_child, s_child); | 410 | sig_catch(sig_child, s_child); |
| 411 | sig_block(sig_term); | 411 | sig_block(sig_term); |
| @@ -544,7 +544,7 @@ int runsv_main(int argc, char **argv) | |||
| 544 | for (;;) { | 544 | for (;;) { |
| 545 | int child; | 545 | int child; |
| 546 | int wstat; | 546 | int wstat; |
| 547 | 547 | ||
| 548 | child = wait_nohang(&wstat); | 548 | child = wait_nohang(&wstat); |
| 549 | if (!child) break; | 549 | if (!child) break; |
| 550 | if ((child == -1) && (errno != EINTR)) break; | 550 | if ((child == -1) && (errno != EINTR)) break; |
diff --git a/runit/runsvdir.c b/runit/runsvdir.c index 9238eec82..3290da5e6 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c | |||
| @@ -36,7 +36,7 @@ static void fatal2_cannot(char *m1, char *m2) | |||
| 36 | static void warn3x(char *m1, char *m2, char *m3) | 36 | static void warn3x(char *m1, char *m2, char *m3) |
| 37 | { | 37 | { |
| 38 | bb_error_msg("%s: warning: %s%s%s", svdir, m1, m2, m3); | 38 | bb_error_msg("%s: warning: %s%s%s", svdir, m1, m2, m3); |
| 39 | } | 39 | } |
| 40 | static void warn2_cannot(char *m1, char *m2) | 40 | static void warn2_cannot(char *m1, char *m2) |
| 41 | { | 41 | { |
| 42 | warn3x("cannot ", m1, m2); | 42 | warn3x("cannot ", m1, m2); |
| @@ -44,7 +44,7 @@ static void warn2_cannot(char *m1, char *m2) | |||
| 44 | static void warnx(char *m1) | 44 | static void warnx(char *m1) |
| 45 | { | 45 | { |
| 46 | warn3x(m1, "", ""); | 46 | warn3x(m1, "", ""); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | static void s_term(int sig_no) | 49 | static void s_term(int sig_no) |
| 50 | { | 50 | { |
| @@ -208,7 +208,7 @@ int runsvdir_main(int argc, char **argv) | |||
| 208 | } | 208 | } |
| 209 | } | 209 | } |
| 210 | curdir = open_read("."); | 210 | curdir = open_read("."); |
| 211 | if (curdir == -1) | 211 | if (curdir == -1) |
| 212 | fatal2_cannot("open current directory", ""); | 212 | fatal2_cannot("open current directory", ""); |
| 213 | coe(curdir); | 213 | coe(curdir); |
| 214 | 214 | ||
| @@ -241,7 +241,7 @@ int runsvdir_main(int argc, char **argv) | |||
| 241 | /* wait at least a second */ | 241 | /* wait at least a second */ |
| 242 | taia_uint(&deadline, 1); | 242 | taia_uint(&deadline, 1); |
| 243 | taia_add(&stampcheck, &now, &deadline); | 243 | taia_add(&stampcheck, &now, &deadline); |
| 244 | 244 | ||
| 245 | if (stat(svdir, &s) != -1) { | 245 | if (stat(svdir, &s) != -1) { |
| 246 | if (check || s.st_mtime != mtime | 246 | if (check || s.st_mtime != mtime |
| 247 | || s.st_ino != ino || s.st_dev != dev | 247 | || s.st_ino != ino || s.st_dev != dev |
diff --git a/runit/sv.c b/runit/sv.c index 9471d09a8..054053619 100644 --- a/runit/sv.c +++ b/runit/sv.c | |||
| @@ -88,7 +88,7 @@ static unsigned svstatus_print(char *m) | |||
| 88 | int pid; | 88 | int pid; |
| 89 | int normallyup = 0; | 89 | int normallyup = 0; |
| 90 | struct stat s; | 90 | struct stat s; |
| 91 | 91 | ||
| 92 | if (stat("down", &s) == -1) { | 92 | if (stat("down", &s) == -1) { |
| 93 | if (errno != ENOENT) { | 93 | if (errno != ENOENT) { |
| 94 | bb_perror_msg(WARN"cannot stat %s/down", *service); | 94 | bb_perror_msg(WARN"cannot stat %s/down", *service); |
diff --git a/runit/svlogd.c b/runit/svlogd.c index c91f85fe1..b089c5498 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c | |||
| @@ -141,7 +141,7 @@ static unsigned processorstart(struct logdir *ld) | |||
| 141 | sig_unblock(sig_term); | 141 | sig_unblock(sig_term); |
| 142 | sig_unblock(sig_alarm); | 142 | sig_unblock(sig_alarm); |
| 143 | sig_unblock(sig_hangup); | 143 | sig_unblock(sig_hangup); |
| 144 | 144 | ||
| 145 | if (verbose) | 145 | if (verbose) |
| 146 | bb_error_msg(INFO"processing: %s/%s", ld->name, ld->fnsave); | 146 | bb_error_msg(INFO"processing: %s/%s", ld->name, ld->fnsave); |
| 147 | fd = xopen(ld->fnsave, O_RDONLY|O_NDELAY); | 147 | fd = xopen(ld->fnsave, O_RDONLY|O_NDELAY); |
| @@ -549,12 +549,12 @@ static unsigned logdir_open(struct logdir *ld, const char *fn) | |||
| 549 | coe(ld->fdcur); | 549 | coe(ld->fdcur); |
| 550 | while (fchmod(ld->fdcur, 0644) == -1) | 550 | while (fchmod(ld->fdcur, 0644) == -1) |
| 551 | pause2cannot("set mode of current", ld->name); | 551 | pause2cannot("set mode of current", ld->name); |
| 552 | 552 | ||
| 553 | if (verbose) { | 553 | if (verbose) { |
| 554 | if (i == 0) bb_error_msg(INFO"append: %s/current", ld->name); | 554 | if (i == 0) bb_error_msg(INFO"append: %s/current", ld->name); |
| 555 | else bb_error_msg(INFO"new: %s/current", ld->name); | 555 | else bb_error_msg(INFO"new: %s/current", ld->name); |
| 556 | } | 556 | } |
| 557 | 557 | ||
| 558 | while (fchdir(fdwdir) == -1) | 558 | while (fchdir(fdwdir) == -1) |
| 559 | pause1cannot("change to initial working directory"); | 559 | pause1cannot("change to initial working directory"); |
| 560 | return 1; | 560 | return 1; |
| @@ -569,7 +569,7 @@ static void logdirs_reopen(void) | |||
| 569 | tmaxflag = 0; | 569 | tmaxflag = 0; |
| 570 | taia_now(&now); | 570 | taia_now(&now); |
| 571 | for (l = 0; l < dirn; ++l) { | 571 | for (l = 0; l < dirn; ++l) { |
| 572 | logdir_close(&dir[l]); | 572 | logdir_close(&dir[l]); |
| 573 | if (logdir_open(&dir[l], fndir[l])) ok = 1; | 573 | if (logdir_open(&dir[l], fndir[l])) ok = 1; |
| 574 | } | 574 | } |
| 575 | if (!ok) fatalx("no functional log directories"); | 575 | if (!ok) fatalx("no functional log directories"); |
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index b0d067be7..a7fb4d521 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -99,7 +99,7 @@ cmd = @$(echo-cmd) $(cmd_$(1)) | |||
| 99 | objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) | 99 | objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) |
| 100 | 100 | ||
| 101 | ### | 101 | ### |
| 102 | # if_changed - execute command if any prerequisite is newer than | 102 | # if_changed - execute command if any prerequisite is newer than |
| 103 | # target, or command line has changed | 103 | # target, or command line has changed |
| 104 | # if_changed_dep - as if_changed, but uses fixdep to reveal dependencies | 104 | # if_changed_dep - as if_changed, but uses fixdep to reveal dependencies |
| 105 | # including used config symbols | 105 | # including used config symbols |
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index e48e60da3..ddefea5a6 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
| @@ -216,7 +216,7 @@ $(real-objs-m) : modkern_aflags := $(AFLAGS_MODULE) | |||
| 216 | $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE) | 216 | $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE) |
| 217 | 217 | ||
| 218 | quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ | 218 | quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ |
| 219 | cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< | 219 | cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< |
| 220 | 220 | ||
| 221 | %.s: %.S FORCE | 221 | %.s: %.S FORCE |
| 222 | $(call if_changed_dep,as_s_S) | 222 | $(call if_changed_dep,as_s_S) |
| @@ -284,7 +284,7 @@ link_multi_deps = \ | |||
| 284 | $(filter $(addprefix $(obj)/, \ | 284 | $(filter $(addprefix $(obj)/, \ |
| 285 | $($(subst $(obj)/,,$(@:.o=-objs))) \ | 285 | $($(subst $(obj)/,,$(@:.o=-objs))) \ |
| 286 | $($(subst $(obj)/,,$(@:.o=-y)))), $^) | 286 | $($(subst $(obj)/,,$(@:.o=-y)))), $^) |
| 287 | 287 | ||
| 288 | quiet_cmd_link_multi-y = LD $@ | 288 | quiet_cmd_link_multi-y = LD $@ |
| 289 | cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) | 289 | cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) |
| 290 | 290 | ||
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 2d519704b..763e2f2d7 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host | |||
| @@ -152,5 +152,5 @@ $(host-cshlib): %: $(host-cshobjs) FORCE | |||
| 152 | $(call if_changed,host-cshlib) | 152 | $(call if_changed,host-cshlib) |
| 153 | 153 | ||
| 154 | targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ | 154 | targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ |
| 155 | $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) | 155 | $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) |
| 156 | 156 | ||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 2cb4935e8..e1e0ba481 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -18,7 +18,7 @@ lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m))) | |||
| 18 | # --------------------------------------------------------------------------- | 18 | # --------------------------------------------------------------------------- |
| 19 | # o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o | 19 | # o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o |
| 20 | # and add the directory to the list of dirs to descend into: $(subdir-y) | 20 | # and add the directory to the list of dirs to descend into: $(subdir-y) |
| 21 | # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) | 21 | # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) |
| 22 | # and add the directory to the list of dirs to descend into: $(subdir-m) | 22 | # and add the directory to the list of dirs to descend into: $(subdir-m) |
| 23 | 23 | ||
| 24 | __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y))) | 24 | __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y))) |
| @@ -32,7 +32,7 @@ obj-m := $(filter-out %/, $(obj-m)) | |||
| 32 | 32 | ||
| 33 | subdir-ym := $(sort $(subdir-y) $(subdir-m)) | 33 | subdir-ym := $(sort $(subdir-y) $(subdir-m)) |
| 34 | 34 | ||
| 35 | # if $(foo-objs) exists, foo.o is a composite object | 35 | # if $(foo-objs) exists, foo.o is a composite object |
| 36 | multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) | 36 | multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) |
| 37 | multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) | 37 | multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) |
| 38 | multi-used := $(multi-used-y) $(multi-used-m) | 38 | multi-used := $(multi-used-y) $(multi-used-m) |
| @@ -76,7 +76,7 @@ obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) | |||
| 76 | 76 | ||
| 77 | # These flags are needed for modversions and compiling, so we define them here | 77 | # These flags are needed for modversions and compiling, so we define them here |
| 78 | # already | 78 | # already |
| 79 | # $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will | 79 | # $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will |
| 80 | # end up in (or would, if it gets compiled in) | 80 | # end up in (or would, if it gets compiled in) |
| 81 | # Note: It's possible that one object gets potentially linked into more | 81 | # Note: It's possible that one object gets potentially linked into more |
| 82 | # than one module. In that case KBUILD_MODNAME will be set to foo_bar, | 82 | # than one module. In that case KBUILD_MODNAME will be set to foo_bar, |
| @@ -134,7 +134,7 @@ $(obj)/%:: $(src)/%_shipped | |||
| 134 | 134 | ||
| 135 | # Commands useful for building a boot image | 135 | # Commands useful for building a boot image |
| 136 | # =========================================================================== | 136 | # =========================================================================== |
| 137 | # | 137 | # |
| 138 | # Use as following: | 138 | # Use as following: |
| 139 | # | 139 | # |
| 140 | # target: source(s) FORCE | 140 | # target: source(s) FORCE |
| @@ -148,7 +148,7 @@ $(obj)/%:: $(src)/%_shipped | |||
| 148 | 148 | ||
| 149 | quiet_cmd_ld = LD $@ | 149 | quiet_cmd_ld = LD $@ |
| 150 | cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \ | 150 | cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \ |
| 151 | $(filter-out FORCE,$^) -o $@ | 151 | $(filter-out FORCE,$^) -o $@ |
| 152 | 152 | ||
| 153 | # Objcopy | 153 | # Objcopy |
| 154 | # --------------------------------------------------------------------------- | 154 | # --------------------------------------------------------------------------- |
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index 24e3c8cbb..7a4ca2c16 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped | |||
| @@ -42,7 +42,7 @@ typedef uint32_t flex_uint32_t; | |||
| 42 | typedef signed char flex_int8_t; | 42 | typedef signed char flex_int8_t; |
| 43 | typedef short int flex_int16_t; | 43 | typedef short int flex_int16_t; |
| 44 | typedef int flex_int32_t; | 44 | typedef int flex_int32_t; |
| 45 | typedef unsigned char flex_uint8_t; | 45 | typedef unsigned char flex_uint8_t; |
| 46 | typedef unsigned short int flex_uint16_t; | 46 | typedef unsigned short int flex_uint16_t; |
| 47 | typedef unsigned int flex_uint32_t; | 47 | typedef unsigned int flex_uint32_t; |
| 48 | #endif /* ! C99 */ | 48 | #endif /* ! C99 */ |
| @@ -148,7 +148,7 @@ extern FILE *zconfin, *zconfout; | |||
| 148 | #define EOB_ACT_LAST_MATCH 2 | 148 | #define EOB_ACT_LAST_MATCH 2 |
| 149 | 149 | ||
| 150 | #define YY_LESS_LINENO(n) | 150 | #define YY_LESS_LINENO(n) |
| 151 | 151 | ||
| 152 | /* Return all but the first "n" matched characters back to the input stream. */ | 152 | /* Return all but the first "n" matched characters back to the input stream. */ |
| 153 | #define yyless(n) \ | 153 | #define yyless(n) \ |
| 154 | do \ | 154 | do \ |
| @@ -215,7 +215,7 @@ struct yy_buffer_state | |||
| 215 | 215 | ||
| 216 | int yy_bs_lineno; /**< The line count. */ | 216 | int yy_bs_lineno; /**< The line count. */ |
| 217 | int yy_bs_column; /**< The column count. */ | 217 | int yy_bs_column; /**< The column count. */ |
| 218 | 218 | ||
| 219 | /* Whether to try to fill the input buffer when we reach the | 219 | /* Whether to try to fill the input buffer when we reach the |
| 220 | * end of it. | 220 | * end of it. |
| 221 | */ | 221 | */ |
| @@ -833,7 +833,7 @@ extern int zconfwrap (void ); | |||
| 833 | #endif | 833 | #endif |
| 834 | 834 | ||
| 835 | static void yyunput (int c,char *buf_ptr ); | 835 | static void yyunput (int c,char *buf_ptr ); |
| 836 | 836 | ||
| 837 | #ifndef yytext_ptr | 837 | #ifndef yytext_ptr |
| 838 | static void yy_flex_strncpy (char *,yyconst char *,int ); | 838 | static void yy_flex_strncpy (char *,yyconst char *,int ); |
| 839 | #endif | 839 | #endif |
| @@ -938,7 +938,7 @@ YY_DECL | |||
| 938 | register yy_state_type yy_current_state; | 938 | register yy_state_type yy_current_state; |
| 939 | register char *yy_cp, *yy_bp; | 939 | register char *yy_cp, *yy_bp; |
| 940 | register int yy_act; | 940 | register int yy_act; |
| 941 | 941 | ||
| 942 | int str = 0; | 942 | int str = 0; |
| 943 | int ts, i; | 943 | int ts, i; |
| 944 | 944 | ||
| @@ -1536,7 +1536,7 @@ static int yy_get_next_buffer (void) | |||
| 1536 | { | 1536 | { |
| 1537 | register yy_state_type yy_current_state; | 1537 | register yy_state_type yy_current_state; |
| 1538 | register char *yy_cp; | 1538 | register char *yy_cp; |
| 1539 | 1539 | ||
| 1540 | yy_current_state = (yy_start); | 1540 | yy_current_state = (yy_start); |
| 1541 | 1541 | ||
| 1542 | for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) | 1542 | for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) |
| @@ -1555,7 +1555,7 @@ static int yy_get_next_buffer (void) | |||
| 1555 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) | 1555 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) |
| 1556 | { | 1556 | { |
| 1557 | register int yy_is_jam; | 1557 | register int yy_is_jam; |
| 1558 | 1558 | ||
| 1559 | yy_current_state = yy_nxt[yy_current_state][1]; | 1559 | yy_current_state = yy_nxt[yy_current_state][1]; |
| 1560 | yy_is_jam = (yy_current_state <= 0); | 1560 | yy_is_jam = (yy_current_state <= 0); |
| 1561 | 1561 | ||
| @@ -1565,7 +1565,7 @@ static int yy_get_next_buffer (void) | |||
| 1565 | static void yyunput (int c, register char * yy_bp ) | 1565 | static void yyunput (int c, register char * yy_bp ) |
| 1566 | { | 1566 | { |
| 1567 | register char *yy_cp; | 1567 | register char *yy_cp; |
| 1568 | 1568 | ||
| 1569 | yy_cp = (yy_c_buf_p); | 1569 | yy_cp = (yy_c_buf_p); |
| 1570 | 1570 | ||
| 1571 | /* undo effects of setting up zconftext */ | 1571 | /* undo effects of setting up zconftext */ |
| @@ -1608,7 +1608,7 @@ static int yy_get_next_buffer (void) | |||
| 1608 | 1608 | ||
| 1609 | { | 1609 | { |
| 1610 | int c; | 1610 | int c; |
| 1611 | 1611 | ||
| 1612 | *(yy_c_buf_p) = (yy_hold_char); | 1612 | *(yy_c_buf_p) = (yy_hold_char); |
| 1613 | 1613 | ||
| 1614 | if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) | 1614 | if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) |
| @@ -1675,12 +1675,12 @@ static int yy_get_next_buffer (void) | |||
| 1675 | 1675 | ||
| 1676 | /** Immediately switch to a different input stream. | 1676 | /** Immediately switch to a different input stream. |
| 1677 | * @param input_file A readable stream. | 1677 | * @param input_file A readable stream. |
| 1678 | * | 1678 | * |
| 1679 | * @note This function does not reset the start condition to @c INITIAL . | 1679 | * @note This function does not reset the start condition to @c INITIAL . |
| 1680 | */ | 1680 | */ |
| 1681 | void zconfrestart (FILE * input_file ) | 1681 | void zconfrestart (FILE * input_file ) |
| 1682 | { | 1682 | { |
| 1683 | 1683 | ||
| 1684 | if ( ! YY_CURRENT_BUFFER ){ | 1684 | if ( ! YY_CURRENT_BUFFER ){ |
| 1685 | zconfensure_buffer_stack (); | 1685 | zconfensure_buffer_stack (); |
| 1686 | YY_CURRENT_BUFFER_LVALUE = | 1686 | YY_CURRENT_BUFFER_LVALUE = |
| @@ -1693,11 +1693,11 @@ static int yy_get_next_buffer (void) | |||
| 1693 | 1693 | ||
| 1694 | /** Switch to a different input buffer. | 1694 | /** Switch to a different input buffer. |
| 1695 | * @param new_buffer The new input buffer. | 1695 | * @param new_buffer The new input buffer. |
| 1696 | * | 1696 | * |
| 1697 | */ | 1697 | */ |
| 1698 | void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ) | 1698 | void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ) |
| 1699 | { | 1699 | { |
| 1700 | 1700 | ||
| 1701 | /* TODO. We should be able to replace this entire function body | 1701 | /* TODO. We should be able to replace this entire function body |
| 1702 | * with | 1702 | * with |
| 1703 | * zconfpop_buffer_state(); | 1703 | * zconfpop_buffer_state(); |
| @@ -1737,13 +1737,13 @@ static void zconf_load_buffer_state (void) | |||
| 1737 | /** Allocate and initialize an input buffer state. | 1737 | /** Allocate and initialize an input buffer state. |
| 1738 | * @param file A readable stream. | 1738 | * @param file A readable stream. |
| 1739 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. | 1739 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
| 1740 | * | 1740 | * |
| 1741 | * @return the allocated buffer state. | 1741 | * @return the allocated buffer state. |
| 1742 | */ | 1742 | */ |
| 1743 | YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size ) | 1743 | YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size ) |
| 1744 | { | 1744 | { |
| 1745 | YY_BUFFER_STATE b; | 1745 | YY_BUFFER_STATE b; |
| 1746 | 1746 | ||
| 1747 | b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); | 1747 | b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); |
| 1748 | if ( ! b ) | 1748 | if ( ! b ) |
| 1749 | YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); | 1749 | YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); |
| @@ -1766,11 +1766,11 @@ static void zconf_load_buffer_state (void) | |||
| 1766 | 1766 | ||
| 1767 | /** Destroy the buffer. | 1767 | /** Destroy the buffer. |
| 1768 | * @param b a buffer created with zconf_create_buffer() | 1768 | * @param b a buffer created with zconf_create_buffer() |
| 1769 | * | 1769 | * |
| 1770 | */ | 1770 | */ |
| 1771 | void zconf_delete_buffer (YY_BUFFER_STATE b ) | 1771 | void zconf_delete_buffer (YY_BUFFER_STATE b ) |
| 1772 | { | 1772 | { |
| 1773 | 1773 | ||
| 1774 | if ( ! b ) | 1774 | if ( ! b ) |
| 1775 | return; | 1775 | return; |
| 1776 | 1776 | ||
| @@ -1791,7 +1791,7 @@ static void zconf_load_buffer_state (void) | |||
| 1791 | 1791 | ||
| 1792 | { | 1792 | { |
| 1793 | int oerrno = errno; | 1793 | int oerrno = errno; |
| 1794 | 1794 | ||
| 1795 | zconf_flush_buffer(b ); | 1795 | zconf_flush_buffer(b ); |
| 1796 | 1796 | ||
| 1797 | b->yy_input_file = file; | 1797 | b->yy_input_file = file; |
| @@ -1807,13 +1807,13 @@ static void zconf_load_buffer_state (void) | |||
| 1807 | } | 1807 | } |
| 1808 | 1808 | ||
| 1809 | b->yy_is_interactive = 0; | 1809 | b->yy_is_interactive = 0; |
| 1810 | 1810 | ||
| 1811 | errno = oerrno; | 1811 | errno = oerrno; |
| 1812 | } | 1812 | } |
| 1813 | 1813 | ||
| 1814 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. | 1814 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 1815 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. | 1815 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
| 1816 | * | 1816 | * |
| 1817 | */ | 1817 | */ |
| 1818 | void zconf_flush_buffer (YY_BUFFER_STATE b ) | 1818 | void zconf_flush_buffer (YY_BUFFER_STATE b ) |
| 1819 | { | 1819 | { |
| @@ -1842,7 +1842,7 @@ static void zconf_load_buffer_state (void) | |||
| 1842 | * the current state. This function will allocate the stack | 1842 | * the current state. This function will allocate the stack |
| 1843 | * if necessary. | 1843 | * if necessary. |
| 1844 | * @param new_buffer The new state. | 1844 | * @param new_buffer The new state. |
| 1845 | * | 1845 | * |
| 1846 | */ | 1846 | */ |
| 1847 | void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) | 1847 | void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) |
| 1848 | { | 1848 | { |
| @@ -1872,7 +1872,7 @@ void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) | |||
| 1872 | 1872 | ||
| 1873 | /** Removes and deletes the top of the stack, if present. | 1873 | /** Removes and deletes the top of the stack, if present. |
| 1874 | * The next element becomes the new top. | 1874 | * The next element becomes the new top. |
| 1875 | * | 1875 | * |
| 1876 | */ | 1876 | */ |
| 1877 | void zconfpop_buffer_state (void) | 1877 | void zconfpop_buffer_state (void) |
| 1878 | { | 1878 | { |
| @@ -1896,7 +1896,7 @@ void zconfpop_buffer_state (void) | |||
| 1896 | static void zconfensure_buffer_stack (void) | 1896 | static void zconfensure_buffer_stack (void) |
| 1897 | { | 1897 | { |
| 1898 | int num_to_alloc; | 1898 | int num_to_alloc; |
| 1899 | 1899 | ||
| 1900 | if (!(yy_buffer_stack)) { | 1900 | if (!(yy_buffer_stack)) { |
| 1901 | 1901 | ||
| 1902 | /* First allocation is just for 2 elements, since we don't know if this | 1902 | /* First allocation is just for 2 elements, since we don't know if this |
| @@ -1907,9 +1907,9 @@ static void zconfensure_buffer_stack (void) | |||
| 1907 | (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc | 1907 | (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc |
| 1908 | (num_to_alloc * sizeof(struct yy_buffer_state*) | 1908 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
| 1909 | ); | 1909 | ); |
| 1910 | 1910 | ||
| 1911 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); | 1911 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
| 1912 | 1912 | ||
| 1913 | (yy_buffer_stack_max) = num_to_alloc; | 1913 | (yy_buffer_stack_max) = num_to_alloc; |
| 1914 | (yy_buffer_stack_top) = 0; | 1914 | (yy_buffer_stack_top) = 0; |
| 1915 | return; | 1915 | return; |
| @@ -1935,13 +1935,13 @@ static void zconfensure_buffer_stack (void) | |||
| 1935 | /** Setup the input buffer state to scan directly from a user-specified character buffer. | 1935 | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
| 1936 | * @param base the character buffer | 1936 | * @param base the character buffer |
| 1937 | * @param size the size in bytes of the character buffer | 1937 | * @param size the size in bytes of the character buffer |
| 1938 | * | 1938 | * |
| 1939 | * @return the newly allocated buffer state object. | 1939 | * @return the newly allocated buffer state object. |
| 1940 | */ | 1940 | */ |
| 1941 | YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) | 1941 | YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) |
| 1942 | { | 1942 | { |
| 1943 | YY_BUFFER_STATE b; | 1943 | YY_BUFFER_STATE b; |
| 1944 | 1944 | ||
| 1945 | if ( size < 2 || | 1945 | if ( size < 2 || |
| 1946 | base[size-2] != YY_END_OF_BUFFER_CHAR || | 1946 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
| 1947 | base[size-1] != YY_END_OF_BUFFER_CHAR ) | 1947 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
| @@ -1970,14 +1970,14 @@ YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) | |||
| 1970 | /** Setup the input buffer state to scan a string. The next call to zconflex() will | 1970 | /** Setup the input buffer state to scan a string. The next call to zconflex() will |
| 1971 | * scan from a @e copy of @a str. | 1971 | * scan from a @e copy of @a str. |
| 1972 | * @param yy_str a NUL-terminated string to scan | 1972 | * @param yy_str a NUL-terminated string to scan |
| 1973 | * | 1973 | * |
| 1974 | * @return the newly allocated buffer state object. | 1974 | * @return the newly allocated buffer state object. |
| 1975 | * @note If you want to scan bytes that may contain NUL values, then use | 1975 | * @note If you want to scan bytes that may contain NUL values, then use |
| 1976 | * zconf_scan_bytes() instead. | 1976 | * zconf_scan_bytes() instead. |
| 1977 | */ | 1977 | */ |
| 1978 | YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str ) | 1978 | YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str ) |
| 1979 | { | 1979 | { |
| 1980 | 1980 | ||
| 1981 | return zconf_scan_bytes(yy_str,strlen(yy_str) ); | 1981 | return zconf_scan_bytes(yy_str,strlen(yy_str) ); |
| 1982 | } | 1982 | } |
| 1983 | 1983 | ||
| @@ -1985,7 +1985,7 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str ) | |||
| 1985 | * scan from a @e copy of @a bytes. | 1985 | * scan from a @e copy of @a bytes. |
| 1986 | * @param bytes the byte buffer to scan | 1986 | * @param bytes the byte buffer to scan |
| 1987 | * @param len the number of bytes in the buffer pointed to by @a bytes. | 1987 | * @param len the number of bytes in the buffer pointed to by @a bytes. |
| 1988 | * | 1988 | * |
| 1989 | * @return the newly allocated buffer state object. | 1989 | * @return the newly allocated buffer state object. |
| 1990 | */ | 1990 | */ |
| 1991 | YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) | 1991 | YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) |
| @@ -1994,7 +1994,7 @@ YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) | |||
| 1994 | char *buf; | 1994 | char *buf; |
| 1995 | yy_size_t n; | 1995 | yy_size_t n; |
| 1996 | int i; | 1996 | int i; |
| 1997 | 1997 | ||
| 1998 | /* Get memory for full buffer, including space for trailing EOB's. */ | 1998 | /* Get memory for full buffer, including space for trailing EOB's. */ |
| 1999 | n = len + 2; | 1999 | n = len + 2; |
| 2000 | buf = (char *) zconfalloc(n ); | 2000 | buf = (char *) zconfalloc(n ); |
| @@ -2048,16 +2048,16 @@ static void yy_fatal_error (yyconst char* msg ) | |||
| 2048 | /* Accessor methods (get/set functions) to struct members. */ | 2048 | /* Accessor methods (get/set functions) to struct members. */ |
| 2049 | 2049 | ||
| 2050 | /** Get the current line number. | 2050 | /** Get the current line number. |
| 2051 | * | 2051 | * |
| 2052 | */ | 2052 | */ |
| 2053 | int zconfget_lineno (void) | 2053 | int zconfget_lineno (void) |
| 2054 | { | 2054 | { |
| 2055 | 2055 | ||
| 2056 | return zconflineno; | 2056 | return zconflineno; |
| 2057 | } | 2057 | } |
| 2058 | 2058 | ||
| 2059 | /** Get the input stream. | 2059 | /** Get the input stream. |
| 2060 | * | 2060 | * |
| 2061 | */ | 2061 | */ |
| 2062 | FILE *zconfget_in (void) | 2062 | FILE *zconfget_in (void) |
| 2063 | { | 2063 | { |
| @@ -2065,7 +2065,7 @@ FILE *zconfget_in (void) | |||
| 2065 | } | 2065 | } |
| 2066 | 2066 | ||
| 2067 | /** Get the output stream. | 2067 | /** Get the output stream. |
| 2068 | * | 2068 | * |
| 2069 | */ | 2069 | */ |
| 2070 | FILE *zconfget_out (void) | 2070 | FILE *zconfget_out (void) |
| 2071 | { | 2071 | { |
| @@ -2073,7 +2073,7 @@ FILE *zconfget_out (void) | |||
| 2073 | } | 2073 | } |
| 2074 | 2074 | ||
| 2075 | /** Get the length of the current token. | 2075 | /** Get the length of the current token. |
| 2076 | * | 2076 | * |
| 2077 | */ | 2077 | */ |
| 2078 | int zconfget_leng (void) | 2078 | int zconfget_leng (void) |
| 2079 | { | 2079 | { |
| @@ -2081,7 +2081,7 @@ int zconfget_leng (void) | |||
| 2081 | } | 2081 | } |
| 2082 | 2082 | ||
| 2083 | /** Get the current token. | 2083 | /** Get the current token. |
| 2084 | * | 2084 | * |
| 2085 | */ | 2085 | */ |
| 2086 | 2086 | ||
| 2087 | char *zconfget_text (void) | 2087 | char *zconfget_text (void) |
| @@ -2091,18 +2091,18 @@ char *zconfget_text (void) | |||
| 2091 | 2091 | ||
| 2092 | /** Set the current line number. | 2092 | /** Set the current line number. |
| 2093 | * @param line_number | 2093 | * @param line_number |
| 2094 | * | 2094 | * |
| 2095 | */ | 2095 | */ |
| 2096 | void zconfset_lineno (int line_number ) | 2096 | void zconfset_lineno (int line_number ) |
| 2097 | { | 2097 | { |
| 2098 | 2098 | ||
| 2099 | zconflineno = line_number; | 2099 | zconflineno = line_number; |
| 2100 | } | 2100 | } |
| 2101 | 2101 | ||
| 2102 | /** Set the input stream. This does not discard the current | 2102 | /** Set the input stream. This does not discard the current |
| 2103 | * input buffer. | 2103 | * input buffer. |
| 2104 | * @param in_str A readable stream. | 2104 | * @param in_str A readable stream. |
| 2105 | * | 2105 | * |
| 2106 | * @see zconf_switch_to_buffer | 2106 | * @see zconf_switch_to_buffer |
| 2107 | */ | 2107 | */ |
| 2108 | void zconfset_in (FILE * in_str ) | 2108 | void zconfset_in (FILE * in_str ) |
| @@ -2128,7 +2128,7 @@ void zconfset_debug (int bdebug ) | |||
| 2128 | /* zconflex_destroy is for both reentrant and non-reentrant scanners. */ | 2128 | /* zconflex_destroy is for both reentrant and non-reentrant scanners. */ |
| 2129 | int zconflex_destroy (void) | 2129 | int zconflex_destroy (void) |
| 2130 | { | 2130 | { |
| 2131 | 2131 | ||
| 2132 | /* Pop the buffer stack, destroying each element. */ | 2132 | /* Pop the buffer stack, destroying each element. */ |
| 2133 | while(YY_CURRENT_BUFFER){ | 2133 | while(YY_CURRENT_BUFFER){ |
| 2134 | zconf_delete_buffer(YY_CURRENT_BUFFER ); | 2134 | zconf_delete_buffer(YY_CURRENT_BUFFER ); |
diff --git a/scripts/kconfig/lxdialog/BIG.FAT.WARNING b/scripts/kconfig/lxdialog/BIG.FAT.WARNING index c9bfbb902..b5d3b10b2 100644 --- a/scripts/kconfig/lxdialog/BIG.FAT.WARNING +++ b/scripts/kconfig/lxdialog/BIG.FAT.WARNING | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | This is NOT the official version of dialog. This version has been | 1 | This is NOT the official version of dialog. This version has been |
| 2 | significantly modified from the original. It is for use by the Linux | 2 | significantly modified from the original. It is for use by the Linux |
| 3 | busybox configuration script. Please do not bother Savio Lam with | 3 | busybox configuration script. Please do not bother Savio Lam with |
| 4 | questions about this program. | 4 | questions about this program. |
diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c index bf8052f4f..078e55a2e 100644 --- a/scripts/kconfig/lxdialog/menubox.c +++ b/scripts/kconfig/lxdialog/menubox.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | * | 26 | * |
| 27 | * *) A bugfix for the Page-Down problem | 27 | * *) A bugfix for the Page-Down problem |
| 28 | * | 28 | * |
| 29 | * *) Formerly when I used Page Down and Page Up, the cursor would be set | 29 | * *) Formerly when I used Page Down and Page Up, the cursor would be set |
| 30 | * to the first position in the menu box. Now lxdialog is a bit | 30 | * to the first position in the menu box. Now lxdialog is a bit |
| 31 | * smarter and works more like other menu systems (just have a look at | 31 | * smarter and works more like other menu systems (just have a look at |
| 32 | * it). | 32 | * it). |
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index e14eafa6c..ca8003dce 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped | |||
| @@ -1086,7 +1086,7 @@ yyparse () | |||
| 1086 | #endif | 1086 | #endif |
| 1087 | #endif | 1087 | #endif |
| 1088 | { | 1088 | { |
| 1089 | 1089 | ||
| 1090 | register int yystate; | 1090 | register int yystate; |
| 1091 | register int yyn; | 1091 | register int yyn; |
| 1092 | int yyresult; | 1092 | int yyresult; |
diff --git a/shell/ash.c b/shell/ash.c index 10217fe2f..95928e992 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -2036,7 +2036,7 @@ static int is_safe_applet(char *name) | |||
| 2036 | { | 2036 | { |
| 2037 | /* It isn't a bug to have non-existent applet here... */ | 2037 | /* It isn't a bug to have non-existent applet here... */ |
| 2038 | /* ...just a waste of space... */ | 2038 | /* ...just a waste of space... */ |
| 2039 | static const char safe_applets[][8] = { | 2039 | static const char safe_applets[][8] = { |
| 2040 | "[" | 2040 | "[" |
| 2041 | USE_AWK (, "awk" ) | 2041 | USE_AWK (, "awk" ) |
| 2042 | USE_CAT (, "cat" ) | 2042 | USE_CAT (, "cat" ) |
| @@ -3763,7 +3763,7 @@ tryexec(char *cmd, char **argv, char **envp) | |||
| 3763 | struct BB_applet *a; | 3763 | struct BB_applet *a; |
| 3764 | int argc = 0; | 3764 | int argc = 0; |
| 3765 | char **c; | 3765 | char **c; |
| 3766 | 3766 | ||
| 3767 | if (strchr(cmd, '/') == NULL | 3767 | if (strchr(cmd, '/') == NULL |
| 3768 | && (a = find_applet_by_name(cmd)) != NULL | 3768 | && (a = find_applet_by_name(cmd)) != NULL |
| 3769 | && is_safe_applet(cmd) | 3769 | && is_safe_applet(cmd) |
diff --git a/shell/bbsh.c b/shell/bbsh.c index 99e4f61fb..7978fdc16 100644 --- a/shell/bbsh.c +++ b/shell/bbsh.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* vi: set ts=4 : | 1 | /* vi: set ts=4 : |
| 2 | * | 2 | * |
| 3 | * bbsh - busybox shell | 3 | * bbsh - busybox shell |
| 4 | * | 4 | * |
| 5 | * Copyright 2006 Rob Landley <rob@landley.net> | 5 | * Copyright 2006 Rob Landley <rob@landley.net> |
| @@ -51,7 +51,7 @@ | |||
| 51 | // What we know about a single process. | 51 | // What we know about a single process. |
| 52 | struct command { | 52 | struct command { |
| 53 | struct command *next; | 53 | struct command *next; |
| 54 | int flags; // exit, suspend, && || | 54 | int flags; // exit, suspend, && || |
| 55 | int pid; // pid (or exit code) | 55 | int pid; // pid (or exit code) |
| 56 | int argc; | 56 | int argc; |
| 57 | char *argv[0]; | 57 | char *argv[0]; |
| @@ -125,9 +125,9 @@ static char *parse_pipeline(char *cmdline, struct pipeline *line) | |||
| 125 | return 0; | 125 | return 0; |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | // Allocate next command structure if necessary | 128 | // Allocate next command structure if necessary |
| 129 | if (!*cmd) *cmd = xzalloc(sizeof(struct command)+8*sizeof(char *)); | 129 | if (!*cmd) *cmd = xzalloc(sizeof(struct command)+8*sizeof(char *)); |
| 130 | 130 | ||
| 131 | // Parse next argument and add the results to argv[] | 131 | // Parse next argument and add the results to argv[] |
| 132 | end = parse_word(start, cmd); | 132 | end = parse_word(start, cmd); |
| 133 | 133 | ||
| @@ -138,7 +138,7 @@ static char *parse_pipeline(char *cmdline, struct pipeline *line) | |||
| 138 | start++; | 138 | start++; |
| 139 | break; | 139 | break; |
| 140 | } | 140 | } |
| 141 | // handle | & < > >> << || && | 141 | // handle | & < > >> << || && |
| 142 | } | 142 | } |
| 143 | break; | 143 | break; |
| 144 | } | 144 | } |
| @@ -160,7 +160,7 @@ static int run_pipeline(struct pipeline *line) | |||
| 160 | if (cmd->argc==2 && !strcmp(cmd->argv[0],"cd")) | 160 | if (cmd->argc==2 && !strcmp(cmd->argv[0],"cd")) |
| 161 | chdir(cmd->argv[1]); | 161 | chdir(cmd->argv[1]); |
| 162 | else if(!strcmp(cmd->argv[0],"exit")) | 162 | else if(!strcmp(cmd->argv[0],"exit")) |
| 163 | exit(cmd->argc>1 ? atoi(cmd->argv[1]) : 0); | 163 | exit(cmd->argc>1 ? atoi(cmd->argv[1]) : 0); |
| 164 | else { | 164 | else { |
| 165 | int status; | 165 | int status; |
| 166 | pid_t pid=fork(); | 166 | pid_t pid=fork(); |
| @@ -217,6 +217,6 @@ int bbsh_main(int argc, char *argv[]) | |||
| 217 | } | 217 | } |
| 218 | if (ENABLE_FEATURE_CLEAN_UP) free(command); | 218 | if (ENABLE_FEATURE_CLEAN_UP) free(command); |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | return 1; | 221 | return 1; |
| 222 | } | 222 | } |
diff --git a/util-linux/fdisk_sun.c b/util-linux/fdisk_sun.c index a3ca66f68..10107783e 100644 --- a/util-linux/fdisk_sun.c +++ b/util-linux/fdisk_sun.c | |||
| @@ -71,7 +71,7 @@ static const struct systypes sun_sys_types[] = { | |||
| 71 | { "\x83" "Linux native" }, /* LINUX_NATIVE */ | 71 | { "\x83" "Linux native" }, /* LINUX_NATIVE */ |
| 72 | { "\x8e" "Linux LVM" }, /* 0x8e */ | 72 | { "\x8e" "Linux LVM" }, /* 0x8e */ |
| 73 | /* New (2.2.x) raid partition with autodetect using persistent superblock */ | 73 | /* New (2.2.x) raid partition with autodetect using persistent superblock */ |
| 74 | { "\xfd" "Linux raid autodetect" }, /* 0xfd */ | 74 | { "\xfd" "Linux raid autodetect" }, /* 0xfd */ |
| 75 | { NULL } | 75 | { NULL } |
| 76 | }; | 76 | }; |
| 77 | 77 | ||
| @@ -167,7 +167,7 @@ sun_autoconfigure_scsi(void) | |||
| 167 | 167 | ||
| 168 | if (ioctl(fd, SCSI_IOCTL_GET_IDLUN, &id)) | 168 | if (ioctl(fd, SCSI_IOCTL_GET_IDLUN, &id)) |
| 169 | return NULL; | 169 | return NULL; |
| 170 | 170 | ||
| 171 | sprintf(buffer, | 171 | sprintf(buffer, |
| 172 | "Host: scsi%d Channel: %02d Id: %02d Lun: %02d\n", | 172 | "Host: scsi%d Channel: %02d Id: %02d Lun: %02d\n", |
| 173 | /* This is very wrong (works only if you have one HBA), | 173 | /* This is very wrong (works only if you have one HBA), |
| @@ -651,14 +651,14 @@ sun_list_table(int xtra) | |||
| 651 | uint32_t start = SUN_SSWAP32(sunlabel->partitions[i].start_cylinder) * heads * sectors; | 651 | uint32_t start = SUN_SSWAP32(sunlabel->partitions[i].start_cylinder) * heads * sectors; |
| 652 | uint32_t len = SUN_SSWAP32(sunlabel->partitions[i].num_sectors); | 652 | uint32_t len = SUN_SSWAP32(sunlabel->partitions[i].num_sectors); |
| 653 | printf("%s %c%c %9ld %9ld %9ld%c %2x %s\n", | 653 | printf("%s %c%c %9ld %9ld %9ld%c %2x %s\n", |
| 654 | partname(disk_device, i+1, w), /* device */ | 654 | partname(disk_device, i+1, w), /* device */ |
| 655 | (sunlabel->infos[i].flags & 0x01) ? 'u' : ' ', /* flags */ | 655 | (sunlabel->infos[i].flags & 0x01) ? 'u' : ' ', /* flags */ |
| 656 | (sunlabel->infos[i].flags & 0x10) ? 'r' : ' ', | 656 | (sunlabel->infos[i].flags & 0x10) ? 'r' : ' ', |
| 657 | (long) scround(start), /* start */ | 657 | (long) scround(start), /* start */ |
| 658 | (long) scround(start+len), /* end */ | 658 | (long) scround(start+len), /* end */ |
| 659 | (long) len / 2, len & 1 ? '+' : ' ', /* odd flag on end */ | 659 | (long) len / 2, len & 1 ? '+' : ' ', /* odd flag on end */ |
| 660 | sunlabel->infos[i].id, /* type id */ | 660 | sunlabel->infos[i].id, /* type id */ |
| 661 | partition_type(sunlabel->infos[i].id)); /* type name */ | 661 | partition_type(sunlabel->infos[i].id)); /* type name */ |
| 662 | } | 662 | } |
| 663 | } | 663 | } |
| 664 | } | 664 | } |
