2 * Program for determining drive type
4 * Written by Robert Nelson, June 2006
10 Copyright (C) 2006 Kern Sibbald
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License
14 version 2 as amended with additional clauses defined in the
15 file LICENSE in the main source directory.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 file LICENSE for additional details.
25 #include "findlib/find.h"
28 int generate_daemon_event(JCR *jcr, const char *event)
35 "Usage: drivetype [-v] path ...\n"
37 " Print the drive type a given file/directory is on.\n"
38 " The following options are supported:\n"
40 " -v print both path and file system type.\n"
41 " -? print this message.\n"
49 main (int argc, char *const *argv)
56 setlocale(LC_ALL, "");
57 bindtextdomain("bacula", LOCALEDIR);
60 while ((ch = getopt(argc, argv, "v?")) != -1) {
80 for (i = 0; i < argc; --argc, ++argv) {
81 if (drivetype(*argv, dt, sizeof(dt))) {
83 printf("%s: %s\n", *argv, dt);
88 fprintf(stderr, _("%s: unknown\n"), *argv);