2 * Program for determining file system type
4 * Written by Preben 'Peppe' Guldberg, December MMIV
10 Bacula® - The Network Backup Solution
12 Copyright (C) 2004-2014 Free Software Foundation Europe e.V.
14 The main author of Bacula is Kern Sibbald, with contributions from many
15 others, a complete list can be found in the file AUTHORS.
17 You may use this file and others of this release according to the
18 license defined in the LICENSE file, which includes the Affero General
19 Public License, v3.0 ("AGPLv3") and some additional permissions and
20 terms pursuant to its AGPLv3 Section 7.
22 Bacula® is a registered trademark of Kern Sibbald.
26 #include "findlib/find.h"
27 #include "lib/mntent_cache.h"
30 int generate_daemon_event(JCR *jcr, const char *event)
37 "Usage: fstype [-v] path ...\n"
39 " Print the file system type a given file/directory is on.\n"
40 " The following options are supported:\n"
42 " -v print both path and file system type.\n"
43 " -? print this message.\n"
51 main (int argc, char *const *argv)
58 setlocale(LC_ALL, "");
59 bindtextdomain("bacula", LOCALEDIR);
62 while ((ch = getopt(argc, argv, "v?")) != -1) {
82 for (i = 0; i < argc; --argc, ++argv) {
83 if (fstype(*argv, fs, sizeof(fs))) {
85 printf("%s: %s\n", *argv, fs);
90 fprintf(stderr, _("%s: unknown\n"), *argv);