diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-27 10:20:47 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-27 10:20:47 +0000 |
commit | 4daad9004d8f07991516970a1cbd77756fae7041 (patch) | |
tree | f1a17e4b168ef8fdf8af92ac5ce8deba89d38db2 /e2fsprogs/old_e2fsprogs | |
parent | 1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (diff) | |
download | busybox-4daad9004d8f07991516970a1cbd77756fae7041.tar.gz |
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
Diffstat (limited to 'e2fsprogs/old_e2fsprogs')
-rw-r--r-- | e2fsprogs/old_e2fsprogs/blkid/dev.c | 2 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/blkid/read.c | 2 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/e2fsck.c | 14 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/fsck.c | 2 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/lsattr.c | 4 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/mke2fs.c | 2 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/uuid/uuid_time.c | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/e2fsprogs/old_e2fsprogs/blkid/dev.c b/e2fsprogs/old_e2fsprogs/blkid/dev.c index eddbd02b7..d86cc48d1 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/dev.c +++ b/e2fsprogs/old_e2fsprogs/blkid/dev.c @@ -82,7 +82,7 @@ void blkid_debug_dump_dev(blkid_dev dev) else printf(" tag: NULL\n"); } - puts(""); + bb_putchar('\n'); } #endif diff --git a/e2fsprogs/old_e2fsprogs/blkid/read.c b/e2fsprogs/old_e2fsprogs/blkid/read.c index 276e62a70..67bc8ee44 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/read.c +++ b/e2fsprogs/old_e2fsprogs/blkid/read.c @@ -436,7 +436,7 @@ static void debug_dump_dev(blkid_dev dev) else printf(" tag: NULL\n"); } - puts(""); + bb_putchar('\n'); } int main(int argc, char**argv) diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c index 3d5b4f4fb..61db53e80 100644 --- a/e2fsprogs/old_e2fsprogs/e2fsck.c +++ b/e2fsprogs/old_e2fsprogs/e2fsck.c @@ -2443,10 +2443,10 @@ static void safe_print(const char *cp, int len) ch -= 128; } if ((ch < 32) || (ch == 0x7f)) { - fputc('^', stdout); + bb_putchar('^'); ch ^= 0x40; /* ^@, ^A, ^B; ^? for DEL */ } - fputc(ch, stdout); + bb_putchar(ch); } } @@ -2497,7 +2497,7 @@ static void expand_at_expression(e2fsck_t ctx, char ch, str = _(*cpp) + 1; if (*first && islower(*str)) { *first = 0; - fputc(toupper(*str++), stdout); + bb_putchar(toupper(*str++)); } print_e2fsck_message(ctx, str, pctx, *first); } else @@ -2630,7 +2630,7 @@ static void expand_percent_expression(ext2_filsys fs, char ch, switch (ch) { case '%': - fputc('%', stdout); + bb_putchar('%'); break; case 'b': printf("%u", ctx->blk); @@ -12767,7 +12767,7 @@ static void check_if_skip(e2fsck_t ctx) else printf(_(" (check in %ld mounts)"), next_check); } - fputc('\n', stdout); + bb_putchar('\n'); ext2fs_close(fs); ctx->fs = NULL; e2fsck_free_context(ctx); @@ -12864,9 +12864,9 @@ int e2fsck_simple_progress(e2fsck_t ctx, const char *label, float percent, bar + (sizeof(bar) - (i+1)), spaces + (sizeof(spaces) - (dpywidth - i + 1))); if (fixed_percent == 1000) - fputc('|', stdout); + bb_putchar('|'); else - fputc(spinner[ctx->progress_pos & 3], stdout); + bb_putchar(spinner[ctx->progress_pos & 3]); printf(" %4.1f%% ", percent); if (dpynum) printf("%u\r", dpynum); diff --git a/e2fsprogs/old_e2fsprogs/fsck.c b/e2fsprogs/old_e2fsprogs/fsck.c index 261783726..aad85cf61 100644 --- a/e2fsprogs/old_e2fsprogs/fsck.c +++ b/e2fsprogs/old_e2fsprogs/fsck.c @@ -613,7 +613,7 @@ static int execute(const char *type, const char *device, const char *mntpt, mntpt ? mntpt : device); for (i=0; i < argc; i++) printf("%s ", argv[i]); - puts(""); + bb_putchar('\n'); } /* Fork and execute the correct program. */ diff --git a/e2fsprogs/old_e2fsprogs/lsattr.c b/e2fsprogs/old_e2fsprogs/lsattr.c index 920146496..bbc03aa9d 100644 --- a/e2fsprogs/old_e2fsprogs/lsattr.c +++ b/e2fsprogs/old_e2fsprogs/lsattr.c @@ -57,7 +57,7 @@ static void list_attributes(const char *name) if (flags & OPT_PF_LONG) { printf("%-28s ", name); print_flags(stdout, fsflags, PFOPT_LONG); - puts(""); + bb_putchar('\n'); } else { print_flags(stdout, fsflags, 0); printf(" %s\n", name); @@ -102,7 +102,7 @@ static int lsattr_dir_proc(const char *dir_name, struct dirent *de, (de->d_name[1] != '.' && de->d_name[2] != '\0')))) { printf("\n%s:\n", path); iterate_on_dir(path, lsattr_dir_proc, NULL); - puts(""); + bb_putchar('\n'); } } } diff --git a/e2fsprogs/old_e2fsprogs/mke2fs.c b/e2fsprogs/old_e2fsprogs/mke2fs.c index c1deefdb7..89b5223b7 100644 --- a/e2fsprogs/old_e2fsprogs/mke2fs.c +++ b/e2fsprogs/old_e2fsprogs/mke2fs.c @@ -641,7 +641,7 @@ static void show_stats(ext2_filsys fs) s->s_blocks_per_group, s->s_frags_per_group, s->s_inodes_per_group); if (fs->group_desc_count == 1) { - puts(""); + bb_putchar('\n'); return; } diff --git a/e2fsprogs/old_e2fsprogs/uuid/uuid_time.c b/e2fsprogs/old_e2fsprogs/uuid/uuid_time.c index b54d67322..b6f73e6dc 100644 --- a/e2fsprogs/old_e2fsprogs/uuid/uuid_time.c +++ b/e2fsprogs/old_e2fsprogs/uuid/uuid_time.c @@ -147,7 +147,7 @@ main(int argc, char **argv) printf(" (random)\n"); break; default: - puts(""); + bb_putchar('\n'); } if (type != 1) { printf("Warning: not a time-based UUID, so UUID time " |