retval = ext2fs_block_iterate(fs, EXT2_BAD_INO, 0, 0,
check_bb_inode_blocks, 0);
if (retval) {
- com_err("ext2fs_block_iterate", retval,
+ com_err("ext2fs_block_iterate", retval, "%s",
_("while sanity checking the bad blocks inode"));
goto fatal;
}
if (!replace_bad_blocks) {
retval = ext2fs_read_bb_inode(fs, &bb_list);
if (retval) {
- com_err("ext2fs_read_bb_inode", retval,
+ com_err("ext2fs_read_bb_inode", retval, "%s",
_("while reading the bad blocks inode"));
goto fatal;
}
else
pclose(f);
if (retval) {
- com_err("ext2fs_read_bb_FILE", retval,
+ com_err("ext2fs_read_bb_FILE", retval, "%s",
_("while reading in list of bad blocks from file"));
goto fatal;
}
printf("%s: Updating bad block inode.\n", ctx->device_name);
retval = ext2fs_update_bb_inode(fs, bb_list);
if (retval) {
- com_err("ext2fs_update_bb_inode", retval,
+ com_err("ext2fs_update_bb_inode", retval, "%s",
_("while updating bad block inode"));
goto fatal;
}
ll_rw_block(READ, 1, &jbh);
if (jbh->b_err) {
- com_err(ctx->device_name, jbh->b_err,
+ com_err(ctx->device_name, jbh->b_err, "%s",
_("reading journal superblock\n"));
return jbh->b_err;
}
goto errout;
}
if (cs.errcode) {
- com_err("clone_file", cs.errcode,
+ com_err("clone_file", cs.errcode, "%s",
_("returned from clone_file_block"));
retval = cs.errcode;
goto errout;
"\t\t[-E extended-options] device\n"),
ctx->program_name);
- fprintf(stderr, _("\nEmergency help:\n"
+ fprintf(stderr, "%s", _("\nEmergency help:\n"
" -p Automatic repair (no questions)\n"
" -n Make no changes to the filesystem\n"
" -y Assume \"yes\" to all questions\n"
" -c Check for bad blocks and add them to the badblock list\n"
" -f Force checking even if filesystem is marked clean\n"));
- fprintf(stderr, _(""
+ fprintf(stderr, "%s", _(""
" -v Be verbose\n"
" -b superblock Use alternative superblock\n"
" -B blocksize Force blocksize when looking for superblock\n"
if (ctx->extent_depth_count[j])
break;
if (++j) {
- log_out(ctx, _(" Extent depth histogram: "));
+ log_out(ctx, "%s", _(" Extent depth histogram: "));
for (i=0; i < j; i++) {
if (i)
fputc('/', stdout);
if (!ctx->interactive || ctx->mount_flags & EXT2_MF_BUSY)
fatal_error(ctx, _("Cannot continue, aborting.\n\n"));
puts("\007\007\007\007");
- log_out(ctx, _("\n\nWARNING!!! "
+ log_out(ctx, "%s", _("\n\nWARNING!!! "
"The filesystem is mounted. "
"If you continue you ***WILL***\n"
"cause ***SEVERE*** filesystem damage.\n\n"));
puts("\007\007\007");
cont = ask_yn(ctx, _("Do you really want to continue"), 0);
if (!cont) {
- printf (_("check aborted.\n"));
+ printf("%s", _("check aborted.\n"));
exit (0);
}
return;
if (reason) {
log_out(ctx, "%s", ctx->device_name);
log_out(ctx, reason, reason_arg);
- log_out(ctx, _(", check forced.\n"));
+ log_out(ctx, "%s", _(", check forced.\n"));
return;
}
if (next_check <= 5) {
if (next_check == 1) {
if (batt)
- log_out(ctx, _(" (check deferred; "
- "on battery)"));
+ log_out(ctx, "%s",
+ _(" (check deferred; on battery)"));
else
- log_out(ctx, _(" (check after next mount)"));
+ log_out(ctx, "%s",
+ _(" (check after next mount)"));
} else
- log_out(ctx, _(" (check in %ld mounts)"), next_check);
+ log_out(ctx, _(" (check in %ld mounts)"),
+ next_check);
}
log_out(ctx, "\n");
skip:
ea_ver = strtoul(arg, &p, 0);
if (*p ||
((ea_ver != 1) && (ea_ver != 2))) {
- fprintf(stderr,
+ fprintf(stderr, "%s",
_("Invalid EA version.\n"));
extended_usage++;
continue;
usage(ctx);
if ((ctx->options & E2F_OPT_NO) &&
(ctx->options & E2F_OPT_COMPRESS_DIRS)) {
- com_err(ctx->program_name, 0,
+ com_err(ctx->program_name, 0, "%s",
_("The -n and -D options are incompatible."));
fatal_error(ctx, 0);
}
if ((ctx->options & E2F_OPT_NO) && cflag) {
- com_err(ctx->program_name, 0,
+ com_err(ctx->program_name, 0, "%s",
_("The -n and -c options are incompatible."));
fatal_error(ctx, 0);
}
if ((ctx->options & E2F_OPT_NO) && bad_blocks_file) {
- com_err(ctx->program_name, 0,
+ com_err(ctx->program_name, 0, "%s",
_("The -n and -l/-L options are incompatible."));
fatal_error(ctx, 0);
}
close(fd);
}
if (cflag && bad_blocks_file) {
- fprintf(stderr, _("The -c and the -l/-L options may "
- "not be both used at the same time.\n"));
+ fprintf(stderr, "%s", _("The -c and the -l/-L options may not "
+ "be both used at the same time.\n"));
exit(FSCK_USAGE);
}
#ifdef HAVE_SIGNAL_H
retval = 0;
}
} else if (retval == EXT2_ET_MMP_FAILED) {
- com_err(ctx->program_name, retval,
+ com_err(ctx->program_name, retval, "%s",
_("while checking MMP block"));
dump_mmp_msg(fs->mmp_buf, NULL);
} else if (retval == EXT2_ET_MMP_FSCK_ON ||
retval == EXT2_ET_MMP_UNKNOWN_SEQ) {
- com_err(ctx->program_name, retval,
+ com_err(ctx->program_name, retval, "%s",
_("while checking MMP block"));
dump_mmp_msg(fs->mmp_buf,
_("If you are sure the filesystem is not "
my_ver = ext2fs_parse_version_string(my_ver_string);
lib_ver = ext2fs_get_library_version(0, &lib_ver_date);
if (my_ver > lib_ver) {
- fprintf( stderr, _("Error: ext2fs library version "
- "out of date!\n"));
+ fprintf( stderr, "%s",
+ _("Error: ext2fs library version out of date!\n"));
show_version_only++;
}
retval = PRS(argc, argv, &ctx);
if (retval) {
- com_err("e2fsck", retval,
+ com_err("e2fsck", retval, "%s",
_("while trying to initialize program"));
exit(FSCK_ERROR);
}
com_err(ctx->program_name, retval, _("while trying to open %s"),
ctx->filesystem_name);
if (retval == EXT2_ET_REV_TOO_HIGH) {
- log_out(ctx, _("The filesystem revision is apparently "
- "too high for this version of e2fsck.\n"
- "(Or the filesystem superblock "
- "is corrupt)\n\n"));
+ log_out(ctx, "%s",
+ _("The filesystem revision is apparently "
+ "too high for this version of e2fsck.\n"
+ "(Or the filesystem superblock "
+ "is corrupt)\n\n"));
fix_problem(ctx, PR_0_SB_CORRUPT, &pctx);
} else if (retval == EXT2_ET_SHORT_READ)
- log_out(ctx, _("Could this be a zero-length "
- "partition?\n"));
+ log_out(ctx, "%s",
+ _("Could this be a zero-length partition?\n"));
else if ((retval == EPERM) || (retval == EACCES))
log_out(ctx, _("You must have %s access to the "
- "filesystem or be root\n"),
+ "filesystem or be root\n"),
(ctx->options & E2F_OPT_READONLY) ?
"r/o" : "r/w");
else if (retval == ENXIO)
- log_out(ctx, _("Possibly non-existent or "
- "swap device?\n"));
+ log_out(ctx, "%s",
+ _("Possibly non-existent or swap device?\n"));
else if (retval == EBUSY)
- log_out(ctx, _("Filesystem mounted or opened "
- "exclusively by another program?\n"));
+ log_out(ctx, "%s", _("Filesystem mounted or opened "
+ "exclusively by another program?\n"));
else if (retval == ENOENT)
- log_out(ctx, _("Possibly non-existent device?\n"));
+ log_out(ctx, "%s",
+ _("Possibly non-existent device?\n"));
#ifdef EROFS
else if (retval == EROFS)
- log_out(ctx, _("Disk write-protected; use the -n "
- "option to do a read-only\n"
- "check of the device.\n"));
+ log_out(ctx, "%s", _("Disk write-protected; use the "
+ "-n option to do a read-only\n"
+ "check of the device.\n"));
#endif
else
fix_problem(ctx, PR_0_SB_CORRUPT, &pctx);
*/
if (sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER) {
if (ctx->options & E2F_OPT_READONLY) {
- log_out(ctx, _("Warning: skipping journal recovery "
- "because doing a read-only filesystem "
- "check.\n"));
+ log_out(ctx, "%s",
+ _("Warning: skipping journal recovery because "
+ "doing a read-only filesystem check.\n"));
io_channel_flush(ctx->fs->io);
} else {
if (ctx->flags & E2F_FLAG_RESTARTED) {
* device driver is being bogus.
*/
com_err(ctx->program_name, 0,
- _("unable to set superblock flags on %s\n"), ctx->device_name);
+ _("unable to set superblock flags "
+ "on %s\n"), ctx->device_name);
fatal_error(ctx, 0);
}
retval = e2fsck_run_ext3_journal(ctx);
log_out(ctx, _("%s: %s while reading bad blocks inode\n"),
ctx->program_name, error_message(retval));
preenhalt(ctx);
- log_out(ctx, _("This doesn't bode well, "
- "but we'll try to go on...\n"));
+ log_out(ctx, "%s", _("This doesn't bode well, "
+ "but we'll try to go on...\n"));
}
/*
"journal\n", error_message(retval));
goto no_journal;
}
- log_out(ctx, _(" Done.\n"));
- log_out(ctx, _("\n*** journal has been re-created - "
- "filesystem is now ext3 again ***\n"));
+ log_out(ctx, "%s", _(" Done.\n"));
+ log_out(ctx, "%s",
+ _("\n*** journal has been re-created - "
+ "filesystem is now ext3 again ***\n"));
}
}
no_journal:
}
if (run_result == E2F_FLAG_RESTART) {
- log_out(ctx, _("Restarting e2fsck from the beginning...\n"));
+ log_out(ctx, "%s",
+ _("Restarting e2fsck from the beginning...\n"));
retval = e2fsck_reset_context(ctx);
if (retval) {
- com_err(ctx->program_name, retval,
+ com_err(ctx->program_name, retval, "%s",
_("while resetting context"));
fatal_error(ctx, 0);
}
!(ctx->options & E2F_OPT_READONLY)) {
retval = ext2fs_set_gdt_csum(ctx->fs);
if (retval) {
- com_err(ctx->program_name, retval,
+ com_err(ctx->program_name, retval, "%s",
_("while setting block group checksum info"));
fatal_error(ctx, 0);
}
log_out(ctx, "\n");
longjmp(e2fsck_global_ctx->abort_loc, 1);
}
- log_out(ctx, _("cancelled!\n"));
+ log_out(ctx, "%s", _("cancelled!\n"));
return 0;
}
if (strchr(short_yes, (char) c)) {
break;
}
if (def)
- log_out(ctx, _("yes\n"));
+ log_out(ctx, "%s", _("yes\n"));
else
- log_out(ctx, _("no\n"));
+ log_out(ctx, "%s", _("no\n"));
#ifdef HAVE_TERMIOS_H
tcsetattr (0, TCSANOW, &termios);
#endif
if (!buf) {
buf = malloc(fs->blocksize * STRIDE_LENGTH);
if (!buf) {
- com_err("malloc", ENOMEM,
+ com_err("malloc", ENOMEM, "%s",
_("while allocating zeroizing buffer"));
exit(1);
}
perror(argv[0]);
bytes = blkid_get_dev_size(fd);
- printf("Device %s has %Ld 1k blocks.\n", argv[1],
- (unsigned long long) bytes >> 10);
+ printf("Device %s has %lld 1k blocks.\n", argv[1],
+ (unsigned long long)bytes >> 10);
return 0;
}
/* Seek to the correct loc. */
if (ext2fs_llseek (dev, (ext2_loff_t) current_block * block_size,
SEEK_SET) != (ext2_loff_t) current_block * block_size)
- com_err (program_name, errno, _("during seek"));
+ com_err (program_name, errno, "%s", _("during seek"));
/* Try the read */
if (d_flag)
/* Seek to the correct loc. */
if (ext2fs_llseek (dev, (ext2_loff_t) current_block * block_size,
SEEK_SET) != (ext2_loff_t) current_block * block_size)
- com_err (program_name, errno, _("during seek"));
+ com_err (program_name, errno, "%s", _("during seek"));
/* Try the write */
got = write (dev, buffer, try * block_size);
#endif
retval = ext2fs_sync_device(host_dev, 1);
if (retval)
- com_err(program_name, retval, _("during ext2fs_sync_device"));
+ com_err(program_name, retval, "%s",
+ _("during ext2fs_sync_device"));
}
static unsigned int test_ro (int dev, blk_t last_block,
errcode = ext2fs_badblocks_list_iterate_begin(bb_list,&bb_iter);
if (errcode) {
- com_err (program_name, errcode,
- _("while beginning bad block list iteration"));
+ com_err(program_name, errcode, "%s",
+ _("while beginning bad block list iteration"));
exit (1);
}
do {
}
if (!blkbuf)
{
- com_err (program_name, ENOMEM, _("while allocating buffers"));
+ com_err(program_name, ENOMEM, "%s",
+ _("while allocating buffers"));
exit (1);
}
if (v_flag) {
- fprintf (stderr, _("Checking blocks %lu to %lu\n"),
- (unsigned long) first_block,
- (unsigned long) last_block - 1);
+ fprintf(stderr, _("Checking blocks %lu to %lu\n"),
+ (unsigned long)first_block,
+ (unsigned long)last_block - 1);
}
if (t_flag) {
fputs(_("Checking for bad blocks in read-only mode\n"), stderr);
read_buffer = buffer + blocks_at_once * block_size;
if (!buffer) {
- com_err (program_name, ENOMEM, _("while allocating buffers"));
+ com_err(program_name, ENOMEM, "%s",
+ _("while allocating buffers"));
exit (1);
}
bb_count = 0;
errcode = ext2fs_badblocks_list_iterate_begin(bb_list,&bb_iter);
if (errcode) {
- com_err (program_name, errcode,
- _("while beginning bad block list iteration"));
+ com_err(program_name, errcode, "%s",
+ _("while beginning bad block list iteration"));
exit (1);
}
do {
} while (next_bad && next_bad < first_block);
blkbuf = allocate_buffer(3 * blocks_at_once * block_size);
- test_record = malloc (blocks_at_once*sizeof(struct saved_blk_record));
+ test_record = malloc(blocks_at_once * sizeof(struct saved_blk_record));
if (!blkbuf || !test_record) {
- com_err(program_name, ENOMEM, _("while allocating buffers"));
+ com_err(program_name, ENOMEM, "%s",
+ _("while allocating buffers"));
exit (1);
}
}
if (!w_flag) {
if (t_flag > 1) {
- com_err(program_name, 0,
- _("Maximum of one test_pattern may be specified "
- "in read-only mode"));
+ com_err(program_name, 0, "%s",
+ _("Maximum of one test_pattern may be "
+ "specified in read-only mode"));
exit(1);
}
if (t_patts && (t_patts[0] == (unsigned int) ~0)) {
- com_err(program_name, 0,
- _("Random test_pattern is not allowed "
- "in read-only mode"));
+ com_err(program_name, 0, "%s",
+ _("Random test_pattern is not allowed "
+ "in read-only mode"));
exit(1);
}
}
block_size,
&last_block);
if (errcode == EXT2_ET_UNIMPLEMENTED) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("Couldn't determine device size; you "
"must specify\nthe size manually\n"));
exit(1);
}
if (errcode) {
- com_err(program_name, errcode,
+ com_err(program_name, errcode, "%s",
_("while trying to determine device size"));
exit(1);
}
errcode = ext2fs_badblocks_list_create(&bb_list,0);
if (errcode) {
- com_err (program_name, errcode,
- _("while creating in-memory bad blocks list"));
+ com_err(program_name, errcode, "%s",
+ _("while creating in-memory bad blocks list"));
exit (1);
}
for(;;) {
switch (fscanf(in, "%llu\n", &inblk)) {
case 0:
- com_err (program_name, 0, "input file - bad format");
+ com_err(program_name, 0, "%s",
+ _("input file - bad format"));
exit (1);
case EOF:
break;
default:
if (inblk >> 32) {
com_err(program_name,
- EOVERFLOW,
- _("while adding to in-memory bad block list"));
+ EOVERFLOW, "%s",
+ _("while adding to in-memory "
+ "bad block list"));
exit(1);
}
next_bad = inblk;
errcode = ext2fs_badblocks_list_add(bb_list,next_bad);
if (errcode) {
- com_err (program_name, errcode, _("while adding to in-memory bad block list"));
+ com_err(program_name, errcode,
+ "%s",
+ _("while adding to in-memory "
+ "bad block list"));
exit (1);
}
continue;
path = malloc(strlen (dir_name) + 1 + strlen (de->d_name) + 1);
if (!path) {
- fprintf(stderr, _("Couldn't allocate path variable "
- "in chattr_dir_proc"));
+ fprintf(stderr, "%s",
+ _("Couldn't allocate path variable "
+ "in chattr_dir_proc"));
return -1;
}
sprintf(path, "%s/%s", dir_name, de->d_name);
print_number(super_blk);
}
if (old_desc_blk) {
- printf(_(", Group descriptors at "));
+ printf("%s", _(", Group descriptors at "));
print_range(old_desc_blk,
old_desc_blk + old_desc_blocks - 1);
if (reserved_gdt) {
- printf(_("\n Reserved GDT blocks at "));
+ printf("%s", _("\n Reserved GDT blocks at "));
print_range(old_desc_blk + old_desc_blocks,
old_desc_blk + old_desc_blocks +
reserved_gdt - 1);
}
} else if (new_desc_blk) {
fputc(has_super ? ',' : ' ', stdout);
- printf(_(" Group descriptor at "));
+ printf("%s", _(" Group descriptor at "));
print_number(new_desc_blk);
has_super++;
}
retval = ext2fs_badblocks_list_iterate_begin(bb_list, &bb_iter);
if (retval) {
com_err("ext2fs_badblocks_list_iterate_begin", retval,
- _("while printing bad block list"));
+ "%s", _("while printing bad block list"));
return;
}
if (dump) {
retval = ext2fs_read_inode(fs, ino, &inode);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while reading journal inode"));
exit(1);
}
retval = ext2fs_file_open2(fs, ino, &inode, 0, &journal_file);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while opening journal inode"));
exit(1);
}
retval = ext2fs_file_read(journal_file, buf, sizeof(buf), 0);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while reading journal super block"));
exit(1);
}
ext2fs_file_close(journal_file);
jsb = (journal_superblock_t *) buf;
if (be32_to_cpu(jsb->s_header.h_magic) != JFS_MAGIC_NUMBER) {
- fprintf(stderr,
- "Journal superblock magic number invalid!\n");
+ fprintf(stderr, "%s",
+ _("Journal superblock magic number invalid!\n"));
exit(1);
}
- printf(_("Journal features: "));
+ printf("%s", _("Journal features: "));
for (i=0, mask_ptr=&jsb->s_feature_compat; i <3; i++,mask_ptr++) {
mask = be32_to_cpu(*mask_ptr);
for (j=0,m=1; j < 32; j++, m<<=1) {
journal_superblock_t *jsb;
/* Get the journal superblock */
- if ((retval = io_channel_read_blk64(fs->io, fs->super->s_first_data_block+1, -1024, buf))) {
- com_err(program_name, retval,
+ if ((retval = io_channel_read_blk64(fs->io,
+ fs->super->s_first_data_block + 1,
+ -1024, buf))) {
+ com_err(program_name, retval, "%s",
_("while reading journal superblock"));
exit(1);
}
if ((jsb->s_header.h_magic != (unsigned) ntohl(JFS_MAGIC_NUMBER)) ||
(jsb->s_header.h_blocktype !=
(unsigned) ntohl(JFS_SUPERBLOCK_V2))) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("Couldn't find journal superblock magic numbers"));
exit(1);
}
len = strlen(opts);
buf = malloc(len+1);
if (!buf) {
- fprintf(stderr,
+ fprintf(stderr, "%s",
_("Couldn't allocate memory to parse options!\n"));
exit(1);
}
if (retval) {
com_err (program_name, retval, _("while trying to open %s"),
device_name);
- printf (_("Couldn't find valid filesystem superblock.\n"));
+ printf("%s", _("Couldn't find valid filesystem superblock.\n"));
exit (1);
}
fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
/* Sanity check */
if (hdr_size > wrt_size) {
- fprintf(stderr, _("Error: header size is bigger than "
- "wrt_size\n"));
+ fprintf(stderr, "%s",
+ _("Error: header size is bigger than wrt_size\n"));
}
ret = ext2fs_get_mem(wrt_size, &header_buf);
hdr.offset_super = ext2fs_llseek(fd, 0, SEEK_CUR);
retval = ext2fs_image_super_write(fs, fd, 0);
if (retval) {
- com_err(program_name, retval, _("while writing superblock"));
+ com_err(program_name, retval, "%s",
+ _("while writing superblock"));
exit(1);
}
retval = ext2fs_image_inode_write(fs, fd,
(fd != 1) ? IMAGER_FLAG_SPARSEWRITE : 0);
if (retval) {
- com_err(program_name, retval, _("while writing inode table"));
+ com_err(program_name, retval, "%s",
+ _("while writing inode table"));
exit(1);
}
hdr.offset_blockmap = ext2fs_llseek(fd, 0, SEEK_CUR);
retval = ext2fs_image_bitmap_write(fs, fd, 0);
if (retval) {
- com_err(program_name, retval, _("while writing block bitmap"));
+ com_err(program_name, retval, "%s",
+ _("while writing block bitmap"));
exit(1);
}
hdr.offset_inodemap = ext2fs_llseek(fd, 0, SEEK_CUR);
retval = ext2fs_image_bitmap_write(fs, fd, IMAGER_FLAG_INODEMAP);
if (retval) {
- com_err(program_name, retval, _("while writing inode bitmap"));
+ com_err(program_name, retval, "%s",
+ _("while writing inode bitmap"));
exit(1);
}
retval = ext2fs_open_inode_scan(fs, 0, &scan);
if (retval) {
- com_err(program_name, retval, _("while opening inode scan"));
+ com_err(program_name, retval,"%s",
+ _("while opening inode scan"));
exit(1);
}
retval = ext2fs_get_mem(fs->blocksize * 3, &block_buf);
if (retval) {
- com_err(program_name, 0, "Can't allocate block buffer");
+ com_err(program_name, 0, "%s",
+ _("Can't allocate block buffer"));
exit(1);
}
if (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE)
continue;
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while getting next inode"));
exit(1);
}
io_channel_set_blksize(channel, SUPERBLOCK_OFFSET);
retval = io_channel_read_blk64(channel, 1, -SUPERBLOCK_SIZE, &super);
if (retval) {
- com_err(prg_name,
- retval, _("Failed to read the file system data \n"));
+ com_err(prg_name, retval,
+ "%s", _("Failed to read the file system data \n"));
return retval;
}
}
memcpy(s_uuid, tdb_data.dptr, sizeof(s_uuid));
if (memcmp(s_uuid, super.s_uuid, sizeof(s_uuid))) {
- com_err(prg_name, 0,
+ com_err(prg_name, 0, "%s",
_("The file system UUID didn't match \n"));
return -1;
}
}
if (mount_flags & EXT2_MF_MOUNTED) {
- com_err(prg_name, retval, _("e2undo should only be run on "
- "unmounted file system\n"));
+ com_err(prg_name, retval, "%s", _("e2undo should only be run "
+ "on unmounted file system\n"));
exit(1);
}
retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block);
fclose (f);
if (retval) {
- com_err("ext2fs_read_bb_FILE", retval,
+ com_err("ext2fs_read_bb_FILE", retval, "%s",
_("while reading in list of bad blocks from file"));
exit(1);
}
retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block);
pclose(f);
if (retval) {
- com_err("ext2fs_read_bb_FILE", retval,
+ com_err("ext2fs_read_bb_FILE", retval, "%s",
_("while processing list of bad blocks from program"));
exit(1);
}
*/
retval = ext2fs_badblocks_list_iterate_begin(bb_list, &bb_iter);
if (retval) {
- com_err("ext2fs_badblocks_list_iterate_begin", retval,
+ com_err("ext2fs_badblocks_list_iterate_begin", retval, "%s",
_("while marking bad blocks as used"));
exit(1);
}
{
errcode_t retval;
struct ext2_inode inode;
- __u32 uid, gid;
retval = ext2fs_mkdir(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, 0);
if (retval) {
- com_err("ext2fs_mkdir", retval, _("while creating root dir"));
+ com_err("ext2fs_mkdir", retval, "%s",
+ _("while creating root dir"));
exit(1);
}
if (root_uid != 0 || root_gid != 0) {
retval = ext2fs_read_inode(fs, EXT2_ROOT_INO, &inode);
if (retval) {
- com_err("ext2fs_read_inode", retval,
+ com_err("ext2fs_read_inode", retval, "%s",
_("while reading root inode"));
exit(1);
}
retval = ext2fs_write_new_inode(fs, EXT2_ROOT_INO, &inode);
if (retval) {
- com_err("ext2fs_write_inode", retval,
+ com_err("ext2fs_write_inode", retval, "%s",
_("while setting root inode ownership"));
exit(1);
}
fs->umask = 077;
retval = ext2fs_mkdir(fs, EXT2_ROOT_INO, 0, name);
if (retval) {
- com_err("ext2fs_mkdir", retval,
+ com_err("ext2fs_mkdir", retval, "%s",
_("while creating /lost+found"));
exit(1);
}
retval = ext2fs_lookup(fs, EXT2_ROOT_INO, name, strlen(name), 0, &ino);
if (retval) {
- com_err("ext2_lookup", retval,
+ com_err("ext2_lookup", retval, "%s",
_("while looking up /lost+found"));
exit(1);
}
break;
retval = ext2fs_expand_dir(fs, ino);
if (retval) {
- com_err("ext2fs_expand_dir", retval,
+ com_err("ext2fs_expand_dir", retval, "%s",
_("while expanding /lost+found"));
exit(1);
}
ext2fs_inode_alloc_stats2(fs, EXT2_BAD_INO, +1, 0);
retval = ext2fs_update_bb_inode(fs, bb_list);
if (retval) {
- com_err("ext2fs_update_bb_inode", retval,
+ com_err("ext2fs_update_bb_inode", retval, "%s",
_("while setting bad block inode"));
exit(1);
}
retval = ext2fs_create_journal_superblock(fs,
ext2fs_blocks_count(fs->super), 0, &buf);
if (retval) {
- com_err("create_journal_dev", retval,
+ com_err("create_journal_dev", retval, "%s",
_("while initializing journal superblock"));
exit(1);
}
fs->super->s_first_data_block+1,
1, buf);
if (retval) {
- com_err("create_journal_dev", retval,
+ com_err("create_journal_dev", retval, "%s",
_("while writing journal superblock"));
exit(1);
}
return;
}
- printf(_("Superblock backups stored on blocks: "));
+ printf("%s", _("Superblock backups stored on blocks: "));
group_block = s->s_first_data_block;
col_left = 0;
for (i = 1; i < fs->group_desc_count; i++) {
len = strlen(opts);
buf = malloc(len+1);
if (!buf) {
- fprintf(stderr,
+ fprintf(stderr, "%s",
_("Couldn't allocate memory to parse options!\n"));
exit(1);
}
continue;
}
if (resize <= ext2fs_blocks_count(param)) {
- fprintf(stderr,
+ fprintf(stderr, "%s",
_("The resize maximum must be greater "
"than the filesystem size.\n"));
r_usage++;
if (rsv_gdb > 0) {
if (param->s_rev_level == EXT2_GOOD_OLD_REV) {
- fprintf(stderr,
+ fprintf(stderr, "%s",
_("On-line resizing not supported with revision 0 filesystems\n"));
free(buf);
exit(1);
"%s filesystem type.\n"), ext_type);
if (!strcmp(ext_type, "ext3") || !strcmp(ext_type, "ext4") ||
!strcmp(ext_type, "ext4dev")) {
- printf(_("You probably need to install an updated "
- "mke2fs.conf file.\n\n"));
+ printf("%s", _("You probably need to install an "
+ "updated mke2fs.conf file.\n\n"));
}
if (!force) {
- printf(_("Aborting...\n"));
+ printf("%s", _("Aborting...\n"));
exit(1);
}
}
pathlen += strlen(oldpath);
newpath = malloc(pathlen);
if (!newpath) {
- fprintf(stderr, _("Couldn't allocate memory for new PATH.\n"));
+ fprintf(stderr, "%s",
+ _("Couldn't allocate memory for new PATH.\n"));
exit(1);
}
strcpy(newpath, PATH_SET);
direct_io = 1;
break;
case 'R':
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("'-R' is deprecated, use '-E' instead"));
/* fallthrough */
case 'E':
case 'g':
fs_param.s_blocks_per_group = strtoul(optarg, &tmp, 0);
if (*tmp) {
- com_err(program_name, 0,
- _("Illegal number for blocks per group"));
+ com_err(program_name, 0, "%s",
+ _("Illegal number for blocks per group"));
exit(1);
}
if ((fs_param.s_blocks_per_group % 8) != 0) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("blocks per group must be multiple of 8"));
exit(1);
}
case 'G':
flex_bg_size = strtoul(optarg, &tmp, 0);
if (*tmp) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("Illegal number for flex_bg size"));
exit(1);
}
if (flex_bg_size < 1 ||
(flex_bg_size & (flex_bg_size-1)) != 0) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("flex_bg size must be a power of 2"));
exit(1);
}
parse_journal_opts(optarg);
break;
case 'K':
- fprintf(stderr, _("Warning: -K option is deprecated and "
- "should not be used anymore. Use "
- "\'-E nodiscard\' extended option "
- "instead!\n"));
+ fprintf(stderr, "%s",
+ _("Warning: -K option is deprecated and "
+ "should not be used anymore. Use "
+ "\'-E nodiscard\' extended option "
+ "instead!\n"));
discard = 0;
break;
case 'l':
bad_blocks_filename = realloc(bad_blocks_filename,
strlen(optarg) + 1);
if (!bad_blocks_filename) {
- com_err(program_name, ENOMEM,
+ com_err(program_name, ENOMEM, "%s",
_("in malloc for bad_blocks_filename"));
exit(1);
}
break;
case 't':
if (fs_type) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("The -t option may only be used once"));
exit(1);
}
break;
case 'T':
if (usage_types) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("The -T option may only be used once"));
exit(1);
}
&dev_size);
if (retval && (retval != EXT2_ET_UNIMPLEMENTED)) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while trying to determine filesystem size"));
exit(1);
}
if (!fs_blocks_count) {
if (retval == EXT2_ET_UNIMPLEMENTED) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("Couldn't determine device size; you "
"must specify\nthe size of the "
"filesystem\n"));
exit(1);
} else {
if (dev_size == 0) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("Device size reported to be zero. "
"Invalid partition specified, or\n\t"
"partition table wasn't reread "
EXT2_BLOCK_SIZE(&fs_param))-1));
}
} else if (!force && (fs_blocks_count > dev_size)) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("Filesystem larger than apparent device size."));
proceed_question();
}
fs_blocks_count ? fs_blocks_count : dev_size,
argv[0]);
if (!fs_types) {
- fprintf(stderr, _("Failed to parse fs types list\n"));
+ fprintf(stderr, "%s", _("Failed to parse fs types list\n"));
exit(1);
}
/* Get the hardware sector sizes, if available */
retval = ext2fs_get_device_sectsize(device_name, &lsector_size);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while trying to determine hardware sector size"));
exit(1);
}
retval = ext2fs_get_device_phys_sectsize(device_name, &psector_size);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while trying to determine physical sector size"));
exit(1);
}
fs_blocks_count /= (blocksize / 1024);
} else {
if (blocksize < lsector_size) { /* Impossible */
- com_err(program_name, EINVAL,
+ com_err(program_name, EINVAL, "%s",
_("while setting blocksize; too small "
"for device\n"));
exit(1);
if (r_opt == EXT2_GOOD_OLD_REV &&
(fs_param.s_feature_compat || fs_param.s_feature_incompat ||
fs_param.s_feature_ro_compat)) {
- fprintf(stderr, _("Filesystem features not supported "
- "with revision 0 filesystems\n"));
+ fprintf(stderr, "%s", _("Filesystem features not supported "
+ "with revision 0 filesystems\n"));
exit(1);
}
if (s_opt > 0) {
if (r_opt == EXT2_GOOD_OLD_REV) {
- fprintf(stderr, _("Sparse superblocks not supported "
+ fprintf(stderr, "%s",
+ _("Sparse superblocks not supported "
"with revision 0 filesystems\n"));
exit(1);
}
if (journal_size != 0) {
if (r_opt == EXT2_GOOD_OLD_REV) {
- fprintf(stderr, _("Journals not supported "
- "with revision 0 filesystems\n"));
+ fprintf(stderr, "%s", _("Journals not supported with "
+ "revision 0 filesystems\n"));
exit(1);
}
fs_param.s_feature_compat |=
/* Check the user's mkfs options for 64bit */
if ((fs_param.s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) &&
!(fs_param.s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS)) {
- printf(_("Extents MUST be enabled for a 64-bit filesystem. "
- "Pass -O extents to rectify.\n"));
+ printf("%s", _("Extents MUST be enabled for a 64-bit "
+ "filesystem. Pass -O extents to rectify.\n"));
exit(1);
}
int_log2(cluster_size >> EXT2_MIN_CLUSTER_LOG_SIZE);
if (fs_param.s_log_cluster_size &&
fs_param.s_log_cluster_size < fs_param.s_log_block_size) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("The cluster size may not be "
"smaller than the block size.\n"));
exit(1);
}
} else if (cluster_size) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("specifying a cluster size requires the "
"bigalloc feature"));
exit(1);
/* Can't support bigalloc feature without extents feature */
if ((fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC) &&
!(fs_param.s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS)) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("Can't support bigalloc feature without "
"extents feature"));
exit(1);
if ((fs_param.s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) &&
(fs_param.s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE)) {
- fprintf(stderr, _("The resize_inode and meta_bg features "
- "are not compatible.\n"
- "They can not be both enabled "
- "simultaneously.\n"));
+ fprintf(stderr, "%s", _("The resize_inode and meta_bg "
+ "features are not compatible.\n"
+ "They can not be both enabled "
+ "simultaneously.\n"));
exit(1);
}
if (!quiet &&
(fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC))
- fprintf(stderr, _("\nWarning: the bigalloc feature is still "
- "under development\n"
+ fprintf(stderr, "%s", _("\nWarning: the bigalloc feature is "
+ "still under development\n"
"See https://ext4.wiki.kernel.org/"
"index.php/Bigalloc for more information\n\n"));
if (!quiet &&
(fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_QUOTA))
- fprintf(stderr, _("\nWarning: the quota feature is still "
- "under development\n"
+ fprintf(stderr, "%s", _("\nWarning: the quota feature is "
+ "still under development\n"
"See https://ext4.wiki.kernel.org/"
"index.php/Quota for more information\n\n"));
*/
if ((fs_param.s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE) &&
!(fs_param.s_feature_ro_compat&EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("reserved online resize blocks not supported "
"on non-sparse filesystem"));
exit(1);
if (fs_param.s_blocks_per_group) {
if (fs_param.s_blocks_per_group < 256 ||
fs_param.s_blocks_per_group > 8 * (unsigned) blocksize) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("blocks per group count out of range"));
exit(1);
}
if (flex_bg_size) {
if (!(fs_param.s_feature_incompat &
EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("Flex_bg feature not enabled, so "
"flex_bg size may not be specified"));
exit(1);
if (free_tdb_dir)
free(tdb_dir);
free(tdb_file);
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while trying to setup undo file\n"));
return retval;
}
flags |= EXT2_FLAG_PRINT_PROGRESS;
retval = ext2fs_initialize(device_name, flags, &fs_param, io_ptr, &fs);
if (retval) {
- com_err(device_name, retval, _("while setting up superblock"));
+ com_err(device_name, retval, "%s",
+ _("while setting up superblock"));
exit(1);
}
retval = mke2fs_discard_device(fs);
if (!retval && io_channel_discard_zeroes_data(fs->io)) {
if (verbose)
- printf(_("Discard succeeded and will return 0s "
- " - skipping inode table wipe\n"));
+ printf("%s",
+ _("Discard succeeded and will return "
+ "0s - skipping inode table wipe\n"));
lazy_itable_init = 1;
itable_zeroed = 1;
}
handle_bad_blocks(fs, bb_list);
fs->stride = fs_stride = fs->super->s_raid_stride;
if (!quiet)
- printf(_("Allocating group tables: "));
+ printf("%s", _("Allocating group tables: "));
retval = ext2fs_allocate_tables(fs);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while trying to allocate filesystem tables"));
exit(1);
}
if (!quiet)
- printf(_("done \n"));
+ printf("%s", _("done \n"));
retval = ext2fs_convert_subcluster_bitmap(fs, &fs->block_map);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("\n\twhile converting subcluster bitmap"));
exit(1);
}
retval = ext2fs_create_resize_inode(fs);
if (retval) {
com_err("ext2fs_create_resize_inode", retval,
+ "%s",
_("while reserving blocks for online resize"));
exit(1);
}
exit(1);
}
if (!quiet)
- printf(_("done\n"));
+ printf("%s", _("done\n"));
ext2fs_close(jfs);
free(journal_device);
} else if ((journal_size) ||
(fs_param.s_feature_compat &
EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
if (super_only) {
- printf(_("Skipping journal creation in super-only mode\n"));
+ printf("%s", _("Skipping journal creation in super-only mode\n"));
fs->super->s_journal_inum = EXT2_JOURNAL_INO;
goto no_journal;
}
retval = ext2fs_add_journal_inode(fs, journal_blocks,
journal_flags);
if (retval) {
- com_err (program_name, retval,
- _("\n\twhile trying to create journal"));
+ com_err(program_name, retval, "%s",
+ _("\n\twhile trying to create journal"));
exit(1);
}
if (!quiet)
- printf(_("done\n"));
+ printf("%s", _("done\n"));
}
no_journal:
if (!super_only &&
fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_MMP) {
retval = ext2fs_mmp_init(fs);
if (retval) {
- fprintf(stderr, _("\nError while enabling multiple "
- "mount protection feature."));
+ fprintf(stderr, "%s",
+ _("\nError while enabling multiple "
+ "mount protection feature."));
exit(1);
}
if (!quiet)
create_quota_inodes(fs);
if (!quiet)
- printf(_("Writing superblocks and "
+ printf("%s", _("Writing superblocks and "
"filesystem accounting information: "));
checkinterval = fs->super->s_checkinterval;
max_mnt_count = fs->super->s_max_mnt_count;
retval = ext2fs_close(fs);
if (retval) {
- fprintf(stderr,
+ fprintf(stderr, "%s",
_("\nWarning, had trouble writing out superblocks."));
} else if (!quiet) {
- printf(_("done\n\n"));
+ printf("%s", _("done\n\n"));
if (!getenv("MKE2FS_SKIP_CHECK_MSG"))
print_check_message(max_mnt_count, checkinterval);
}
E2FSPROGS_DATE);
if (argc != 1) {
(void)argv; /* avoid unused argument warning */
- fprintf (stderr, _("Usage: mklost+found\n"));
+ fprintf (stderr, "%s", _("Usage: mklost+found\n"));
exit(1);
}
if (mkdir (LPF, 0700) == -1) {
EXT2_FLAG_JOURNAL_DEV_OK, 0,
fs->blocksize, io_ptr, &jfs);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while trying to open external journal"));
goto no_valid_journal;
}
/* Get the journal superblock */
if ((retval = io_channel_read_blk64(jfs->io, 1, -1024, buf))) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while reading journal superblock"));
goto no_valid_journal;
}
retval = ext2fs_read_inode(fs, ino, &inode);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while reading journal inode"));
return retval;
}
if (ino == EXT2_JOURNAL_INO) {
retval = ext2fs_read_bitmaps(fs);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while reading bitmaps"));
return retval;
}
BLOCK_FLAG_READ_ONLY, NULL,
release_blocks_proc, NULL);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while clearing journal inode"));
return retval;
}
inode.i_flags &= ~EXT2_IMMUTABLE_FL;
retval = ext2fs_write_inode(fs, ino, &inode);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while writing journal inode"));
return retval;
}
fs->super->s_state &= ~EXT2_VALID_FS;
printf("\n%s\n", _(please_fsck));
if (mount_flags & EXT2_MF_READONLY)
- printf(_("(and reboot afterwards!)\n"));
+ printf("%s", _("(and reboot afterwards!)\n"));
}
/*
"match. expected: %x, actual: %x\n"),
EXT4_MMP_MAGIC, mmp_cmp->mmp_magic);
else
- com_err(program_name, error,
+ com_err(program_name, error, "%s",
_("while reading MMP block."));
goto mmp_error;
}
journal_flags);
if (retval) {
fprintf(stderr, "\n");
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("\n\twhile trying to create journal file"));
return retval;
} else
quota_release_context(&qctx);
if ((usrquota == QOPT_ENABLE) || (grpquota == QOPT_ENABLE)) {
- fprintf(stderr, _("\nWarning: the quota feature is still "
+ fprintf(stderr, "%s", _("\nWarning: the quota feature is still "
"under development\n"
"See https://ext4.wiki.kernel.org/"
"index.php/Quota for more information\n\n"));
break;
case 'o':
if (mntopts_cmd) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("-o may only be specified once"));
usage();
}
break;
case 'O':
if (features_cmd) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("-O may only be specified once"));
usage();
}
len = strlen(opts);
buf = malloc(len+1);
if (!buf) {
- fprintf(stderr,
+ fprintf(stderr, "%s",
_("Couldn't allocate memory to parse options!\n"));
return 1;
}
r_usage++;
}
if (r_usage) {
- fprintf(stderr, _("\nBad options specified.\n\n"
+ fprintf(stderr, "%s", _("\nBad options specified.\n\n"
"Extended options are separated by commas, "
"and may take an argument which\n"
"\tis set off by an equals ('=') sign.\n\n"
tmp_name = strdup(name);
if (!tmp_name) {
alloc_fn_fail:
- com_err(program_name, ENOMEM,
+ com_err(program_name, ENOMEM, "%s",
_("Couldn't allocate memory for tdb filename\n"));
return ENOMEM;
}
_("MMP block magic is bad. Try to fix it by "
"running:\n'e2fsck -f %s'\n"), device_name);
else if (retval != EXT2_ET_MMP_FAILED)
- fprintf(stderr,
+ fprintf(stderr, "%s",
_("Couldn't find valid filesystem superblock.\n"));
ext2fs_free(fs);
goto closefs;
}
if (new_inode_size < EXT2_INODE_SIZE(fs->super)) {
- fprintf(stderr, _("Shrinking the inode size is "
- "not supported\n"));
+ fprintf(stderr, "%s",
+ _("Shrinking inode size is not supported\n"));
rc = 1;
goto closefs;
}
} else if (strcasecmp(new_UUID, "random") == 0) {
uuid_generate(sb->s_uuid);
} else if (uuid_parse(new_UUID, sb->s_uuid)) {
- com_err(program_name, 0, _("Invalid UUID format\n"));
+ com_err(program_name, 0, "%s",
+ _("Invalid UUID format\n"));
rc = 1;
goto closefs;
}
printf(_("Setting inode size %lu\n"),
new_inode_size);
} else {
- printf(_("Failed to change inode size\n"));
+ printf("%s", _("Failed to change inode size\n"));
rc = 1;
goto closefs;
}
"%s and subsequent %d UUIDs\n", num),
str, num);
} else {
- printf(_("List of UUID's:\n"));
+ printf("%s", _("List of UUID's:\n"));
cp = buf + 4;
if (ret != (int) (sizeof(num) + num*sizeof(uu)))
goto unexpected_size;
{
if (!force && EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
EXT4_FEATURE_RO_COMPAT_BIGALLOC)) {
- fprintf(stderr, _("\nResizing bigalloc file systems has "
- "not been fully tested. Proceed\n"
- "at your own risk! Use the force option "
- "if you want to go ahead anyway.\n\n"));
+ fprintf(stderr, "%s", _("\nResizing bigalloc file systems has "
+ "not been fully tested. Proceed at\n"
+ "your own risk! Use the force option "
+ "if you want to go ahead anyway.\n\n"));
exit(1);
}
}
retval = ext2fs_open2(device_name, io_options, io_flags,
0, 0, io_ptr, &fs);
if (retval) {
- com_err (program_name, retval, _("while trying to open %s"),
- device_name);
- printf (_("Couldn't find valid filesystem superblock.\n"));
+ com_err(program_name, retval, _("while trying to open %s"),
+ device_name);
+ printf("%s", _("Couldn't find valid filesystem superblock.\n"));
exit (1);
}
retval = ext2fs_get_device_size2(device_name, fs->blocksize,
&max_size);
if (retval) {
- com_err(program_name, retval,
+ com_err(program_name, retval, "%s",
_("while trying to determine filesystem size"));
exit(1);
}
if (new_size == (1ULL << 32))
new_size--;
else if (new_size > (1ULL << 32)) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("New size too large to be "
"expressed in 32 bits\n"));
exit(1);
}
if (use_stride >= 0) {
if (use_stride >= (int) fs->super->s_blocks_per_group) {
- com_err(program_name, 0,
+ com_err(program_name, 0, "%s",
_("Invalid stride length"));
exit(1);
}
* should never happen anyway since the filesystem
* should be fsck'ed and we assume it is consistent.
*/
- fprintf(stderr,
+ fprintf(stderr, "%s",
_("Should never happen: resize inode corrupt!\n"));
exit(1);
}