From: Martin Mares Date: Sun, 23 Dec 2007 21:08:47 +0000 (+0100) Subject: If no config file is specified, pretend loading an empty configuration X-Git-Tag: holmes-import~476^2~5 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=f39ec2e7c8ccdbe0a48037ae5fe5f6f90b374db4;p=libucw.git If no config file is specified, pretend loading an empty configuration (i.e., create an empty transaction and commit it immediately). Otherwise, programs with NULL cf_def_file crash when given `-S'. --- diff --git a/lib/conf-input.c b/lib/conf-input.c index b890295d..c5d25277 100644 --- a/lib/conf-input.c +++ b/lib/conf-input.c @@ -395,6 +395,11 @@ load_default(void) else if (cf_load(cf_def_file)) die("Cannot load default config %s", cf_def_file); } + else + { + // We need to create an empty pool + cf_journal_commit_transaction(1, cf_journal_new_transaction(1)); + } } static void