Whamcloud - gitweb
tune2fs.c (parse_tune2fs_options, parse_e2label_options): Allow
authorTheodore Ts'o <tytso@mit.edu>
Thu, 6 Mar 2003 17:58:33 +0000 (12:58 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Mar 2003 17:58:33 +0000 (12:58 -0500)
the device name to be specified using LABEL=xxx or
UUID=xxx, since we're including the blkid library anyway.
(Addresses Debian bugs #166048, #179671)

misc/ChangeLog
misc/tune2fs.c

index 2789ded..015f133 100644 (file)
@@ -1,4 +1,9 @@
-2003-03-06    <tytso@snap.thunk.org>
+2003-03-06    <tytso@mit.edu>
+
+       * tune2fs.c (parse_tune2fs_options, parse_e2label_options): Allow
+               the device name to be specified using LABEL=xxx or
+               UUID=xxx, since we're including the blkid library anyway.
+               (Addresses Debian bugs #166048, #179671)
 
        * tune2fs.8.in, chattr.1.in: Minor man page fixes (Addresses
                Debian bugs #175233, #175113, and #170497)
index 9deba80..818c8a1 100644 (file)
@@ -426,7 +426,7 @@ static void parse_e2label_options(int argc, char ** argv)
                fprintf(stderr, _("Usage: e2label device [newlabel]\n"));
                exit(1);
        }
-       device_name = argv[1];
+       device_name = blkid_get_devname(NULL, argv[1], NULL);
        if (argc == 3) {
                open_flag = EXT2_FLAG_RW | EXT2_FLAG_JOURNAL_DEV_OK;
                L_flag = 1;
@@ -665,7 +665,7 @@ static void parse_tune2fs_options(int argc, char **argv)
                usage();
        if (!open_flag && !l_flag)
                usage();
-       device_name = argv[optind];
+       device_name = blkid_get_devname(NULL, argv[optind], NULL);
 }
 
 void do_findfs(int argc, char **argv)