diff options
author | Alasdair Kergon <agk@redhat.com> | 2004-03-26 12:25:15 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2004-03-26 12:25:15 +0000 |
commit | 040cfcf89ca35ddf1352641ff6a5bb9f62b61ea1 (patch) | |
tree | 462f58b4595b54e2ce36c9fd6ebd4f03e89aa414 /tools | |
parent | c55d22dc0bcfc81002f88b0dcca9897b6a87733a (diff) | |
download | lvm2-040cfcf89ca35ddf1352641ff6a5bb9f62b61ea1.tar.gz |
Rename some files to avoid duplicate filenames in tree.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.in | 4 | ||||
-rw-r--r-- | tools/archiver.c (renamed from tools/archive.c) | 0 | ||||
-rw-r--r-- | tools/archiver.h | 54 | ||||
-rw-r--r-- | tools/reporter.c (renamed from tools/report.c) | 0 | ||||
-rw-r--r-- | tools/tools.h | 2 |
5 files changed, 57 insertions, 3 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in index d8f04cdf3..647efe51a 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -21,7 +21,7 @@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ SOURCES=\ - archive.c \ + archiver.c \ dumpconfig.c \ lvchange.c \ lvcreate.c \ @@ -41,7 +41,7 @@ SOURCES=\ pvmove.c \ pvremove.c \ pvscan.c \ - report.c \ + reporter.c \ toollib.c \ vgcfgbackup.c \ vgcfgrestore.c \ diff --git a/tools/archive.c b/tools/archiver.c index e11b4b6f1..e11b4b6f1 100644 --- a/tools/archive.c +++ b/tools/archiver.c diff --git a/tools/archiver.h b/tools/archiver.h new file mode 100644 index 000000000..157ae805f --- /dev/null +++ b/tools/archiver.h @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2001 Sistina Software (UK) Limited. + * + * This file is released under the GPL. + */ + +#ifndef _LVM_TOOL_ARCHIVE_H +#define _LVM_TOOL_ARCHIVE_H + +#include "metadata.h" + +/* + * FIXME: This file is going to merge with the archiving code in + * lib/format_text at some point. + */ + +/* + * There are two operations that come under the general area of + * backups. 'Archiving' occurs just before a volume group + * configuration is changed. The user may configure when + * archived files are expired. Typically archives will be stored + * in /etc/lvm/archive. + * + * A 'backup' is a redundant copy of the *current* volume group + * configuration. As such it should be taken just after the + * volume group is changed. Only 1 backup file will exist. + * Typically backups will be stored in /etc/lvm/backups. + */ + +int archive_init(const char *dir, + unsigned int keep_days, unsigned int keep_min); +void archive_exit(void); + +void archive_enable(int flag); +int archive(struct volume_group *vg); +int archive_display(struct cmd_context *cmd, const char *vg_name); + +int backup_init(const char *dir); +void backup_exit(void); + +void backup_enable(int flag); +int backup(struct volume_group *vg); +int backup_remove(const char *vg_name); + +struct volume_group *backup_read_vg(struct cmd_context *cmd, + const char *vg_name, const char *file); +int backup_restore_vg(struct cmd_context *cmd, struct volume_group *vg); +int backup_restore_from_file(struct cmd_context *cmd, const char *vg_name, + const char *file); +int backup_restore(struct cmd_context *cmd, const char *vg_name); + +int backup_to_file(const char *file, const char *desc, struct volume_group *vg); + +#endif diff --git a/tools/report.c b/tools/reporter.c index 1acb6d4ce..1acb6d4ce 100644 --- a/tools/report.c +++ b/tools/reporter.c diff --git a/tools/tools.h b/tools/tools.h index e6f69374e..d1baa1a4f 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -13,7 +13,7 @@ #include "log.h" #include "activate.h" -#include "archive.h" +#include "archiver.h" #include "lvmcache.h" #include "config.h" #include "defaults.h" |