summaryrefslogtreecommitdiffabout
path: root/src/stat.c
authorSergey Poznyakoff <gray@gnu.org.ua>2009-04-21 13:04:01 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-04-21 13:09:41 (GMT)
commiteb0b1eef83ca77da145264c81631299ffc4cc574 (patch) (side-by-side diff)
tree60d62365877e47a6d80e15ef4b42430171b34e62 /src/stat.c
parentdbc2333c048514d0bbdade8a680c3933c7dc79a4 (diff)
downloadtagr-eb0b1eef83ca77da145264c81631299ffc4cc574.tar.gz
tagr-eb0b1eef83ca77da145264c81631299ffc4cc574.tar.bz2
Use "grecs" submodule for configuration parsing.
* Makefile.am (ACLOCAL_AMFLAGS): Add -I grecs/am. (SUBDIRS): grecs (ChangeLog): New rule. * ChangeLog: Rename to ChangeLog.svn * doc: Rename to etc. * etc/upgrade.awk: New file. * bootstrap.conf: Initialize "grecs". * configure.ac: Call GRECS_SETUP. (AC_CONFIG_FILES): Add grecs/Makefile and grecs/src/Makefile. * gnulib.modules: Add gitlog-to-changelog and sysexits. * src/Makefile.am (LDADD, INCLUDES): Add grecs. (AM_CPPFLAGS): Define additional variables. * src/log.c (use_stderr): Remove. Use log_to_stderr instead. (grecs_print_diag): New function. * src/main.c: Redo command-line support. (listen_sockaddr): New global. * src/readconfig.c: Rewrite. * src/tagr.h: Include sysexits.h and grecs.h (listen_sockaddr, log_to_stderr, pidfile): New externs. * src/main.c, src/stat.c, src/report.c: Use sysexits codes.
Diffstat (limited to 'src/stat.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/stat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/stat.c b/src/stat.c
index 2751873..4c1d434 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -1,5 +1,5 @@
/* This file is part of tagr.
- Copyright (C) 2005, Sergey Poznyakoff
+ Copyright (C) 2005, 2009 Sergey Poznyakoff
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -370,7 +370,7 @@ import (const char *dirname)
verbose (2, "Examining `%s'", dirname);
if (stat (dirname, &st))
- die (3, "cannot stat file `%s': %s", dirname, strerror (errno));
+ die (EX_OSERR, "cannot stat file `%s': %s", dirname, strerror (errno));
else if (S_ISREG (st.st_mode))
{
open_db ();
@@ -401,16 +401,16 @@ import (const char *dirname)
break;
case GLOB_NOSPACE:
- die (3, "cannot scan directory: %s", strerror (ENOMEM));
+ die (EX_UNAVAILABLE, "cannot scan directory: %s", strerror (ENOMEM));
case GLOB_ABORTED:
- die (3, "scanning aborted");
+ die (EX_UNAVAILABLE, "scanning aborted");
case GLOB_NOMATCH:
break;
default:
- die (3, "cannot scan directory `%s'", dirname);
+ die (EX_UNAVAILABLE, "cannot scan directory `%s'", dirname);
}
}

Return to:

Send suggestions and report system problems to the System administrator.