1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

o Actually check in vgcfgrestore.

This commit is contained in:
Joe Thornber 2002-01-15 18:17:57 +00:00
parent f2f2634990
commit d33f2e9f5a
2 changed files with 28 additions and 1 deletions

View File

@ -1051,10 +1051,11 @@ static void fin(void)
dbg_free(cmd); dbg_free(cmd);
archive_exit(); archive_exit();
backup_exit(); backup_exit();
_exit_uuid_map();
__fin_commands(); __fin_commands();
dump_memory(); dump_memory();
fin_log(); fin_log();
_exit_uuid_map();
if (_log) if (_log)
fclose(_log); fclose(_log);

26
tools/vgcfgrestore.c Normal file
View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2001 Sistina Software (UK) Limited.
*
* This file is released under the GPL.
*/
#include "tools.h"
#include <stdio.h>
int vgcfgrestore(int argc, char **argv)
{
if (argc != 1) {
log_err("Please specify a *single* volume group to restore.");
return ECMD_FAILED;
}
if (!(arg_count(file_ARG) ?
backup_restore_from_file(argv[0], arg_str_value(file_ARG, "")) :
backup_restore(argv[0]))) {
log_err("Restore failed.");
return ECMD_FAILED;
}
return 0;
}