- Handle the case when the target file exists correctly in hv_fcopy_daemon

- vssdaemon: Ignore VFAT mounts during the Freeze operation

OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=91
This commit is contained in:
Olaf Hering 2014-04-10 17:21:32 +00:00 committed by Git OBS Bridge
parent 20a13b1bdf
commit 8476439df4
4 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Apr 10 19:19:04 CEST 2014 - ohering@suse.de
- Handle the case when the target file exists correctly in hv_fcopy_daemon
- vssdaemon: Ignore VFAT mounts during the Freeze operation
-------------------------------------------------------------------
Sun Mar 2 18:11:31 CET 2014 - ohering@suse.de

View File

@ -300,6 +300,7 @@ enum hv_kvp_exchg_pool {
#define HV_ERROR_DEVICE_NOT_CONNECTED 0x8007048F
#define HV_INVALIDARG 0x80070057
#define HV_GUID_NOTFOUND 0x80041002
#define HV_ERROR_ALREADY_EXISTS 0x80070050
#define ADDR_FAMILY_NONE 0x00
#define ADDR_FAMILY_IPV4 0x01

View File

@ -82,8 +82,10 @@ static int hv_start_fcopy(struct hv_start_fcopy *smsg)
if (!access(target_fname, F_OK)) {
syslog(LOG_INFO, "File: %s exists", target_fname);
if (!smsg->copy_flags & OVER_WRITE)
if (!(smsg->copy_flags & OVER_WRITE)) {
error = HV_ERROR_ALREADY_EXISTS;
goto done;
}
}
target_fd = open(target_fname, O_RDWR | O_CREAT | O_CLOEXEC, 0744);

View File

@ -88,6 +88,8 @@ static int vss_operate(int operation)
continue;
if (strcmp(ent->mnt_type, "iso9660") == 0)
continue;
if (strcmp(ent->mnt_type, "vfat") == 0)
continue;
if (strcmp(ent->mnt_dir, "/") == 0) {
root_seen = 1;
continue;