diff = (uintmax_t)now - dev->bid_time;
if (stat(dev->bid_name, &st) < 0) {
- DBG(PROBE, ul_debug("blkid_verify: error %s (%d) while "
- "trying to stat %s", strerror(errno), errno,
+ DBG(PROBE, ul_debug("blkid_verify: error %m (%d) while "
+ "trying to stat %s", errno,
dev->bid_name));
open_err:
if ((errno == EPERM) || (errno == EACCES) || (errno == ENOENT)) {
fd = open(dev->bid_name, O_RDONLY|O_CLOEXEC|O_NONBLOCK);
if (fd < 0) {
- DBG(PROBE, ul_debug("blkid_verify: error %s (%d) while "
- "opening %s", strerror(errno), errno,
+ DBG(PROBE, ul_debug("blkid_verify: error %m (%d) while "
+ "opening %s", errno,
dev->bid_name));
goto open_err;
}
ll_fp = fopen(lastlog_file, "r");
if (ll_fp == NULL) {
- if (error && asprintf(error, "Failed to open '%s': %s",
- lastlog_file, strerror(errno)) < 0)
+ if (error && asprintf(error, "Failed to open '%s': %m",
+ lastlog_file) < 0)
return -ENOMEM;
return -1;
if (fstat(fileno(ll_fp), &statll) != 0) {
retval = -1;
- if (error && asprintf(error, "Cannot get size of '%s': %s",
- lastlog_file, strerror(errno)) < 0)
+ if (error && asprintf(error, "Cannot get size of '%s': %m",
+ lastlog_file) < 0)
retval = -ENOMEM;
goto done;