X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=misc%2Ftune2fs.c;h=f3ce443ca0c16da283076fbf501b39872bd63271;hb=6695555e50a374f897965300568253f242a0b13b;hp=98e38983b70bb1768d99c18e44d678f9cd6817a3;hpb=66ecb6abe5d2c74191bb4bc24f3da036e5fa1213;p=tools%2Fe2fsprogs.git diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 98e3898..f3ce443 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -3105,7 +3105,9 @@ _("Warning: The journal is dirty. You may wish to replay the journal like:\n\n" if (retval) { com_err("tune2fs", retval, "while recovering journal.\n"); - printf(_("Please run e2fsck -fy %s.\n"), argv[1]); + printf(_("Please run e2fsck -fy %s.\n"), device_name); + if (!fs) + exit(1); rc = 1; goto closefs; } @@ -3243,6 +3245,7 @@ _("Warning: The journal is dirty. You may wish to replay the journal like:\n\n" fputs(_("Error in using clear_mmp. " "It must be used with -f\n"), stderr); + rc = 1; goto closefs; } } @@ -3447,5 +3450,5 @@ closefs: if (feature_64bit) convert_64bit(fs, feature_64bit); - return (ext2fs_close_free(&fs) ? 1 : 0); + return (ext2fs_close_free(&fs) ? 1 : rc); }