aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-08-22 21:35:59 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-08-22 21:35:59 +0000
commit7c856b66bb161761c8e9ff5b9a71756a2c411f4b (patch)
tree5d97b6d72a8339555f2a9dd48a1d34c36a0a071b /src/config.c
parent20e08ebe561d4ac2d1e9e26fcf74162b93f8555e (diff)
downloadwydawca-7c856b66bb161761c8e9ff5b9a71756a2c411f4b.tar.gz
wydawca-7c856b66bb161761c8e9ff5b9a71756a2c411f4b.tar.bz2
Normalize use of sendfile(2).
* src/wydawca.c (enable_sendfile): New global. * src/wydawca.h: Likewise. * src/config.c (enable-sendfile): New statement. * src/diskio.c (copy_file): Use enable_sendfile to decide whether to use sendfile. * doc/wydawca.texi: Document enable-sendfile. git-svn-id: file:///svnroot/wydawca/trunk@324 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 4203bbb..9f6e401 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1087,7 +1087,17 @@ cfg_notify_event (gsc_config_file_t *file, char *kw, char *val, void *unused)
argcv_free (argc, argv);
}
-
+static void
+cfg_enable_sendfile (gsc_config_file_t *file, char *kw, char *val,
+ void *unused)
+{
+ if (get_bool (val, &enable_sendfile))
+ {
+ file->error_msg (file->file_name, file->line,
+ "boolean value expected, but found `%s'", val);
+ file->error_count++;
+ }
+}
static struct gsc_config_keyword kw_handler[] = {
@@ -1112,6 +1122,7 @@ static struct gsc_config_keyword kw_handler[] = {
{ "mail-admin-stat", cfg_mail_admin_stat },
{ "define-message", cfg_define_message },
{ "notify-event", cfg_notify_event },
+ { "enable-sendfile", cfg_enable_sendfile },
{ NULL }
};

Return to:

Send suggestions and report system problems to the System administrator.