The function returns the actual error itself, identically to the signed
variant - read_str_long(). Unlike the signed variant, one of ulong's
users incorrectly uses %m instead of strerror(-err).
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/368
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
err = read_str_ulong(fd, &address, 16);
close(fd);
if (err < 0) {
- ERR(mod->ctx, "could not read long from '%s/%s': %m\n", dname,
- dent->d_name);
+ ERR(mod->ctx, "could not read long from '%s/%s': %s\n", dname,
+ dent->d_name, strerror(-err));
goto fail;
}