inetd: comment tweak. no code changes
[oweals/busybox.git] / coreutils / dd.c
index 6b66366b60d363ab3584be6ba1854a23cb1a94c5..5281d811829077cf7848d9505ceb89fb3067e2ea 100644 (file)
@@ -8,7 +8,6 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <signal.h>  /* For FEATURE_DD_SIGNAL_HANDLING */
 #include "libbb.h"
 
 /* This is a NOEXEC applet. Be very careful! */
@@ -41,7 +40,7 @@ struct globals {
 #define INIT_G() memset(&G, 0, sizeof(G))
 
 
-static void dd_output_status(int ATTRIBUTE_UNUSED cur_signal)
+static void dd_output_status(int UNUSED_PARAM cur_signal)
 {
        /* Deliberately using %u, not %d */
        fprintf(stderr, "%"OFF_FMT"u+%"OFF_FMT"u records in\n"
@@ -79,7 +78,7 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs,
 #endif
 
 int dd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int dd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int dd_main(int argc UNUSED_PARAM, char **argv)
 {
        enum {
                /* Must be in the same order as OP_conv_XXX! */
@@ -297,6 +296,8 @@ int dd_main(int argc ATTRIBUTE_UNUSED, char **argv)
                                goto die_infile;
                        n = ibs;
                        bb_simple_perror_msg(infile);
+                       /* GNU dd with conv=noerror skips over "bad blocks" */
+                       xlseek(ifd, ibs, SEEK_CUR);
                }
                if ((size_t)n == ibs)
                        G.in_full++;