mirror of https://github.com/vitalif/e2fsprogs
Check the returned name from blkid_get_devname in tune2fs and
e2fsck, and print an error if the requested LABEL/UUID does not exist (previously, we core dumped!)bitmap-optimize
parent
ef344e13d2
commit
817e49e3ce
|
@ -1,3 +1,8 @@
|
||||||
|
2003-09-12 Theodore Ts'o <tytso@mit.edu>
|
||||||
|
|
||||||
|
* unix.c (PRS): Check the returned name from blkid_get_devname and
|
||||||
|
print an error if the requested LABEL/UUID does not exist.
|
||||||
|
|
||||||
2003-09-03 Theodore Ts'o <tytso@mit.edu>
|
2003-09-03 Theodore Ts'o <tytso@mit.edu>
|
||||||
|
|
||||||
* pass1.c (mark_table_blocks): Use the new function
|
* pass1.c (mark_table_blocks): Use the new function
|
||||||
|
|
|
@ -638,6 +638,11 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
|
||||||
!cflag && !swapfs && !(ctx->options & E2F_OPT_COMPRESS_DIRS))
|
!cflag && !swapfs && !(ctx->options & E2F_OPT_COMPRESS_DIRS))
|
||||||
ctx->options |= E2F_OPT_READONLY;
|
ctx->options |= E2F_OPT_READONLY;
|
||||||
ctx->filesystem_name = blkid_get_devname(ctx->blkid, argv[optind], 0);
|
ctx->filesystem_name = blkid_get_devname(ctx->blkid, argv[optind], 0);
|
||||||
|
if (!ctx->filesystem_name) {
|
||||||
|
com_err(ctx->program_name, 0, _("Unable to resolve '%s'"),
|
||||||
|
argv[optind]);
|
||||||
|
fatal_error(ctx, 0);
|
||||||
|
}
|
||||||
if (extended_opts)
|
if (extended_opts)
|
||||||
parse_extended_opts(ctx, extended_opts);
|
parse_extended_opts(ctx, extended_opts);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2003-09-13 Theodore Ts'o <tytso@mit.edu>
|
||||||
|
|
||||||
|
* tune2fs.c (parse_e2label_options, parse_tune2fs_options,
|
||||||
|
do_findfs): Check the returned name from blkid_get_devname and
|
||||||
|
print an error if the requested LABEL/UUID does not exist.
|
||||||
|
|
||||||
2003-09-03 Theodore Ts'o <tytso@mit.edu>
|
2003-09-03 Theodore Ts'o <tytso@mit.edu>
|
||||||
|
|
||||||
* dumpe2fs.c (list_desc): Use ext2fs_super_and_bgd_loc to
|
* dumpe2fs.c (list_desc): Use ext2fs_super_and_bgd_loc to
|
||||||
|
|
|
@ -441,6 +441,11 @@ static void parse_e2label_options(int argc, char ** argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
device_name = blkid_get_devname(NULL, argv[1], NULL);
|
device_name = blkid_get_devname(NULL, argv[1], NULL);
|
||||||
|
if (!device_name) {
|
||||||
|
com_err("e2label", 0, _("Unable to resolve '%s'"),
|
||||||
|
argv[1]);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
if (argc == 3) {
|
if (argc == 3) {
|
||||||
open_flag = EXT2_FLAG_RW | EXT2_FLAG_JOURNAL_DEV_OK;
|
open_flag = EXT2_FLAG_RW | EXT2_FLAG_JOURNAL_DEV_OK;
|
||||||
L_flag = 1;
|
L_flag = 1;
|
||||||
|
@ -691,6 +696,11 @@ static void parse_tune2fs_options(int argc, char **argv)
|
||||||
if (!open_flag && !l_flag)
|
if (!open_flag && !l_flag)
|
||||||
usage();
|
usage();
|
||||||
device_name = blkid_get_devname(NULL, argv[optind], NULL);
|
device_name = blkid_get_devname(NULL, argv[optind], NULL);
|
||||||
|
if (!device_name) {
|
||||||
|
com_err("tune2fs", 0, _("Unable to resolve '%s'"),
|
||||||
|
argv[optind]);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_findfs(int argc, char **argv)
|
void do_findfs(int argc, char **argv)
|
||||||
|
@ -704,7 +714,7 @@ void do_findfs(int argc, char **argv)
|
||||||
}
|
}
|
||||||
dev = blkid_get_devname(NULL, argv[1], NULL);
|
dev = blkid_get_devname(NULL, argv[1], NULL);
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
fprintf(stderr, "Filesystem matching %s not found\n",
|
com_err("findfs", 0, _("Unable to resolve '%s'"),
|
||||||
argv[1]);
|
argv[1]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue