diff options
Diffstat (limited to '')
-rw-r--r-- | test/run_inotify.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/run_inotify.cxx b/test/run_inotify.cxx index c57e6e9ef..7d77372f0 100644 --- a/test/run_inotify.cxx +++ b/test/run_inotify.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2011 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -19,13 +19,11 @@ #include "config.h" #include "ShutdownHandler.hxx" -#include "InotifySource.hxx" +#include "db/update/InotifySource.hxx" #include "event/Loop.hxx" #include "util/Error.hxx" #include "Log.hxx" -#include <glib.h> - #include <sys/inotify.h> static constexpr unsigned IN_MASK = @@ -39,7 +37,7 @@ static void my_inotify_callback(gcc_unused int wd, unsigned mask, const char *name, gcc_unused void *ctx) { - g_print("mask=0x%x name='%s'\n", mask, name); + printf("mask=0x%x name='%s'\n", mask, name); } int main(int argc, char **argv) @@ -47,8 +45,8 @@ int main(int argc, char **argv) const char *path; if (argc != 2) { - g_printerr("Usage: run_inotify PATH\n"); - return 1; + fprintf(stderr, "Usage: run_inotify PATH\n"); + return EXIT_FAILURE; } path = argv[1]; @@ -62,17 +60,18 @@ int main(int argc, char **argv) nullptr, error); if (source == NULL) { LogError(error); - return 2; + return EXIT_FAILURE; } int descriptor = source->Add(path, IN_MASK, error); if (descriptor < 0) { delete source; LogError(error); - return 2; + return EXIT_FAILURE; } event_loop.Run(); delete source; + return EXIT_SUCCESS; } |