2 * Program for determining file system type
4 * Written by Preben 'Peppe' Guldberg, December MMIV
11 Copyright (C) 2004 Kern Sibbald
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation; either version 2 of
16 the License, or (at your option) any later version.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
23 You should have received a copy of the GNU General Public
24 License along with this program; if not, write to the Free
25 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
31 #include "findlib/find.h"
34 int generate_daemon_event(JCR *jcr, const char *event)
41 "Usage: fstype [-d debug_level] path ...\n"
43 " Print the file system type a given file/directory is on.\n"
44 " The following options are supported:\n"
46 " -v print both path and file system type.\n"
47 " -? print this message.\n"
55 main (int argc, char *const *argv)
62 while ((ch = getopt(argc, argv, "v?")) != -1) {
80 for (i = 0; i < argc; --argc, ++argv) {
81 if (fstype(*argv, fs, sizeof(fs))) {
83 printf("%s: %s\n", *argv, fs);
88 fprintf(stderr, "%s: unknown\n", *argv);