mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fsnotifier self diagnostics
This commit is contained in:
Binary file not shown.
@@ -38,7 +38,10 @@
|
||||
"fsnotifier utilizes \"user\" facility of syslog(3) - messages usually can be found in /var/log/user.log.\n" \
|
||||
"Verbosity is regulated via " LOG_ENV " environment variable, possible values are: " \
|
||||
LOG_ENV_DEBUG ", " LOG_ENV_INFO ", " LOG_ENV_WARNING ", " LOG_ENV_ERROR ", " LOG_ENV_OFF "; latter is the default.\n\n" \
|
||||
"Use \"fsnotifier --selftest\" to perform some self-diagnostics (output will be logged and printed to console).\n"
|
||||
"Use 'fsnotifier --selftest' to perform some self-diagnostics (output will be logged and printed to console).\n"
|
||||
|
||||
#define HELP_MSG \
|
||||
"Try 'fsnotifier --help' for more information.\n"
|
||||
|
||||
#define INOTIFY_LIMIT_MSG \
|
||||
"The current <b>inotify</b>(7) watch limit of %d is too low. " \
|
||||
@@ -70,14 +73,19 @@ static void output(const char* format, ...);
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
if (argc == 2) {
|
||||
if (argc > 1) {
|
||||
if (strcmp(argv[1], "--help") == 0) {
|
||||
printf(USAGE_MSG);
|
||||
return 0;
|
||||
}
|
||||
if (strcmp(argv[1], "--selftest") == 0) {
|
||||
else if (strcmp(argv[1], "--selftest") == 0) {
|
||||
self_test = true;
|
||||
}
|
||||
else {
|
||||
printf("unrecognized option: %s\n", argv[1]);
|
||||
printf(HELP_MSG);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
init_log();
|
||||
|
||||
Reference in New Issue
Block a user