errx(EXIT_FAILURE, "<file> not defined");
file = argv[optind++];
- if (ul_path_read_string(pc, &res, file) != 0)
- err(EXIT_FAILURE, "read u64 failed");
+ if (ul_path_read_string(pc, &res, file) < 0)
+ err(EXIT_FAILURE, "read string failed");
printf("read: %s: %s\n", file, res);
- if (ul_path_readf_string(pc, &res, "%s", file) != 0)
- err(EXIT_FAILURE, "readf u64 failed");
+ if (ul_path_readf_string(pc, &res, "%s", file) < 0)
+ err(EXIT_FAILURE, "readf string failed");
printf("readf: %s: %s\n", file, res);
} else if (strcmp(command, "read-link") == 0) {
/* The DM_UUID prefix should be set to subsystem owning
* the device - LVM, CRYPT, DMRAID, MPATH, PART */
- if (ul_path_read_string(cxt->sysfs, &dm_uuid, "dm/uuid") == 0
+ if (ul_path_read_string(cxt->sysfs, &dm_uuid, "dm/uuid") > 0
&& dm_uuid) {
char *tmp = dm_uuid;
char *dm_uuid_prefix = strsep(&tmp, "-");