aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.flags3
-rw-r--r--coreutils/uniq.c2
-rw-r--r--coreutils/who.c2
-rw-r--r--editors/diff.c4
-rw-r--r--editors/ed.c2
-rw-r--r--loginutils/add-remove-shell.c4
-rw-r--r--mailutils/mail.c2
-rw-r--r--mailutils/sendmail.c2
-rw-r--r--miscutils/hdparm.c58
-rw-r--r--miscutils/i2c_tools.c26
-rw-r--r--networking/arping.c2
-rw-r--r--networking/brctl.c4
-rw-r--r--printutils/lpd.c8
-rw-r--r--procps/iostat.c2
-rw-r--r--procps/powertop.c2
-rw-r--r--shell/ash.c2
-rw-r--r--shell/hush.c2
-rw-r--r--shell/shell_common.c2
-rw-r--r--util-linux/fdformat.c4
-rw-r--r--util-linux/fdisk.c94
-rw-r--r--util-linux/fdisk_gpt.c4
-rw-r--r--util-linux/fsck_minix.c16
-rw-r--r--util-linux/getopt.c2
-rw-r--r--util-linux/ipcrm.c2
24 files changed, 127 insertions, 124 deletions
diff --git a/Makefile.flags b/Makefile.flags
index 2bc83d1d9..b6cd32e42 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -56,6 +56,9 @@ CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1
56# Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary): 56# Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary):
57CFLAGS += $(call cc-option,-fno-unwind-tables,) 57CFLAGS += $(call cc-option,-fno-unwind-tables,)
58CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,) 58CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,)
59# No automatic printf->puts,putchar conversions
60# (try disabling this and comparing assembly, it's instructive)
61CFLAGS += $(call cc-option,-fno-builtin-printf,)
59 62
60# FIXME: These warnings are at least partially to be concerned about and should 63# FIXME: These warnings are at least partially to be concerned about and should
61# be fixed.. 64# be fixed..
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 9208d34ec..e0133998a 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -112,7 +112,7 @@ int uniq_main(int argc UNUSED_PARAM, char **argv)
112 /* %7lu matches GNU coreutils 6.9 */ 112 /* %7lu matches GNU coreutils 6.9 */
113 printf("%7lu ", dups + 1); 113 printf("%7lu ", dups + 1);
114 } 114 }
115 printf("%s\n", old_line); 115 puts(old_line);
116 } 116 }
117 free(old_line); 117 free(old_line);
118 } 118 }
diff --git a/coreutils/who.c b/coreutils/who.c
index 8337212c9..f694d0c60 100644
--- a/coreutils/who.c
+++ b/coreutils/who.c
@@ -81,7 +81,7 @@ int who_main(int argc UNUSED_PARAM, char **argv)
81 opt_complementary = "=0"; 81 opt_complementary = "=0";
82 opt = getopt32(argv, do_users ? "" : "aH"); 82 opt = getopt32(argv, do_users ? "" : "aH");
83 if (opt & 2) // -H 83 if (opt & 2) // -H
84 printf("USER\t\tTTY\t\tIDLE\tTIME\t\t HOST\n"); 84 puts("USER\t\tTTY\t\tIDLE\tTIME\t\t HOST");
85 85
86 setutxent(); 86 setutxent();
87 while ((ut = getutxent()) != NULL) { 87 while ((ut = getutxent()) != NULL) {
diff --git a/editors/diff.c b/editors/diff.c
index e0adcee59..a892cfdf2 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -433,7 +433,7 @@ static void fetch(FILE_and_pos_t *ft, const off_t *ix, int a, int b, int ch)
433 for (j = 0, col = 0; j < ix[i] - ix[i - 1]; j++) { 433 for (j = 0, col = 0; j < ix[i] - ix[i - 1]; j++) {
434 int c = fgetc(ft->ft_fp); 434 int c = fgetc(ft->ft_fp);
435 if (c == EOF) { 435 if (c == EOF) {
436 printf("\n\\ No newline at end of file\n"); 436 puts("\n\\ No newline at end of file");
437 return; 437 return;
438 } 438 }
439 ft->ft_pos++; 439 ft->ft_pos++;
@@ -692,7 +692,7 @@ static bool diff(FILE* fp[2], char *file[2])
692 continue; 692 continue;
693 printf(",%d", (a < b) ? b - a + 1 : 0); 693 printf(",%d", (a < b) ? b - a + 1 : 0);
694 } 694 }
695 printf(" @@\n"); 695 puts(" @@");
696 /* 696 /*
697 * Output changes in "unified" diff format--the old and new lines 697 * Output changes in "unified" diff format--the old and new lines
698 * are printed together. 698 * are printed together.
diff --git a/editors/ed.c b/editors/ed.c
index f0e5e4d5d..a4c419099 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -206,7 +206,7 @@ static void doCommands(void)
206 if (fileName) 206 if (fileName)
207 printf("\"%s\"\n", fileName); 207 printf("\"%s\"\n", fileName);
208 else 208 else
209 printf("No file name\n"); 209 puts("No file name");
210 break; 210 break;
211 } 211 }
212 free(fileName); 212 free(fileName);
diff --git a/loginutils/add-remove-shell.c b/loginutils/add-remove-shell.c
index e492b6e5a..9419ff5e7 100644
--- a/loginutils/add-remove-shell.c
+++ b/loginutils/add-remove-shell.c
@@ -100,7 +100,7 @@ int add_remove_shell_main(int argc UNUSED_PARAM, char **argv)
100 cpp++; 100 cpp++;
101 } 101 }
102 /* copy shell name from old to new file */ 102 /* copy shell name from old to new file */
103 printf("%s\n", line); 103 puts(line);
104 next_line: 104 next_line:
105 free(line); 105 free(line);
106 } 106 }
@@ -112,7 +112,7 @@ int add_remove_shell_main(int argc UNUSED_PARAM, char **argv)
112 char **cpp = argv; 112 char **cpp = argv;
113 while (*cpp) { 113 while (*cpp) {
114 if (*cpp != dont_add) 114 if (*cpp != dont_add)
115 printf("%s\n", *cpp); 115 puts(*cpp);
116 cpp++; 116 cpp++;
117 } 117 }
118 } 118 }
diff --git a/mailutils/mail.c b/mailutils/mail.c
index 199f64407..a7e43c0d1 100644
--- a/mailutils/mail.c
+++ b/mailutils/mail.c
@@ -154,7 +154,7 @@ void FAST_FUNC encode_base64(char *fname, const char *text, const char *eol)
154 // encode the buffer we just read in 154 // encode the buffer we just read in
155 bb_uuencode(dst_buf, src_buf, size, bb_uuenc_tbl_base64); 155 bb_uuencode(dst_buf, src_buf, size, bb_uuenc_tbl_base64);
156 if (fname) { 156 if (fname) {
157 printf("%s\n", eol); 157 puts(eol);
158 } else { 158 } else {
159 src_buf += size; 159 src_buf += size;
160 len -= size; 160 len -= size;
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
index 9455b4e7a..4355e4dc5 100644
--- a/mailutils/sendmail.c
+++ b/mailutils/sendmail.c
@@ -375,7 +375,7 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
375 // N.B. we need to escape the leading dot regardless of 375 // N.B. we need to escape the leading dot regardless of
376 // whether it is single or not character on the line 376 // whether it is single or not character on the line
377 if ('.' == s[0] /*&& '\0' == s[1] */) 377 if ('.' == s[0] /*&& '\0' == s[1] */)
378 printf("."); 378 bb_putchar('.');
379 // dump read line 379 // dump read line
380 send_r_n(s); 380 send_r_n(s);
381 free(s); 381 free(s);
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index f0e9c9d75..9c486e7aa 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -763,9 +763,9 @@ static void identify(uint16_t *val)
763 ) { 763 ) {
764 like_std = 5; 764 like_std = 5;
765 if ((val[CONFIG]==STBY_NID_VAL) || (val[CONFIG]==STBY_ID_VAL)) 765 if ((val[CONFIG]==STBY_NID_VAL) || (val[CONFIG]==STBY_ID_VAL))
766 printf("powers-up in standby; SET FEATURES subcmd spins-up.\n"); 766 puts("powers-up in standby; SET FEATURES subcmd spins-up.");
767 if (((val[CONFIG]==STBY_NID_VAL) || (val[CONFIG]==PWRD_NID_VAL)) && (val[GEN_CONFIG] & INCOMPLETE)) 767 if (((val[CONFIG]==STBY_NID_VAL) || (val[CONFIG]==PWRD_NID_VAL)) && (val[GEN_CONFIG] & INCOMPLETE))
768 printf("\n\tWARNING: ID response incomplete.\n\tFollowing data may be incorrect.\n\n"); 768 puts("\n\tWARNING: ID response incomplete.\n\tFollowing data may be incorrect.\n");
769 } 769 }
770 770
771 /* output the model and serial numbers and the fw revision */ 771 /* output the model and serial numbers and the fw revision */
@@ -875,7 +875,7 @@ static void identify(uint16_t *val)
875 if (min_std == 0xffff) 875 if (min_std == 0xffff)
876 min_std = like_std > 4 ? like_std - 3 : 1; 876 min_std = like_std > 4 ? like_std - 3 : 1;
877 877
878 printf("Configuration:\n"); 878 puts("Configuration:");
879 /* more info from the general configuration word */ 879 /* more info from the general configuration word */
880 if ((eqpt != CDROM) && (like_std == 1)) { 880 if ((eqpt != CDROM) && (like_std == 1)) {
881 jj = val[GEN_CONFIG] >> 1; 881 jj = val[GEN_CONFIG] >> 1;
@@ -909,7 +909,7 @@ static void identify(uint16_t *val)
909 mm = 0; 909 mm = 0;
910 bbbig = 0; 910 bbbig = 0;
911 if ((ll > 0x00FBFC10) && (!val[LCYLS])) 911 if ((ll > 0x00FBFC10) && (!val[LCYLS]))
912 printf("\tCHS addressing not supported\n"); 912 puts("\tCHS addressing not supported");
913 else { 913 else {
914 jj = val[WHATS_VALID] & OK_W54_58; 914 jj = val[WHATS_VALID] & OK_W54_58;
915 printf("\tLogical\t\tmax\tcurrent\n" 915 printf("\tLogical\t\tmax\tcurrent\n"
@@ -980,7 +980,7 @@ static void identify(uint16_t *val)
980 !(val[CAPAB_0] & IORDY_SUP) ? "(may be)" : "", 980 !(val[CAPAB_0] & IORDY_SUP) ? "(may be)" : "",
981 (val[CAPAB_0] & IORDY_OFF) ? "" :"not"); 981 (val[CAPAB_0] & IORDY_OFF) ? "" :"not");
982 } else 982 } else
983 printf("no IORDY\n"); 983 puts("no IORDY");
984 984
985 if ((like_std == 1) && val[BUF_TYPE]) { 985 if ((like_std == 1) && val[BUF_TYPE]) {
986 printf("\tBuffer type: %04x: %s%s\n", val[BUF_TYPE], 986 printf("\tBuffer type: %04x: %s%s\n", val[BUF_TYPE],
@@ -1012,13 +1012,13 @@ static void identify(uint16_t *val)
1012 } 1012 }
1013 printf("\tR/W multiple sector transfer: "); 1013 printf("\tR/W multiple sector transfer: ");
1014 if ((like_std < 3) && !(val[SECTOR_XFER_MAX] & SECTOR_XFER)) 1014 if ((like_std < 3) && !(val[SECTOR_XFER_MAX] & SECTOR_XFER))
1015 printf("not supported\n"); 1015 puts("not supported");
1016 else { 1016 else {
1017 printf("Max = %u\tCurrent = ", val[SECTOR_XFER_MAX] & SECTOR_XFER); 1017 printf("Max = %u\tCurrent = ", val[SECTOR_XFER_MAX] & SECTOR_XFER);
1018 if (val[SECTOR_XFER_CUR] & MULTIPLE_SETTING_VALID) 1018 if (val[SECTOR_XFER_CUR] & MULTIPLE_SETTING_VALID)
1019 printf("%u\n", val[SECTOR_XFER_CUR] & SECTOR_XFER); 1019 printf("%u\n", val[SECTOR_XFER_CUR] & SECTOR_XFER);
1020 else 1020 else
1021 printf("?\n"); 1021 puts("?");
1022 } 1022 }
1023 if ((like_std > 3) && (val[CMDS_SUPP_1] & 0x0008)) { 1023 if ((like_std > 3) && (val[CMDS_SUPP_1] & 0x0008)) {
1024 /* We print out elsewhere whether the APM feature is enabled or 1024 /* We print out elsewhere whether the APM feature is enabled or
@@ -1040,7 +1040,7 @@ static void identify(uint16_t *val)
1040 } else { 1040 } else {
1041 /* ATAPI */ 1041 /* ATAPI */
1042 if (eqpt != CDROM && (val[CAPAB_0] & SWRST_REQ)) 1042 if (eqpt != CDROM && (val[CAPAB_0] & SWRST_REQ))
1043 printf("\tATA sw reset required\n"); 1043 puts("\tATA sw reset required");
1044 1044
1045 if (val[PKT_REL] || val[SVC_NBSY]) { 1045 if (val[PKT_REL] || val[SVC_NBSY]) {
1046 printf("\tOverlap support:"); 1046 printf("\tOverlap support:");
@@ -1056,7 +1056,7 @@ static void identify(uint16_t *val)
1056 /* DMA stuff. Check that only one DMA mode is selected. */ 1056 /* DMA stuff. Check that only one DMA mode is selected. */
1057 printf("\tDMA: "); 1057 printf("\tDMA: ");
1058 if (!(val[CAPAB_0] & DMA_SUP)) 1058 if (!(val[CAPAB_0] & DMA_SUP))
1059 printf("not supported\n"); 1059 puts("not supported");
1060 else { 1060 else {
1061 if (val[DMA_MODE] && !val[SINGLE_DMA] && !val[MULTI_DMA]) 1061 if (val[DMA_MODE] && !val[SINGLE_DMA] && !val[MULTI_DMA])
1062 printf(" sdma%u\n", (val[DMA_MODE] & MODE) >> 8); 1062 printf(" sdma%u\n", (val[DMA_MODE] & MODE) >> 8);
@@ -1079,7 +1079,7 @@ static void identify(uint16_t *val)
1079 bb_putchar('\n'); 1079 bb_putchar('\n');
1080 1080
1081 if ((dev == ATAPI_DEV) && (eqpt != CDROM) && (val[CAPAB_0] & DMA_IL_SUP)) 1081 if ((dev == ATAPI_DEV) && (eqpt != CDROM) && (val[CAPAB_0] & DMA_IL_SUP))
1082 printf("\t\tInterleaved DMA support\n"); 1082 puts("\t\tInterleaved DMA support");
1083 1083
1084 if ((val[WHATS_VALID] & OK_W64_70) 1084 if ((val[WHATS_VALID] & OK_W64_70)
1085 && (val[DMA_TIME_MIN] || val[DMA_TIME_NORM]) 1085 && (val[DMA_TIME_MIN] || val[DMA_TIME_NORM])
@@ -1121,8 +1121,8 @@ static void identify(uint16_t *val)
1121 } 1121 }
1122 1122
1123 if ((val[CMDS_SUPP_1] & VALID) == VALID_VAL) { 1123 if ((val[CMDS_SUPP_1] & VALID) == VALID_VAL) {
1124 printf("Commands/features:\n" 1124 puts("Commands/features:\n"
1125 "\tEnabled\tSupported:\n"); 1125 "\tEnabled\tSupported:");
1126 jj = val[CMDS_SUPP_0]; 1126 jj = val[CMDS_SUPP_0];
1127 kk = val[CMDS_EN_0]; 1127 kk = val[CMDS_EN_0];
1128 for (ii = 0; ii < NUM_CMD_FEAT_STR; ii++) { 1128 for (ii = 0; ii < NUM_CMD_FEAT_STR; ii++) {
@@ -1150,7 +1150,7 @@ static void identify(uint16_t *val)
1150 if ((eqpt != CDROM) && (like_std > 3) 1150 if ((eqpt != CDROM) && (like_std > 3)
1151 && (val[SECU_STATUS] || val[ERASE_TIME] || val[ENH_ERASE_TIME]) 1151 && (val[SECU_STATUS] || val[ERASE_TIME] || val[ENH_ERASE_TIME])
1152 ) { 1152 ) {
1153 printf("Security:\n"); 1153 puts("Security:");
1154 if (val[PSWD_CODE] && (val[PSWD_CODE] != NOVAL_1)) 1154 if (val[PSWD_CODE] && (val[PSWD_CODE] != NOVAL_1))
1155 printf("\tMaster password revision code = %u\n", val[PSWD_CODE]); 1155 printf("\tMaster password revision code = %u\n", val[PSWD_CODE]);
1156 jj = val[SECU_STATUS]; 1156 jj = val[SECU_STATUS];
@@ -1366,7 +1366,7 @@ static NOINLINE void dump_identity(const struct hd_driveid *id)
1366 } 1366 }
1367 } 1367 }
1368#endif /* __NEW_HD_DRIVE_ID */ 1368#endif /* __NEW_HD_DRIVE_ID */
1369 printf("\n\n * current active mode\n\n"); 1369 puts("\n\n * current active mode\n");
1370} 1370}
1371#endif 1371#endif
1372 1372
@@ -1507,7 +1507,7 @@ static void bus_state_value(unsigned value)
1507 else if (value == BUSSTATE_OFF) 1507 else if (value == BUSSTATE_OFF)
1508 on_off(0); 1508 on_off(0);
1509 else if (value == BUSSTATE_TRISTATE) 1509 else if (value == BUSSTATE_TRISTATE)
1510 printf(" (tristate)\n"); 1510 puts(" (tristate)");
1511 else 1511 else
1512 printf(" (unknown: %u)\n", value); 1512 printf(" (unknown: %u)\n", value);
1513} 1513}
@@ -1531,7 +1531,7 @@ static void interpret_standby(uint8_t standby)
1531 printf("vendor-specific"); 1531 printf("vendor-specific");
1532 if (standby == 254) 1532 if (standby == 254)
1533 printf("reserved"); 1533 printf("reserved");
1534 printf(")\n"); 1534 puts(")");
1535} 1535}
1536 1536
1537static const uint8_t xfermode_val[] ALIGN1 = { 1537static const uint8_t xfermode_val[] ALIGN1 = {
@@ -1582,7 +1582,7 @@ static void interpret_xfermode(unsigned xfermode)
1582 printf("UltraDMA mode%u", xfermode - 64); 1582 printf("UltraDMA mode%u", xfermode - 64);
1583 else 1583 else
1584 printf("unknown"); 1584 printf("unknown");
1585 printf(")\n"); 1585 puts(")");
1586} 1586}
1587#endif /* HDIO_DRIVE_CMD */ 1587#endif /* HDIO_DRIVE_CMD */
1588 1588
@@ -1633,7 +1633,7 @@ static void process_dev(char *devname)
1633 if (noisy_piomode) { 1633 if (noisy_piomode) {
1634 printf(" attempting to "); 1634 printf(" attempting to ");
1635 if (piomode == 255) 1635 if (piomode == 255)
1636 printf("auto-tune PIO mode\n"); 1636 puts("auto-tune PIO mode");
1637 else if (piomode < 100) 1637 else if (piomode < 100)
1638 printf("set PIO mode to %d\n", piomode); 1638 printf("set PIO mode to %d\n", piomode);
1639 else if (piomode < 200) 1639 else if (piomode < 200)
@@ -1762,7 +1762,7 @@ static void process_dev(char *devname)
1762#ifndef WIN_STANDBYNOW2 1762#ifndef WIN_STANDBYNOW2
1763#define WIN_STANDBYNOW2 0x94 1763#define WIN_STANDBYNOW2 0x94
1764#endif 1764#endif
1765 printf(" issuing standby command\n"); 1765 puts(" issuing standby command");
1766 args[0] = WIN_STANDBYNOW1; 1766 args[0] = WIN_STANDBYNOW1;
1767 ioctl_alt_or_warn(HDIO_DRIVE_CMD, args, WIN_STANDBYNOW2); 1767 ioctl_alt_or_warn(HDIO_DRIVE_CMD, args, WIN_STANDBYNOW2);
1768 } 1768 }
@@ -1773,13 +1773,13 @@ static void process_dev(char *devname)
1773#ifndef WIN_SLEEPNOW2 1773#ifndef WIN_SLEEPNOW2
1774#define WIN_SLEEPNOW2 0x99 1774#define WIN_SLEEPNOW2 0x99
1775#endif 1775#endif
1776 printf(" issuing sleep command\n"); 1776 puts(" issuing sleep command");
1777 args[0] = WIN_SLEEPNOW1; 1777 args[0] = WIN_SLEEPNOW1;
1778 ioctl_alt_or_warn(HDIO_DRIVE_CMD, args, WIN_SLEEPNOW2); 1778 ioctl_alt_or_warn(HDIO_DRIVE_CMD, args, WIN_SLEEPNOW2);
1779 } 1779 }
1780 if (set_seagate) { 1780 if (set_seagate) {
1781 args[0] = 0xfb; 1781 args[0] = 0xfb;
1782 printf(" disabling Seagate auto powersaving mode\n"); 1782 puts(" disabling Seagate auto powersaving mode");
1783 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args); 1783 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1784 } 1784 }
1785 if (getset_standby == IS_SET) { 1785 if (getset_standby == IS_SET) {
@@ -1815,17 +1815,17 @@ static void process_dev(char *devname)
1815 if (!ioctl_or_warn(fd, HDIO_GET_32BIT, &parm)) { 1815 if (!ioctl_or_warn(fd, HDIO_GET_32BIT, &parm)) {
1816 printf(" IO_support\t=%3ld (", parm); 1816 printf(" IO_support\t=%3ld (", parm);
1817 if (parm == 0) 1817 if (parm == 0)
1818 printf("default 16-bit)\n"); 1818 puts("default 16-bit)");
1819 else if (parm == 2) 1819 else if (parm == 2)
1820 printf("16-bit)\n"); 1820 puts("16-bit)");
1821 else if (parm == 1) 1821 else if (parm == 1)
1822 printf("32-bit)\n"); 1822 puts("32-bit)");
1823 else if (parm == 3) 1823 else if (parm == 3)
1824 printf("32-bit w/sync)\n"); 1824 puts("32-bit w/sync)");
1825 else if (parm == 8) 1825 else if (parm == 8)
1826 printf("Request-Queue-Bypass)\n"); 1826 puts("Request-Queue-Bypass)");
1827 else 1827 else
1828 printf("\?\?\?)\n"); 1828 puts("\?\?\?)");
1829 } 1829 }
1830 } 1830 }
1831 if (getset_unmask) { 1831 if (getset_unmask) {
@@ -1837,7 +1837,7 @@ static void process_dev(char *devname)
1837 if (!ioctl_or_warn(fd, HDIO_GET_DMA, &parm)) { 1837 if (!ioctl_or_warn(fd, HDIO_GET_DMA, &parm)) {
1838 printf(fmt, "using_dma", parm); 1838 printf(fmt, "using_dma", parm);
1839 if (parm == 8) 1839 if (parm == 8)
1840 printf(" (DMA-Assisted-PIO)\n"); 1840 puts(" (DMA-Assisted-PIO)");
1841 else 1841 else
1842 on_off(parm != 0); 1842 on_off(parm != 0);
1843 } 1843 }
@@ -1921,7 +1921,7 @@ static void process_dev(char *devname)
1921 id.multsect_valid &= ~1; 1921 id.multsect_valid &= ~1;
1922 dump_identity(&id); 1922 dump_identity(&id);
1923 } else if (errno == -ENOMSG) 1923 } else if (errno == -ENOMSG)
1924 printf(" no identification info available\n"); 1924 puts(" no identification info available");
1925 else if (ENABLE_IOCTL_HEX2STR_ERROR) /* To be coherent with ioctl_or_warn */ 1925 else if (ENABLE_IOCTL_HEX2STR_ERROR) /* To be coherent with ioctl_or_warn */
1926 bb_perror_msg("HDIO_GET_IDENTITY"); 1926 bb_perror_msg("HDIO_GET_IDENTITY");
1927 else 1927 else
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 4b26b7bdc..292ff88dd 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -701,7 +701,7 @@ int i2cset_main(int argc, char **argv)
701 } 701 }
702 702
703 if (status < 0) { 703 if (status < 0) {
704 printf("Warning - readback failed\n"); 704 puts("Warning - readback failed");
705 } else 705 } else
706 if (status != val) { 706 if (status != val) {
707 printf("Warning - data mismatch - wrote " 707 printf("Warning - data mismatch - wrote "
@@ -756,8 +756,8 @@ static void dump_data(int bus_fd, int mode, unsigned first,
756{ 756{
757 int i, j, res; 757 int i, j, res;
758 758
759 printf(" 0 1 2 3 4 5 6 7 8 9 a b c d e f" 759 puts(" 0 1 2 3 4 5 6 7 8 9 a b c d e f"
760 " 0123456789abcdef\n"); 760 " 0123456789abcdef");
761 761
762 for (i = 0; i < I2CDUMP_NUM_REGS; i += 0x10) { 762 for (i = 0; i < I2CDUMP_NUM_REGS; i += 0x10) {
763 if (mode == I2C_SMBUS_BLOCK_DATA && i >= blen) 763 if (mode == I2C_SMBUS_BLOCK_DATA && i >= blen)
@@ -826,22 +826,22 @@ static void dump_data(int bus_fd, int mode, unsigned first,
826 break; 826 break;
827 /* Skip unwanted registers */ 827 /* Skip unwanted registers */
828 if (i+j < first || i+j > last) { 828 if (i+j < first || i+j > last) {
829 printf(" "); 829 bb_putchar(' ');
830 continue; 830 continue;
831 } 831 }
832 832
833 res = block[i+j]; 833 res = block[i+j];
834 if (res < 0) { 834 if (res < 0) {
835 printf("X"); 835 bb_putchar('X');
836 } else if (res == 0x00 || res == 0xff) { 836 } else if (res == 0x00 || res == 0xff) {
837 printf("."); 837 bb_putchar('.');
838 } else if (res < 32 || res >= 127) { 838 } else if (res < 32 || res >= 127) {
839 printf("?"); 839 bb_putchar('?');
840 } else { 840 } else {
841 printf("%c", res); 841 bb_putchar(res);
842 } 842 }
843 } 843 }
844 printf("\n"); 844 bb_putchar('\n');
845 } 845 }
846} 846}
847 847
@@ -850,7 +850,7 @@ static void dump_word_data(int bus_fd, unsigned first, unsigned last)
850 int i, j, rv; 850 int i, j, rv;
851 851
852 /* Word data. */ 852 /* Word data. */
853 printf(" 0,8 1,9 2,a 3,b 4,c 5,d 6,e 7,f\n"); 853 puts(" 0,8 1,9 2,a 3,b 4,c 5,d 6,e 7,f");
854 for (i = 0; i < 256; i += 8) { 854 for (i = 0; i < 256; i += 8) {
855 if (i/8 < first/8) 855 if (i/8 < first/8)
856 continue; 856 continue;
@@ -871,7 +871,7 @@ static void dump_word_data(int bus_fd, unsigned first, unsigned last)
871 else 871 else
872 printf("%04x ", rv & 0xffff); 872 printf("%04x ", rv & 0xffff);
873 } 873 }
874 printf("\n"); 874 bb_putchar('\n');
875 } 875 }
876} 876}
877 877
@@ -1267,7 +1267,7 @@ int i2cdetect_main(int argc UNUSED_PARAM, char **argv)
1267 if (!(opts & opt_y)) 1267 if (!(opts & opt_y))
1268 confirm_action(-1, -1, -1, 0); 1268 confirm_action(-1, -1, -1, 0);
1269 1269
1270 printf(" 0 1 2 3 4 5 6 7 8 9 a b c d e f\n"); 1270 puts(" 0 1 2 3 4 5 6 7 8 9 a b c d e f");
1271 for (i = 0; i < 128; i += 16) { 1271 for (i = 0; i < 128; i += 16) {
1272 printf("%02x: ", i); 1272 printf("%02x: ", i);
1273 for(j = 0; j < 16; j++) { 1273 for(j = 0; j < 16; j++) {
@@ -1325,7 +1325,7 @@ int i2cdetect_main(int argc UNUSED_PARAM, char **argv)
1325 else 1325 else
1326 printf("%02x ", i+j); 1326 printf("%02x ", i+j);
1327 } 1327 }
1328 printf("\n"); 1328 bb_putchar('\n');
1329 } 1329 }
1330 1330
1331 return 0; 1331 return 0;
diff --git a/networking/arping.c b/networking/arping.c
index ce7fa299c..ef205e5e6 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -249,7 +249,7 @@ static void recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
249 unsigned diff = MONOTONIC_US() - last; 249 unsigned diff = MONOTONIC_US() - last;
250 printf(" %u.%03ums\n", diff / 1000, diff % 1000); 250 printf(" %u.%03ums\n", diff / 1000, diff % 1000);
251 } else { 251 } else {
252 printf(" UNSOLICITED?\n"); 252 puts(" UNSOLICITED?");
253 } 253 }
254 fflush_all(); 254 fflush_all();
255 } 255 }
diff --git a/networking/brctl.c b/networking/brctl.c
index 8043d600b..c01a86998 100644
--- a/networking/brctl.c
+++ b/networking/brctl.c
@@ -217,7 +217,7 @@ int brctl_main(int argc UNUSED_PARAM, char **argv)
217 arm_ioctl(args, BRCTL_GET_BRIDGES, 217 arm_ioctl(args, BRCTL_GET_BRIDGES,
218 (unsigned long) bridx, MAX_PORTS); 218 (unsigned long) bridx, MAX_PORTS);
219 num = xioctl(fd, SIOCGIFBR, args); 219 num = xioctl(fd, SIOCGIFBR, args);
220 printf("bridge name\tbridge id\t\tSTP enabled\tinterfaces\n"); 220 puts("bridge name\tbridge id\t\tSTP enabled\tinterfaces");
221 for (i = 0; i < num; i++) { 221 for (i = 0; i < num; i++) {
222 char ifname[IFNAMSIZ]; 222 char ifname[IFNAMSIZ];
223 int j, tabs; 223 int j, tabs;
@@ -236,7 +236,7 @@ int brctl_main(int argc UNUSED_PARAM, char **argv)
236 /* print bridge id */ 236 /* print bridge id */
237 x = (unsigned char *) &bi.bridge_id; 237 x = (unsigned char *) &bi.bridge_id;
238 for (j = 0; j < 8; j++) { 238 for (j = 0; j < 8; j++) {
239 printf("%.2x", x[j]); 239 printf("%02x", x[j]);
240 if (j == 1) 240 if (j == 1)
241 bb_putchar('.'); 241 bb_putchar('.');
242 } 242 }
diff --git a/printutils/lpd.c b/printutils/lpd.c
index eaf42c08b..c98bbb347 100644
--- a/printutils/lpd.c
+++ b/printutils/lpd.c
@@ -200,7 +200,7 @@ int lpd_main(int argc UNUSED_PARAM, char *argv[])
200 if (2 != s[0] && 3 != s[0]) 200 if (2 != s[0] && 3 != s[0])
201 goto unsupported_cmd; 201 goto unsupported_cmd;
202 if (spooling & (1 << (s[0]-1))) { 202 if (spooling & (1 << (s[0]-1))) {
203 printf("Duplicated subcommand\n"); 203 puts("Duplicated subcommand");
204 goto err_exit; 204 goto err_exit;
205 } 205 }
206 // get filename 206 // get filename
@@ -208,7 +208,7 @@ int lpd_main(int argc UNUSED_PARAM, char *argv[])
208 fname = strchr(s, ' '); 208 fname = strchr(s, ' ');
209 if (!fname) { 209 if (!fname) {
210// bad_fname: 210// bad_fname:
211 printf("No or bad filename\n"); 211 puts("No or bad filename");
212 goto err_exit; 212 goto err_exit;
213 } 213 }
214 *fname++ = '\0'; 214 *fname++ = '\0';
@@ -219,13 +219,13 @@ int lpd_main(int argc UNUSED_PARAM, char *argv[])
219 // get length 219 // get length
220 expected_len = bb_strtou(s + 1, NULL, 10); 220 expected_len = bb_strtou(s + 1, NULL, 10);
221 if (errno || expected_len < 0) { 221 if (errno || expected_len < 0) {
222 printf("Bad length\n"); 222 puts("Bad length");
223 goto err_exit; 223 goto err_exit;
224 } 224 }
225 if (2 == s[0] && expected_len > 16 * 1024) { 225 if (2 == s[0] && expected_len > 16 * 1024) {
226 // SECURITY: 226 // SECURITY:
227 // ctrlfile can't be big (we want to read it back later!) 227 // ctrlfile can't be big (we want to read it back later!)
228 printf("File is too big\n"); 228 puts("File is too big");
229 goto err_exit; 229 goto err_exit;
230 } 230 }
231 231
diff --git a/procps/iostat.c b/procps/iostat.c
index 8d272c87c..c290c594b 100644
--- a/procps/iostat.c
+++ b/procps/iostat.c
@@ -142,7 +142,7 @@ static void print_timestamp(void)
142 /* %x: date representation for the current locale */ 142 /* %x: date representation for the current locale */
143 /* %X: time representation for the current locale */ 143 /* %X: time representation for the current locale */
144 strftime(buf, sizeof(buf), "%x %X", &G.tmtime); 144 strftime(buf, sizeof(buf), "%x %X", &G.tmtime);
145 printf("%s\n", buf); 145 puts(buf);
146} 146}
147 147
148static cputime_t get_smp_uptime(void) 148static cputime_t get_smp_uptime(void)
diff --git a/procps/powertop.c b/procps/powertop.c
index 1de5d329e..18418100f 100644
--- a/procps/powertop.c
+++ b/procps/powertop.c
@@ -704,7 +704,7 @@ int powertop_main(int UNUSED_PARAM argc, char UNUSED_PARAM **argv)
704 /* Get number of CPUs */ 704 /* Get number of CPUs */
705 G.total_cpus = get_cpu_count(); 705 G.total_cpus = get_cpu_count();
706 706
707 printf("Collecting data for "DEFAULT_SLEEP_STR" seconds\n"); 707 puts("Collecting data for "DEFAULT_SLEEP_STR" seconds");
708 708
709#if ENABLE_FEATURE_USE_TERMIOS 709#if ENABLE_FEATURE_USE_TERMIOS
710 tcgetattr(0, (void *)&G.init_settings); 710 tcgetattr(0, (void *)&G.init_settings);
diff --git a/shell/ash.c b/shell/ash.c
index b835415b5..7d20b8860 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -9681,7 +9681,7 @@ preadfd(void)
9681 } 9681 }
9682# if ENABLE_ASH_IDLE_TIMEOUT 9682# if ENABLE_ASH_IDLE_TIMEOUT
9683 else if (errno == EAGAIN && timeout > 0) { 9683 else if (errno == EAGAIN && timeout > 0) {
9684 printf("\007timed out waiting for input: auto-logout\n"); 9684 puts("\007timed out waiting for input: auto-logout");
9685 exitshell(); 9685 exitshell();
9686 } 9686 }
9687# endif 9687# endif
diff --git a/shell/hush.c b/shell/hush.c
index bccd9c1e9..f085ed3eb 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -6794,7 +6794,7 @@ static int checkjobs(struct pipe *fg_pipe)
6794 int sig = WTERMSIG(status); 6794 int sig = WTERMSIG(status);
6795 if (i == fg_pipe->num_cmds-1) 6795 if (i == fg_pipe->num_cmds-1)
6796 /* TODO: use strsignal() instead for bash compat? but that's bloat... */ 6796 /* TODO: use strsignal() instead for bash compat? but that's bloat... */
6797 printf("%s\n", sig == SIGINT || sig == SIGPIPE ? "" : get_signame(sig)); 6797 puts(sig == SIGINT || sig == SIGPIPE ? "" : get_signame(sig));
6798 /* TODO: if (WCOREDUMP(status)) + " (core dumped)"; */ 6798 /* TODO: if (WCOREDUMP(status)) + " (core dumped)"; */
6799 /* TODO: MIPS has 128 sigs (1..128), what if sig==128 here? 6799 /* TODO: MIPS has 128 sigs (1..128), what if sig==128 here?
6800 * Maybe we need to use sig | 128? */ 6800 * Maybe we need to use sig | 128? */
diff --git a/shell/shell_common.c b/shell/shell_common.c
index 2b6f7dc92..8c9607c8c 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -380,7 +380,7 @@ static void printlim(unsigned opts, const struct rlimit *limit,
380 val = limit->rlim_cur; 380 val = limit->rlim_cur;
381 381
382 if (val == RLIM_INFINITY) 382 if (val == RLIM_INFINITY)
383 printf("unlimited\n"); 383 puts("unlimited");
384 else { 384 else {
385 val >>= l->factor_shift; 385 val >>= l->factor_shift;
386 printf("%llu\n", (long long) val); 386 printf("%llu\n", (long long) val);
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c
index 6f49cec8f..6ef6445e6 100644
--- a/util-linux/fdformat.c
+++ b/util-linux/fdformat.c
@@ -93,7 +93,7 @@ int fdformat_main(int argc UNUSED_PARAM, char **argv)
93 } 93 }
94 94
95 xioctl(fd, FDFMTEND, NULL); 95 xioctl(fd, FDFMTEND, NULL);
96 printf("done\n"); 96 puts("Done");
97 97
98 /* VERIFY */ 98 /* VERIFY */
99 if (verify) { 99 if (verify) {
@@ -126,7 +126,7 @@ int fdformat_main(int argc UNUSED_PARAM, char **argv)
126 126
127 if (ENABLE_FEATURE_CLEAN_UP) free(data); 127 if (ENABLE_FEATURE_CLEAN_UP) free(data);
128 128
129 printf("done\n"); 129 puts("Done");
130 } 130 }
131 131
132 if (ENABLE_FEATURE_CLEAN_UP) close(fd); 132 if (ENABLE_FEATURE_CLEAN_UP) close(fd);
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 7fe70fb72..f49ce95a4 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -1102,11 +1102,11 @@ warn_geometry(void)
1102 printf(" sectors"); 1102 printf(" sectors");
1103 if (!g_cylinders) 1103 if (!g_cylinders)
1104 printf(" cylinders"); 1104 printf(" cylinders");
1105 printf(
1106#if ENABLE_FEATURE_FDISK_WRITABLE 1105#if ENABLE_FEATURE_FDISK_WRITABLE
1107 " (settable in the extra functions menu)" 1106 puts(" (settable in the extra functions menu)");
1107#else
1108 bb_putchar('\n');
1108#endif 1109#endif
1109 "\n");
1110 return 1; 1110 return 1;
1111} 1111}
1112 1112
@@ -1150,7 +1150,7 @@ read_extended(int ext)
1150 1150
1151 p = pex->part_table; 1151 p = pex->part_table;
1152 if (!get_start_sect(p)) { 1152 if (!get_start_sect(p)) {
1153 printf("Bad offset in primary extended partition\n"); 1153 puts("Bad offset in primary extended partition");
1154 return; 1154 return;
1155 } 1155 }
1156 1156
@@ -1450,8 +1450,8 @@ static int get_boot(void)
1450 current_label_type = LABEL_OSF; 1450 current_label_type = LABEL_OSF;
1451 return 0; 1451 return 0;
1452 } 1452 }
1453 printf("This disk has both DOS and BSD magic.\n" 1453 puts("This disk has both DOS and BSD magic.\n"
1454 "Give the 'b' command to go to BSD mode.\n"); 1454 "Give the 'b' command to go to BSD mode.");
1455 } 1455 }
1456#endif 1456#endif
1457 1457
@@ -1461,9 +1461,9 @@ static int get_boot(void)
1461#else 1461#else
1462 if (!valid_part_table_flag(MBRbuffer)) { 1462 if (!valid_part_table_flag(MBRbuffer)) {
1463 if (what == OPEN_MAIN) { 1463 if (what == OPEN_MAIN) {
1464 printf("Device contains neither a valid DOS " 1464 puts("Device contains neither a valid DOS "
1465 "partition table, nor Sun, SGI, OSF or GPT " 1465 "partition table, nor Sun, SGI, OSF or GPT "
1466 "disklabel\n"); 1466 "disklabel");
1467#ifdef __sparc__ 1467#ifdef __sparc__
1468 IF_FEATURE_SUN_LABEL(create_sunlabel();) 1468 IF_FEATURE_SUN_LABEL(create_sunlabel();)
1469#else 1469#else
@@ -1596,7 +1596,7 @@ read_int(sector_t low, sector_t dflt, sector_t high, sector_t base, const char *
1596 } 1596 }
1597 if (value >= low && value <= high) 1597 if (value >= low && value <= high)
1598 break; 1598 break;
1599 printf("Value is out of range\n"); 1599 puts("Value is out of range");
1600 } 1600 }
1601 return value; 1601 return value;
1602} 1602}
@@ -1641,7 +1641,7 @@ get_existing_partition(int warn, unsigned max)
1641 printf("Selected partition %u\n", pno+1); 1641 printf("Selected partition %u\n", pno+1);
1642 return pno; 1642 return pno;
1643 } 1643 }
1644 printf("No partition is defined yet!\n"); 1644 puts("No partition is defined yet!");
1645 return -1; 1645 return -1;
1646 1646
1647 not_unique: 1647 not_unique:
@@ -1668,7 +1668,7 @@ get_nonexisting_partition(int warn, unsigned max)
1668 printf("Selected partition %u\n", pno+1); 1668 printf("Selected partition %u\n", pno+1);
1669 return pno; 1669 return pno;
1670 } 1670 }
1671 printf("All primary partitions have been defined already!\n"); 1671 puts("All primary partitions have been defined already!");
1672 return -1; 1672 return -1;
1673 1673
1674 not_unique: 1674 not_unique:
@@ -1703,10 +1703,10 @@ toggle_dos_compatibility_flag(void)
1703 dos_compatible_flag = 1 - dos_compatible_flag; 1703 dos_compatible_flag = 1 - dos_compatible_flag;
1704 if (dos_compatible_flag) { 1704 if (dos_compatible_flag) {
1705 sector_offset = g_sectors; 1705 sector_offset = g_sectors;
1706 printf("DOS Compatibility flag is set\n"); 1706 printf("DOS Compatibility flag is %sset\n", "");
1707 } else { 1707 } else {
1708 sector_offset = 1; 1708 sector_offset = 1;
1709 printf("DOS Compatibility flag is not set\n"); 1709 printf("DOS Compatibility flag is %sset\n", "not ");
1710 } 1710 }
1711} 1711}
1712 1712
@@ -1813,16 +1813,16 @@ change_sysid(void)
1813 sys = read_hex(get_sys_types()); 1813 sys = read_hex(get_sys_types());
1814 1814
1815 if (!sys && !LABEL_IS_SGI && !LABEL_IS_SUN) { 1815 if (!sys && !LABEL_IS_SGI && !LABEL_IS_SUN) {
1816 printf("Type 0 means free space to many systems\n" 1816 puts("Type 0 means free space to many systems\n"
1817 "(but not to Linux). Having partitions of\n" 1817 "(but not to Linux). Having partitions of\n"
1818 "type 0 is probably unwise.\n"); 1818 "type 0 is probably unwise.");
1819 /* break; */ 1819 /* break; */
1820 } 1820 }
1821 1821
1822 if (!LABEL_IS_SUN && !LABEL_IS_SGI) { 1822 if (!LABEL_IS_SUN && !LABEL_IS_SGI) {
1823 if (IS_EXTENDED(sys) != IS_EXTENDED(p->sys_ind)) { 1823 if (IS_EXTENDED(sys) != IS_EXTENDED(p->sys_ind)) {
1824 printf("You cannot change a partition into" 1824 puts("You cannot change a partition into"
1825 " an extended one or vice versa\n"); 1825 " an extended one or vice versa");
1826 break; 1826 break;
1827 } 1827 }
1828 } 1828 }
@@ -1830,10 +1830,10 @@ change_sysid(void)
1830 if (sys < 256) { 1830 if (sys < 256) {
1831#if ENABLE_FEATURE_SUN_LABEL 1831#if ENABLE_FEATURE_SUN_LABEL
1832 if (LABEL_IS_SUN && i == 2 && sys != SUN_WHOLE_DISK) 1832 if (LABEL_IS_SUN && i == 2 && sys != SUN_WHOLE_DISK)
1833 printf("Consider leaving partition 3 " 1833 puts("Consider leaving partition 3 "
1834 "as Whole disk (5),\n" 1834 "as Whole disk (5),\n"
1835 "as SunOS/Solaris expects it and " 1835 "as SunOS/Solaris expects it and "
1836 "even Linux likes it\n\n"); 1836 "even Linux likes it\n");
1837#endif 1837#endif
1838#if ENABLE_FEATURE_SGI_LABEL 1838#if ENABLE_FEATURE_SGI_LABEL
1839 if (LABEL_IS_SGI && 1839 if (LABEL_IS_SGI &&
@@ -1842,10 +1842,10 @@ change_sysid(void)
1842 (i == 8 && sys != 0) 1842 (i == 8 && sys != 0)
1843 ) 1843 )
1844 ) { 1844 ) {
1845 printf("Consider leaving partition 9 " 1845 puts("Consider leaving partition 9 "
1846 "as volume header (0),\nand " 1846 "as volume header (0),\nand "
1847 "partition 11 as entire volume (6)" 1847 "partition 11 as entire volume (6)"
1848 "as IRIX expects it\n\n"); 1848 "as IRIX expects it\n");
1849 } 1849 }
1850#endif 1850#endif
1851 if (sys == origsys) 1851 if (sys == origsys)
@@ -2067,7 +2067,7 @@ fix_partition_table_order(void)
2067 int i,k; 2067 int i,k;
2068 2068
2069 if (!wrong_p_order(NULL)) { 2069 if (!wrong_p_order(NULL)) {
2070 printf("Ordering is already correct\n\n"); 2070 puts("Ordering is already correct\n");
2071 return; 2071 return;
2072 } 2072 }
2073 2073
@@ -2095,7 +2095,7 @@ fix_partition_table_order(void)
2095 if (i) 2095 if (i)
2096 fix_chain_of_logicals(); 2096 fix_chain_of_logicals();
2097 2097
2098 printf("Done.\n"); 2098 puts("Done");
2099} 2099}
2100#endif 2100#endif
2101 2101
@@ -2178,7 +2178,7 @@ list_table(int xtra)
2178 * if this is a sgi, sun or aix labeled disk... */ 2178 * if this is a sgi, sun or aix labeled disk... */
2179 if (LABEL_IS_DOS && wrong_p_order(NULL)) { 2179 if (LABEL_IS_DOS && wrong_p_order(NULL)) {
2180 /* FIXME */ 2180 /* FIXME */
2181 printf("\nPartition table entries are not in disk order\n"); 2181 puts("\nPartition table entries are not in disk order");
2182 } 2182 }
2183} 2183}
2184 2184
@@ -2192,7 +2192,7 @@ x_list_table(int extend)
2192 2192
2193 printf("\nDisk %s: %u heads, %u sectors, %u cylinders\n\n", 2193 printf("\nDisk %s: %u heads, %u sectors, %u cylinders\n\n",
2194 disk_device, g_heads, g_sectors, g_cylinders); 2194 disk_device, g_heads, g_sectors, g_cylinders);
2195 printf("Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID\n"); 2195 puts("Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID");
2196 for (i = 0; i < g_partitions; i++) { 2196 for (i = 0; i < g_partitions; i++) {
2197 pe = &ptes[i]; 2197 pe = &ptes[i];
2198 p = (extend ? pe->ext_pointer : pe->part_table); 2198 p = (extend ? pe->ext_pointer : pe->part_table);
@@ -2419,7 +2419,7 @@ add_partition(int n, int sys)
2419 limit = first[i] - 1; 2419 limit = first[i] - 1;
2420 } 2420 }
2421 if (start > limit) { 2421 if (start > limit) {
2422 printf("No free sectors available\n"); 2422 puts("No free sectors available");
2423 if (n > 4) 2423 if (n > 4)
2424 g_partitions--; 2424 g_partitions--;
2425 return; 2425 return;
@@ -2490,9 +2490,9 @@ new_partition(void)
2490 return; 2490 return;
2491 } 2491 }
2492 if (LABEL_IS_AIX) { 2492 if (LABEL_IS_AIX) {
2493 printf("Sorry - this fdisk cannot handle AIX disk labels.\n" 2493 puts("Sorry - this fdisk cannot handle AIX disk labels.\n"
2494"If you want to add DOS-type partitions, create a new empty DOS partition\n" 2494"If you want to add DOS-type partitions, create a new empty DOS partition\n"
2495"table first (use 'o'). This will destroy the present disk contents.\n"); 2495"table first (use 'o'). This will destroy the present disk contents.");
2496 return; 2496 return;
2497 } 2497 }
2498 2498
@@ -2500,7 +2500,7 @@ new_partition(void)
2500 free_primary += !ptes[i].part_table->sys_ind; 2500 free_primary += !ptes[i].part_table->sys_ind;
2501 2501
2502 if (!free_primary && g_partitions >= MAXIMUM_PARTS) { 2502 if (!free_primary && g_partitions >= MAXIMUM_PARTS) {
2503 printf("The maximum number of partitions has been created\n"); 2503 puts("The maximum number of partitions has been created");
2504 return; 2504 return;
2505 } 2505 }
2506 2506
@@ -2508,8 +2508,8 @@ new_partition(void)
2508 if (extended_offset) 2508 if (extended_offset)
2509 add_logical(); 2509 add_logical();
2510 else 2510 else
2511 printf("You must delete some partition and add " 2511 puts("You must delete some partition and add "
2512 "an extended partition first\n"); 2512 "an extended partition first");
2513 } else { 2513 } else {
2514 char c, line[80]; 2514 char c, line[80];
2515 snprintf(line, sizeof(line), 2515 snprintf(line, sizeof(line),
@@ -2547,7 +2547,7 @@ reread_partition_table(int leave)
2547{ 2547{
2548 int i; 2548 int i;
2549 2549
2550 printf("Calling ioctl() to re-read partition table\n"); 2550 puts("Calling ioctl() to re-read partition table");
2551 sync(); 2551 sync();
2552 /* Users with slow external USB disks on a 320MHz ARM system (year 2011) 2552 /* Users with slow external USB disks on a 320MHz ARM system (year 2011)
2553 * report that sleep is needed, otherwise BLKRRPART may fail with -EIO: 2553 * report that sleep is needed, otherwise BLKRRPART may fail with -EIO:
@@ -2558,10 +2558,10 @@ reread_partition_table(int leave)
2558 "failed, kernel still uses old table"); 2558 "failed, kernel still uses old table");
2559#if 0 2559#if 0
2560 if (dos_changed) 2560 if (dos_changed)
2561 printf( 2561 puts(
2562 "\nWARNING: If you have created or modified any DOS 6.x\n" 2562 "\nWARNING: If you have created or modified any DOS 6.x\n"
2563 "partitions, please see the fdisk manual page for additional\n" 2563 "partitions, please see the fdisk manual page for additional\n"
2564 "information\n"); 2564 "information");
2565#endif 2565#endif
2566 2566
2567 if (leave) { 2567 if (leave) {
@@ -2589,7 +2589,7 @@ write_table(void)
2589 } 2589 }
2590 } 2590 }
2591 else if (LABEL_IS_SGI) { 2591 else if (LABEL_IS_SGI) {
2592 /* no test on change? the printf below might be mistaken */ 2592 /* no test on change? the "altered" msg below might be mistaken */
2593 sgi_write_table(); 2593 sgi_write_table();
2594 } 2594 }
2595 else if (LABEL_IS_SUN) { 2595 else if (LABEL_IS_SUN) {
@@ -2601,7 +2601,7 @@ write_table(void)
2601 } 2601 }
2602 } 2602 }
2603 2603
2604 printf("The partition table has been altered.\n"); 2604 puts("The partition table has been altered.");
2605 reread_partition_table(1); 2605 reread_partition_table(1);
2606} 2606}
2607#endif /* FEATURE_FDISK_WRITABLE */ 2607#endif /* FEATURE_FDISK_WRITABLE */
@@ -2744,8 +2744,8 @@ xselect(void)
2744 user_sectors = g_sectors = read_int(1, g_sectors, 63, 0, "Number of sectors"); 2744 user_sectors = g_sectors = read_int(1, g_sectors, 63, 0, "Number of sectors");
2745 if (dos_compatible_flag) { 2745 if (dos_compatible_flag) {
2746 sector_offset = g_sectors; 2746 sector_offset = g_sectors;
2747 printf("Warning: setting sector offset for DOS " 2747 puts("Warning: setting sector offset for DOS "
2748 "compatiblity\n"); 2748 "compatiblity");
2749 } 2749 }
2750 update_units(); 2750 update_units();
2751 break; 2751 break;
@@ -3024,7 +3024,7 @@ int fdisk_main(int argc UNUSED_PARAM, char **argv)
3024 sgi_get_bootfile()); 3024 sgi_get_bootfile());
3025 if (read_maybe_empty("Please enter the name of the " 3025 if (read_maybe_empty("Please enter the name of the "
3026 "new boot file: ") == '\n') 3026 "new boot file: ") == '\n')
3027 printf("Boot file unchanged\n"); 3027 puts("Boot file unchanged");
3028 else 3028 else
3029 sgi_set_bootfile(line_ptr); 3029 sgi_set_bootfile(line_ptr);
3030 } 3030 }
@@ -3106,8 +3106,8 @@ int fdisk_main(int argc UNUSED_PARAM, char **argv)
3106#if ENABLE_FEATURE_FDISK_ADVANCED 3106#if ENABLE_FEATURE_FDISK_ADVANCED
3107 case 'x': 3107 case 'x':
3108 if (LABEL_IS_SGI) { 3108 if (LABEL_IS_SGI) {
3109 printf("\n\tSorry, no experts menu for SGI " 3109 puts("\n\tSorry, no experts menu for SGI "
3110 "partition tables available\n\n"); 3110 "partition tables available\n");
3111 } else 3111 } else
3112 xselect(); 3112 xselect();
3113 break; 3113 break;
diff --git a/util-linux/fdisk_gpt.c b/util-linux/fdisk_gpt.c
index 5786d5f7d..715e227ca 100644
--- a/util-linux/fdisk_gpt.c
+++ b/util-linux/fdisk_gpt.c
@@ -106,7 +106,7 @@ gpt_list_table(int xtra UNUSED_PARAM)
106 (unsigned long long)SWAP_LE64(gpt_hdr->first_usable_lba), 106 (unsigned long long)SWAP_LE64(gpt_hdr->first_usable_lba),
107 (unsigned long long)SWAP_LE64(gpt_hdr->last_usable_lba)); 107 (unsigned long long)SWAP_LE64(gpt_hdr->last_usable_lba));
108 108
109 printf("Number Start (sector) End (sector) Size Code Name\n"); 109 puts("Number Start (sector) End (sector) Size Code Name");
110 for (i = 0; i < n_parts; i++) { 110 for (i = 0; i < n_parts; i++) {
111 gpt_partition *p = gpt_part(i); 111 gpt_partition *p = gpt_part(i);
112 if (p->lba_start) { 112 if (p->lba_start) {
@@ -119,7 +119,7 @@ gpt_list_table(int xtra UNUSED_PARAM)
119 numstr6, 119 numstr6,
120 0x0700 /* FIXME */); 120 0x0700 /* FIXME */);
121 gpt_print_wide(p->name, 18); 121 gpt_print_wide(p->name, 18);
122 printf("\n"); 122 bb_putchar('\n');
123 } 123 }
124 } 124 }
125} 125}
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 33767a1af..d2f3524b4 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -371,9 +371,9 @@ static int ask(const char *string, int def)
371 } 371 }
372 } 372 }
373 if (def) 373 if (def)
374 printf("y\n"); 374 puts("y");
375 else { 375 else {
376 printf("n\n"); 376 puts("n");
377 errors_uncorrected = 1; 377 errors_uncorrected = 1;
378 } 378 }
379 return def; 379 return def;
@@ -405,7 +405,7 @@ static void check_mount(void)
405 if (isatty(0) && isatty(1)) 405 if (isatty(0) && isatty(1))
406 cont = ask("Do you really want to continue", 0); 406 cont = ask("Do you really want to continue", 0);
407 if (!cont) { 407 if (!cont) {
408 printf("Check aborted\n"); 408 puts("Check aborted");
409 exit(EXIT_SUCCESS); 409 exit(EXIT_SUCCESS);
410 } 410 }
411 } 411 }
@@ -470,8 +470,8 @@ static void write_block(unsigned nr, void *addr)
470 if (!nr) 470 if (!nr)
471 return; 471 return;
472 if (nr < FIRSTZONE || nr >= ZONES) { 472 if (nr < FIRSTZONE || nr >= ZONES) {
473 printf("Internal error: trying to write bad block\n" 473 puts("Internal error: trying to write bad block\n"
474 "Write request ignored\n"); 474 "Write request ignored");
475 errors_uncorrected = 1; 475 errors_uncorrected = 1;
476 return; 476 return;
477 } 477 }
@@ -659,7 +659,7 @@ static void read_tables(void)
659 if (INODE_BUFFER_SIZE != read(dev_fd, inode_buffer, INODE_BUFFER_SIZE)) 659 if (INODE_BUFFER_SIZE != read(dev_fd, inode_buffer, INODE_BUFFER_SIZE))
660 die("can't read inodes"); 660 die("can't read inodes");
661 if (NORM_FIRSTZONE != FIRSTZONE) { 661 if (NORM_FIRSTZONE != FIRSTZONE) {
662 printf("warning: firstzone!=norm_firstzone\n"); 662 puts("warning: firstzone!=norm_firstzone");
663 errors_uncorrected = 1; 663 errors_uncorrected = 1;
664 } 664 }
665 get_dirsize(); 665 get_dirsize();
@@ -713,7 +713,7 @@ static void get_inode_common(unsigned nr, uint16_t i_mode)
713 } else 713 } else
714 links++; 714 links++;
715 if (!++inode_count[nr]) { 715 if (!++inode_count[nr]) {
716 printf("Warning: inode count too big\n"); 716 puts("Warning: inode count too big");
717 inode_count[nr]--; 717 inode_count[nr]--;
718 errors_uncorrected = 1; 718 errors_uncorrected = 1;
719 } 719 }
@@ -1299,7 +1299,7 @@ int fsck_minix_main(int argc UNUSED_PARAM, char **argv)
1299 } 1299 }
1300 if (changed) { 1300 if (changed) {
1301 write_tables(); 1301 write_tables();
1302 printf("FILE SYSTEM HAS BEEN CHANGED\n"); 1302 puts("FILE SYSTEM HAS BEEN CHANGED");
1303 sync(); 1303 sync();
1304 } else if (OPT_repair) 1304 } else if (OPT_repair)
1305 write_superblock(); 1305 write_superblock();
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 58df1c823..b9dadf13c 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -378,7 +378,7 @@ int getopt_main(int argc, char **argv)
378 if (compatible) { 378 if (compatible) {
379 /* For some reason, the original getopt gave no error 379 /* For some reason, the original getopt gave no error
380 * when there were no arguments. */ 380 * when there were no arguments. */
381 printf(" --\n"); 381 puts(" --");
382 return 0; 382 return 0;
383 } 383 }
384 bb_error_msg_and_die("missing optstring argument"); 384 bb_error_msg_and_die("missing optstring argument");
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c
index 888f70ef8..38d81af50 100644
--- a/util-linux/ipcrm.c
+++ b/util-linux/ipcrm.c
@@ -119,7 +119,7 @@ int ipcrm_main(int argc, char **argv)
119 119
120 if (remove_ids(what, &argv[2])) 120 if (remove_ids(what, &argv[2]))
121 fflush_stdout_and_exit(EXIT_FAILURE); 121 fflush_stdout_and_exit(EXIT_FAILURE);
122 printf("resource(s) deleted\n"); 122 puts("resource(s) deleted");
123 return 0; 123 return 0;
124 } 124 }
125 } 125 }