[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: fix parse_backend_path and device_backend_path to be mutual
# HG changeset patch # User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> # Date 1327599485 0 # Node ID c9abfdcae28d1924666e0bef44e62ce61100e8e8 # Parent dba361080715baf5ec2c493190bb69ba04cc633c libxl: fix parse_backend_path and device_backend_path to be mutual Currently if libxl__parse_backend_path is used and then you try to get the original path again with libxl__device_backend_path the result is wrong. This patch fixes the issue, so transformation from path to libxl__device and back is reciprocal. Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- diff -r dba361080715 -r c9abfdcae28d tools/libxl/libxl_device.c --- a/tools/libxl/libxl_device.c Thu Jan 26 15:42:40 2012 +0000 +++ b/tools/libxl/libxl_device.c Thu Jan 26 17:38:05 2012 +0000 @@ -46,12 +46,11 @@ { /* /local/domain/<domid>/backend/<kind>/<domid>/<devid> */ char strkind[16]; /* Longest is actually "console" */ - uint32_t domain; - int rc = sscanf(path, "/local/domain/%d/backend/%15[^/]/%d/%d", + int rc = sscanf(path, "/local/domain/%d/backend/%15[^/]/%u/%d", &dev->backend_domid, strkind, - &domain, - &dev->backend_devid); + &dev->domid, + &dev->devid); if (rc != 4) return ERROR_FAIL; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |