Make test mode output same as official version
authorGlenn L McGrath <bug1@ihug.co.nz>
Mon, 20 Jan 2003 23:34:12 +0000 (23:34 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Mon, 20 Jan 2003 23:34:12 +0000 (23:34 -0000)
libbb/run_parts.c

index 6df51a14edb51ebc95e279516943b56cb1ef4cb3..5fae80592e311f1ae3352d4d00ed454e6a45b2e7 100644 (file)
@@ -75,9 +75,9 @@ extern int run_parts(char **args, const unsigned char test_mode)
                        perror_msg_and_die("failed to stat component %s", filename);
                }
                if (S_ISREG(st.st_mode) && !access(filename, X_OK)) {
-                       if (test_mode)
-                               printf("run-parts would run %s\n", filename);
-                       else {
+                       if (test_mode) {
+                               puts("%s", filename);
+                       else {
                                /* exec_errno is common vfork variable */
                                volatile int exec_errno = 0;
                                int result;