mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libdasd: Fix dasd_get_host_access_count()
Since commit75e3afb6a0("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:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user