+2010-07-29 Robert Millan <rmh@gnu.org>
+
+ * util/grub-probe.c (PRINT_FS_LABEL): New enum value.
+ (probe): Handle `PRINT_FS_LABEL'.
+ (main): Handle `-t fs_label'.
+
2010-07-29 Robert Millan <rmh@gnu.org>
* configure.ac: Remove grub-mkisofs checks.
enum {
PRINT_FS,
PRINT_FS_UUID,
+ PRINT_FS_LABEL,
PRINT_DRIVE,
PRINT_DEVICE,
PRINT_PARTMAP,
printf ("%s\n", uuid);
}
+ else if (print == PRINT_FS_LABEL)
+ {
+ char *label;
+ if (! fs->label)
+ grub_util_error ("%s does not support labels", fs->name);
+
+ fs->label (dev, &label);
+
+ printf ("%s\n", label);
+ }
end:
if (dev)
\n\
-d, --device given argument is a system device, not a path\n\
-m, --device-map=FILE use FILE as the device map [default=%s]\n\
- -t, --target=(fs|fs_uuid|drive|device|partmap|abstraction)\n\
+ -t, --target=(fs|fs_uuid|fs_label|drive|device|partmap|abstraction)\n\
print filesystem module, GRUB drive, system device, partition map module or abstraction module [default=fs]\n\
-h, --help display this message and exit\n\
-V, --version print version information and exit\n\
print = PRINT_FS;
else if (!strcmp (optarg, "fs_uuid"))
print = PRINT_FS_UUID;
+ else if (!strcmp (optarg, "fs_label"))
+ print = PRINT_FS_LABEL;
else if (!strcmp (optarg, "drive"))
print = PRINT_DRIVE;
else if (!strcmp (optarg, "device"))