Denis Vlasenko | bff06fe | 2008-10-19 17:47:31 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | /* |
| 3 | * Print UUIDs on all filesystems |
| 4 | * |
| 5 | * Copyright (C) 2008 Denys Vlasenko. |
| 6 | * |
Denys Vlasenko | 0ef64bd | 2010-08-16 20:14:46 +0200 | [diff] [blame] | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
Denis Vlasenko | bff06fe | 2008-10-19 17:47:31 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
Pere Orga | 5bc8c00 | 2011-04-11 03:29:49 +0200 | [diff] [blame] | 10 | //usage:#define blkid_trivial_usage |
Denys Vlasenko | 2f8ccc1 | 2011-12-06 15:09:27 +0100 | [diff] [blame^] | 11 | //usage: "[BLOCKDEV]..." |
Pere Orga | 5bc8c00 | 2011-04-11 03:29:49 +0200 | [diff] [blame] | 12 | //usage:#define blkid_full_usage "\n\n" |
| 13 | //usage: "Print UUIDs of all filesystems" |
| 14 | |
Denis Vlasenko | bff06fe | 2008-10-19 17:47:31 +0000 | [diff] [blame] | 15 | #include "libbb.h" |
| 16 | #include "volume_id.h" |
| 17 | |
Denis Vlasenko | bff06fe | 2008-10-19 17:47:31 +0000 | [diff] [blame] | 18 | int blkid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
Denys Vlasenko | 90615a0 | 2010-12-30 00:40:11 +0100 | [diff] [blame] | 19 | int blkid_main(int argc UNUSED_PARAM, char **argv) |
Denis Vlasenko | bff06fe | 2008-10-19 17:47:31 +0000 | [diff] [blame] | 20 | { |
Denys Vlasenko | 90615a0 | 2010-12-30 00:40:11 +0100 | [diff] [blame] | 21 | while (*++argv) { |
| 22 | /* Note: bogus device names don't cause any error messages */ |
| 23 | add_to_uuid_cache(*argv); |
| 24 | } |
| 25 | |
Denis Vlasenko | bff06fe | 2008-10-19 17:47:31 +0000 | [diff] [blame] | 26 | display_uuid_cache(); |
| 27 | return 0; |
| 28 | } |