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@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
{
/* /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;