3 Prints or changes exFAT volume label.
5 Free exFAT implementation.
6 Copyright (C) 2011-2018 Andrew Nayenko
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License along
19 with this program; if not, write to the Free Software Foundation, Inc.,
20 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 int main(int argc, char* argv[])
33 for (pp = argv + 1; *pp; pp++)
34 if (strcmp(*pp, "-V") == 0)
36 printf("exfatlabel %s\n", VERSION);
37 puts("Copyright (C) 2011-2018 Andrew Nayenko");
41 if (argc != 2 && argc != 3)
43 fprintf(stderr, "Usage: %s [-V] <device> [label]\n", argv[0]);
49 if (exfat_mount(&ef, argv[1], "") != 0)
51 rc = (exfat_set_label(&ef, argv[2]) != 0);
55 if (exfat_mount(&ef, argv[1], "ro") != 0)
57 puts(exfat_get_label(&ef));