blkid: if parameters are given, do not scan /dev

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2012-03-03 15:09:07 +01:00
parent 97e5281641
commit e8cfc3f693
3 changed files with 17 additions and 14 deletions

View File

@ -18,11 +18,14 @@
int blkid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int blkid_main(int argc UNUSED_PARAM, char **argv)
{
int scan_devices = 1;
while (*++argv) {
/* Note: bogus device names don't cause any error messages */
add_to_uuid_cache(*argv);
scan_devices = 0;
}
display_uuid_cache();
display_uuid_cache(scan_devices);
return 0;
}