libdasd: Fix dasd_get_host_access_count()

Since commit 75e3afb6a0 ("libdasd: Move get_host_access_count() to
libdasd") dasd_get_host_access_count() reports always 0 as the check for
unsuccessful execution of util_sys_get_dev_addr() is incorrect.
Fix the behaviour by turning the check around.

Fixes: 75e3afb6a0 ("libdasd: Move get_host_access_count() to libdasd")
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Jan Höppner
2020-10-21 20:22:01 +02:00
parent 8a58389e2f
commit 353403824b
+1 -1
View File
@@ -214,7 +214,7 @@ int dasd_get_host_access_count(char *device)
char *path;
long value;
if (!util_sys_get_dev_addr(device, busid))
if (util_sys_get_dev_addr(device, busid) != 0)
return 0;
path = util_path_sysfs("bus/ccw/devices/%s/host_access_count", busid);