if (retval) {
va_start(ap, fmt);
- bb_fprintf(stderr,"\nCould not ");
- bb_vfprintf(stderr, fmt, ap);
- bb_fprintf(stderr, "\n");
+ fprintf(stderr,"\nCould not ");
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, "\n");
va_end(ap);
exit(EXIT_FAILURE);
}
if (!quiet) {
va_start(ap, fmt);
- bb_vfprintf(stdout, fmt, ap);
+ vfprintf(stdout, fmt, ap);
fflush(stdout);
va_end(ap);
}
if (retval) {
va_start(ap, fmt);
- bb_fprintf(stderr,"\nWarning: ");
- bb_vfprintf(stderr, fmt, ap);
- bb_fprintf(stderr, "\n");
+ fprintf(stderr,"\nWarning: ");
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, "\n");
va_end(ap);
}
}
mke2fs_verbose("Running command: %s\n", buf);
f = popen(buf, "r");
if (!f) {
- bb_perror_msg_and_die("Could not run '%s'", buf);
+ bb_perror_msg_and_die("cannot run '%s'", buf);
}
retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block);
pclose(f);
}
/* Allocate the zeroizing buffer if necessary */
if (!buf) {
- buf = xcalloc(fs->blocksize, STRIDE_LENGTH);
+ buf = xzalloc(fs->blocksize * STRIDE_LENGTH);
}
/* OK, do the write loop */
next_update = 0;
}
if (resize <= sb_param->s_blocks_count) {
bb_error_msg("The resize maximum must be greater "
- "than the filesystem size");
+ "than the filesystem size");
r_usage++;
continue;
}
#endif
/* If called as mkfs.ext3, create a journal inode */
- if (last_char_is(bb_applet_name, '3'))
+ if (last_char_is(applet_name, '3'))
journal_size = -1;
while ((c = getopt (argc, argv,
retval = zero_blocks(fs, start, blocks - start,
NULL, &ret_blk, NULL);
- mke2fs_warning_msg(retval, "could not zero block %u at end of filesystem", ret_blk);
+ mke2fs_warning_msg(retval, "cannot zero block %u at end of filesystem", ret_blk);
write_inode_tables(fs);
create_root_dir(fs);
create_lost_and_found(fs);