support for mount by label (not yet tested)
Also adds findfs applet. Closes bug 1143.
This commit is contained in:
@@ -557,20 +557,6 @@ static void parse_tune2fs_options(int argc, char **argv)
|
||||
device_name = x_blkid_get_devname(argv[optind]);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FINDFS
|
||||
static ATTRIBUTE_NORETURN void do_findfs(int argc, char **argv)
|
||||
{
|
||||
if ((argc != 2) ||
|
||||
(strncmp(argv[1], "LABEL=", 6) && strncmp(argv[1], "UUID=", 5)))
|
||||
bb_show_usage();
|
||||
device_name = x_blkid_get_devname(argv[1]);
|
||||
puts(device_name);
|
||||
exit(0);
|
||||
}
|
||||
#else
|
||||
#define do_findfs(x, y)
|
||||
#endif
|
||||
|
||||
static void tune2fs_clean_up(void)
|
||||
{
|
||||
if (ENABLE_FEATURE_CLEAN_UP && device_name) free(device_name);
|
||||
@@ -588,9 +574,7 @@ int tune2fs_main(int argc, char **argv)
|
||||
if (ENABLE_FEATURE_CLEAN_UP)
|
||||
atexit(tune2fs_clean_up);
|
||||
|
||||
if (ENABLE_FINDFS && (applet_name[0] == 'f')) /* findfs */
|
||||
do_findfs(argc, argv); /* no return */
|
||||
else if (ENABLE_E2LABEL && (applet_name[0] == 'e')) /* e2label */
|
||||
if (ENABLE_E2LABEL && (applet_name[0] == 'e')) /* e2label */
|
||||
parse_e2label_options(argc, argv);
|
||||
else
|
||||
parse_tune2fs_options(argc, argv); /* tune2fs */
|
||||
|
||||
Reference in New Issue
Block a user