diff options
author | Alasdair Kergon <agk@redhat.com> | 2002-01-08 19:17:08 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2002-01-08 19:17:08 +0000 |
commit | 83912faa1d452d2309a2cda38338fc995804d463 (patch) | |
tree | 1751d52392381e7b2803a71339f404c4a007e22d /tools/lvm.c | |
parent | 8deaf0d253c585d5cc6bf2a8a808ff6dac3cd328 (diff) | |
download | lvm2-83912faa1d452d2309a2cda38338fc995804d463.tar.gz lvm2-83912faa1d452d2309a2cda38338fc995804d463.tar.xz lvm2-83912faa1d452d2309a2cda38338fc995804d463.zip |
Another attempt to support both readline versions.
Diffstat (limited to 'tools/lvm.c')
-rw-r--r-- | tools/lvm.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/lvm.c b/tools/lvm.c index e42cd9e0..c2102738 100644 --- a/tools/lvm.c +++ b/tools/lvm.c @@ -8,6 +8,8 @@ #include "archive.h" #include "defaults.h" +#include "stub.h" + #include <assert.h> #include <getopt.h> #include <signal.h> @@ -17,15 +19,12 @@ #include <ctype.h> #include <time.h> -#include "stub.h" - #ifdef READLINE_SUPPORT -#include <readline/readline.h> -#include <readline/history.h> -#define MAX_HISTORY 100 -#ifndef rl_completion_matches -#define rl_completion_matches(a, b) completion_matches((char *)a, b) -#endif + #include <readline/readline.h> + #include <readline/history.h> + #ifndef HAVE_RL_COMPLETION_MATCHES + #define rl_completion_matches(a, b) completion_matches((char *)a, b) + #endif #endif /* define exported table of valid switches */ @@ -694,7 +693,7 @@ static int _init_backup(struct config_file *cf) /* set up archiving */ _default_settings.archive = find_config_bool(cmd->cf->root, "backup/archive", '/', - DEFAULT_ARCHIVE_FLAG); + DEFAULT_ARCHIVE_ENABLED); days = find_config_int(cmd->cf->root, "backup/retain_days", '/', DEFAULT_ARCHIVE_DAYS); @@ -720,7 +719,7 @@ static int _init_backup(struct config_file *cf) /* set up the backup */ _default_settings.backup = find_config_bool(cmd->cf->root, "backup/backup", '/', - DEFAULT_BACKUP_FLAG); + DEFAULT_BACKUP_ENABLED); if (lvm_snprintf(default_dir, sizeof(default_dir), "%s/%s", _sys_dir, DEFAULT_BACKUP_SUBDIR) == -1) { @@ -1155,7 +1154,7 @@ static void _read_history(void) log_very_verbose("Couldn't read history from %s.", hist_file); stifle_history(find_config_int(cmd->cf->root, "shell/history_size", - '/', MAX_HISTORY)); + '/', DEFAULT_MAX_HISTORY)); } |