2008-10-19 17:47:31 +00:00
|
|
|
/* vi: set sw=4 ts=4: */
|
|
|
|
/*
|
|
|
|
* Print UUIDs on all filesystems
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Denys Vlasenko.
|
|
|
|
*
|
2010-08-16 18:14:46 +00:00
|
|
|
* Licensed under GPLv2, see file LICENSE in this source tree.
|
2008-10-19 17:47:31 +00:00
|
|
|
*/
|
|
|
|
|
2011-04-11 01:29:49 +00:00
|
|
|
//usage:#define blkid_trivial_usage
|
2011-12-06 14:09:27 +00:00
|
|
|
//usage: "[BLOCKDEV]..."
|
2011-04-11 01:29:49 +00:00
|
|
|
//usage:#define blkid_full_usage "\n\n"
|
|
|
|
//usage: "Print UUIDs of all filesystems"
|
|
|
|
|
2008-10-19 17:47:31 +00:00
|
|
|
#include "libbb.h"
|
|
|
|
#include "volume_id.h"
|
|
|
|
|
|
|
|
int blkid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
2010-12-29 23:40:11 +00:00
|
|
|
int blkid_main(int argc UNUSED_PARAM, char **argv)
|
2008-10-19 17:47:31 +00:00
|
|
|
{
|
2012-03-03 14:09:07 +00:00
|
|
|
int scan_devices = 1;
|
|
|
|
|
2010-12-29 23:40:11 +00:00
|
|
|
while (*++argv) {
|
|
|
|
/* Note: bogus device names don't cause any error messages */
|
|
|
|
add_to_uuid_cache(*argv);
|
2012-03-03 14:09:07 +00:00
|
|
|
scan_devices = 0;
|
2010-12-29 23:40:11 +00:00
|
|
|
}
|
|
|
|
|
2012-03-03 14:09:07 +00:00
|
|
|
display_uuid_cache(scan_devices);
|
2008-10-19 17:47:31 +00:00
|
|
|
return 0;
|
|
|
|
}
|