summaryrefslogtreecommitdiff
path: root/hw/s390x/s390-ccw.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/s390x/s390-ccw.c')
-rw-r--r--hw/s390x/s390-ccw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c
index 7fc1c603c0..214c940593 100644
--- a/hw/s390x/s390-ccw.c
+++ b/hw/s390x/s390-ccw.c
@@ -48,7 +48,7 @@ static void s390_ccw_get_dev_info(S390CCWDevice *cdev,
return;
}
- cdev->mdevid = g_strdup(basename(dev_path));
+ cdev->mdevid = g_path_get_basename(dev_path);
tmp = basename(dirname(dev_path));
if (sscanf(tmp, "%2x.%1x.%4x", &cssid, &ssid, &devid) != 3) {