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

Fix vgcfgbackup to properly check filename if template is used.

This commit is contained in:
Milan Broz 2008-08-13 12:44:24 +00:00
parent a3925393ba
commit 8df4c3748a
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.40 -
================================
Fix vgcfgbackup to properly check filename if template is used.
configure aborts if lcov or genhtml are missing with --enable-profiling
vgremove tries to remove lv snapshot first.
Added function lv_remove_with_dependencies().

View File

@ -34,8 +34,7 @@ static char *_expand_filename(const char *template, const char *vg_name,
dm_free(filename);
return NULL;
}
if (*last_filename && !strncmp(*last_filename, filename,
strlen(template))) {
if (*last_filename && !strncmp(*last_filename, filename, PATH_MAX)) {
log_error("VGs must be backed up into different files. "
"Use %%s in filename for VG name.");
dm_free(filename);
@ -70,7 +69,8 @@ static int vg_backup_single(struct cmd_context *cmd, const char *vg_name,
return ECMD_FAILED;
}
backup_to_file(filename, vg->cmd->cmd_line, vg);
if (!backup_to_file(filename, vg->cmd->cmd_line, vg))
return ECMD_FAILED;
} else {
if (!consistent) {
log_error("No backup taken: specify filename with -f "