When device id string contains white space, parse is not correct.
This patch fix it
Signed-off-by: Wenchao Xia <xiawenc(a)linux.vnet.ibm.com>
---
libxkutil/device_parsing.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
index 5393290..ceb4552 100644
--- a/libxkutil/device_parsing.c
+++ b/libxkutil/device_parsing.c
@@ -1033,7 +1033,7 @@ int parse_fq_devid(const char *devid, char **host, char **device)
{
int ret;
- ret = sscanf(devid, "%a[^/]/%as", host, device);
+ ret = sscanf(devid, "%a[^/]/%a[^\n]", host, device);
if (ret != 2) {
free(*host);
free(*device);
--
1.7.1