X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fdird%2Fdird_conf.c;h=bebf9c27adfa92ba3b4b7ecc88e6199e7ac1ea08;hb=3cd7f14201e385fe8025a58a07dd151bb27c13e3;hp=3397cbaebf220618c10f36a2ad9aba53cc4d891a;hpb=07b9d71e8f373d73eed7ddf7d882014df5349bb4;p=bacula%2Fbacula diff --git a/bacula/src/dird/dird_conf.c b/bacula/src/dird/dird_conf.c index 3397cbaebf..bebf9c27ad 100644 --- a/bacula/src/dird/dird_conf.c +++ b/bacula/src/dird/dird_conf.c @@ -22,7 +22,7 @@ * Version $Id$ */ /* - Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker + Copyright (C) 2000-2003 Kern Sibbald and John Walker This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -294,7 +294,6 @@ struct s_jl joblevels[] = { {"Full", L_FULL, JT_BACKUP}, {"Incremental", L_INCREMENTAL, JT_BACKUP}, {"Differential", L_DIFFERENTIAL, JT_BACKUP}, - {"Level", L_LEVEL, JT_BACKUP}, {"Since", L_SINCE, JT_BACKUP}, {"Catalog", L_VERIFY_CATALOG, JT_VERIFY}, {"Initcatalog", L_VERIFY_INIT, JT_VERIFY}, @@ -357,6 +356,7 @@ struct s_kw ReplaceOptions[] = { #define INC_KW_RECURSE 6 #define INC_KW_SPARSE 7 #define INC_KW_REPLACE 8 /* restore options */ +#define INC_KW_READFIFO 9 /* Causes fifo data to be read */ /* Include keywords */ static struct s_kw FS_option_kw[] = { @@ -368,6 +368,7 @@ static struct s_kw FS_option_kw[] = { {"recurse", INC_KW_RECURSE}, {"sparse", INC_KW_SPARSE}, {"replace", INC_KW_REPLACE}, + {"readfifo", INC_KW_READFIFO}, {NULL, 0} }; @@ -403,6 +404,8 @@ static struct s_fs_opt FS_options[] = { {"always", INC_KW_REPLACE, "a"}, {"ifnewer", INC_KW_REPLACE, "w"}, {"never", INC_KW_REPLACE, "n"}, + {"yes", INC_KW_READFIFO, "r"}, + {"no", INC_KW_READFIFO, "0"}, {NULL, 0, 0} }; @@ -543,7 +546,7 @@ next_run: strcpy(buf, " hour="); for (i=0; i<24; i++) { if (bit_is_set(i, run->hour)) { - sprintf(num, "%d ", i+1); + sprintf(num, "%d ", i); strcat(buf, num); } } @@ -576,6 +579,15 @@ next_run: } strcat(buf, "\n"); sendit(sock, buf); + strcpy(buf, " wpos="); + for (i=0; i<5; i++) { + if (bit_is_set(i, run->wpos)) { + sprintf(num, "%d ", i+1); + strcat(buf, num); + } + } + strcat(buf, "\n"); + sendit(sock, buf); sendit(sock, " mins=%d\n", run->minute); if (run->pool) { sendit(sock, " --> "); @@ -1227,7 +1239,7 @@ static void scan_include_options(LEX *lc, int keyword, char *opts, int optlen) char option[3]; option[0] = 0; /* default option = none */ - opts[0] = option[2] = 0; /* terminate options */ + option[2] = 0; /* terminate options */ token = lex_get_token(lc, T_NAME); /* expect at least one option */ if (keyword == INC_KW_VERIFY) { /* special case */ /* ***FIXME**** ensure these are in permitted set */ @@ -1246,8 +1258,10 @@ static void scan_include_options(LEX *lc, int keyword, char *opts, int optlen) } if (i != 0) { scan_err1(lc, "Expected a FileSet option keyword, got:%s:", lc->str); + } else { /* add option */ + bstrncat(opts, option, optlen); + Dmsg3(200, "Catopts=%s option=%s optlen=%d\n", opts, option,optlen); } - bstrncat(opts, option, optlen); } /* If option terminated by comma, eat it */ @@ -1270,7 +1284,7 @@ static void store_inc(LEX *lc, struct res_items *item, int index, int pass) lc->options |= LOPT_NO_IDENT; /* make spaces significant */ /* Get include options */ - strcpy(inc_opts, "0"); /* set no options */ + inc_opts[0] = 0; while ((token=lex_get_token(lc, T_ALL)) != T_BOB) { keyword = INC_KW_NONE; for (i=0; FS_option_kw[i].name; i++) { @@ -1291,10 +1305,13 @@ static void store_inc(LEX *lc, struct res_items *item, int index, int pass) break; } } - strcat(inc_opts, " "); /* add field separator */ + if (!inc_opts[0]) { + strcat(inc_opts, "0 "); /* set no options */ + } else { + strcat(inc_opts, " "); /* add field separator */ + } inc_opts_len = strlen(inc_opts); - if (pass == 1) { if (!res_all.res_fs.have_MD5) { MD5Init(&res_all.res_fs.md5c);