#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;
- case '?':
- default:
- usage();
+ case 'v':
+ verbose = 1;
+ break;
+ case '?':
+ default:
+ usage();
}
}
}
for (i = 0; i < argc; --argc, ++argv) {
- if ((fs = fstype(*argv)) != NULL) {
- if (verbose) {
- printf("%s: %s\n", *argv, fs);
- } else {
- puts(fs);
- }
- free(fs);
+ if (fstype(*argv, fs, sizeof(fs))) {
+ if (verbose) {
+ printf("%s: %s\n", *argv, fs);
+ } else {
+ puts(fs);
+ }
} else {
- fprintf(stderr, "%s: unknown\n", *argv);
- status = 1;
+ fprintf(stderr, "%s: unknown\n", *argv);
+ status = 1;
}
}