2 * Copyright (C) 2009 Karel Zak <kzak@redhat.com>
4 * This file may be redistributed under the terms of the GNU Public
17 static void __attribute__((__noreturn__)) usage(int rc)
19 const char *p = program_invocation_short_name;
24 fprintf(stderr, _("Usage: %s LABEL=<label>|UUID=<uuid>\n"), p);
28 int main(int argc, char **argv)
32 setlocale(LC_ALL, "");
33 bindtextdomain(PACKAGE, LOCALEDIR);
37 /* we return '2' for backward compatibility
38 * with version from e2fsprogs */
41 if (!strncmp(argv[1], "LABEL=", 6)) {
44 } else if (!strncmp(argv[1], "UUID=", 5)) {
47 } else if (!strcmp(argv[1], "-h") == 0 ||
48 !strcmp(argv[1], "--help") == 0) {
53 dev = blkid_evaluate_tag(tk, vl, NULL);
55 errx(EXIT_FAILURE, _("unable to resolve '%s'"), argv[1]);