[libvirt] [PATCH] parallels: use SDK disks system names for paths

For block devices SDK friendly name do not refer to block device path but rather some description while system name refer to device path. For ploop devices both names refer to image path. Thus system name is better choice. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@parallels.com> --- src/parallels/parallels_sdk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index 80e9d00..4911ab7 100644 --- a/src/parallels/parallels_sdk.c +++ b/src/parallels/parallels_sdk.c @@ -491,7 +491,7 @@ prlsdkGetDiskInfo(PRL_HANDLE prldisk, if (VIR_ALLOC_N(buf, buflen) < 0) goto cleanup; - pret = PrlVmDev_GetFriendlyName(prldisk, buf, &buflen); + pret = PrlVmDev_GetSysName(prldisk, buf, &buflen); prlsdkCheckRetGoto(pret, cleanup); if (virDomainDiskSetSource(disk, buf) < 0) -- 1.7.1

20.04.2015 9:26, Nikolay Shirokovskiy пишет:
For block devices SDK friendly name do not refer to block device path but rather some description while system name refer to device path.
For ploop devices both names refer to image path.
Thus system name is better choice.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@parallels.com> --- src/parallels/parallels_sdk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index 80e9d00..4911ab7 100644 --- a/src/parallels/parallels_sdk.c +++ b/src/parallels/parallels_sdk.c @@ -491,7 +491,7 @@ prlsdkGetDiskInfo(PRL_HANDLE prldisk, if (VIR_ALLOC_N(buf, buflen) < 0) goto cleanup;
- pret = PrlVmDev_GetFriendlyName(prldisk, buf, &buflen); + pret = PrlVmDev_GetSysName(prldisk, buf, &buflen); The only problem with this is that buflen is calculated by PrlVmDev_GetFriendlyName still a few lines above. prlsdkCheckRetGoto(pret, cleanup);
if (virDomainDiskSetSource(disk, buf) < 0)
participants (2)
-
Maxim Nestratov
-
Nikolay Shirokovskiy