3
0

blkid.c 696 B

12345678910111213141516171819202122232425262728293031
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * Print UUIDs on all filesystems
  4. *
  5. * Copyright (C) 2008 Denys Vlasenko.
  6. *
  7. * Licensed under GPLv2, see file LICENSE in this source tree.
  8. */
  9. //usage:#define blkid_trivial_usage
  10. //usage: "[BLOCKDEV]..."
  11. //usage:#define blkid_full_usage "\n\n"
  12. //usage: "Print UUIDs of all filesystems"
  13. #include "libbb.h"
  14. #include "volume_id.h"
  15. int blkid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
  16. int blkid_main(int argc UNUSED_PARAM, char **argv)
  17. {
  18. int scan_devices = 1;
  19. while (*++argv) {
  20. /* Note: bogus device names don't cause any error messages */
  21. add_to_uuid_cache(*argv);
  22. scan_devices = 0;
  23. }
  24. display_uuid_cache(scan_devices);
  25. return 0;
  26. }