-/*
+/*
* Program for determining file system type
*
* Written by Preben 'Peppe' Guldberg, December MMIV
- *
+ *
* Version $Id$
- *
+ *
*/
/*
- Copyright (C) 2004 Kern Sibbald
+ Copyright (C) 2004 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
#include "bacula.h"
#include "findlib/find.h"
+/* Dummy functions */
+int generate_daemon_event(JCR *jcr, const char *event)
+ { return 1; }
+
static void usage()
{
fprintf(stderr, _(
int
main (int argc, char *const *argv)
{
- POOLMEM *fs;
+ char fs[1000];
int verbose = 0;
int status = 0;
int ch, i;
while ((ch = getopt(argc, argv, "v?")) != -1) {
switch (ch) {
case 'v':
- verbose = 1;
- break;
+ verbose = 1;
+ break;
case '?':
- default:
- usage();
+ default:
+ usage();
- }
+ }
}
argc -= optind;
argv += optind;
}
for (i = 0; i < argc; --argc, ++argv) {
- if ((fs = fstype(*argv)) != NULL) {
- if (verbose) {
+ if (fstype(*argv, fs, sizeof(fs))) {
+ if (verbose) {
printf("%s: %s\n", *argv, fs);
- } else {
- puts(fs);
- }
- free(fs);
+ } else {
+ puts(fs);
+ }
} else {
fprintf(stderr, "%s: unknown\n", *argv);
- status = 1;
+ status = 1;
}
}