err = stat(abspath, &st);
if (err < 0) {
err = -errno;
- DBG(ctx, "stat %s: %s\n", path, strerror(errno));
+ DBG(ctx, "stat %s: %m\n", path);
free(abspath);
return err;
}
stripped = kmod_elf_strip(elf, flags);
if (stripped == NULL) {
- ERR(mod->ctx, "Failed to strip version information: %s\n",
- strerror(errno));
+ ERR(mod->ctx, "Failed to strip version information: %m\n");
return -errno;
}
mem = stripped;
fp = fopen("/proc/modules", "re");
if (fp == NULL) {
int err = -errno;
- ERR(ctx, "could not open /proc/modules: %s\n", strerror(errno));
+ ERR(ctx, "could not open /proc/modules: %m\n");
return err;
}
fd = open(path, O_RDONLY | O_CLOEXEC);
if (fd < 0) {
err = -errno;
- DBG(mod->ctx, "could not open '%s': %s\n", path, strerror(-err));
+ DBG(mod->ctx, "could not open '%s': %m\n", path);
if (pathlen > (int)sizeof("/initstate") - 1) {
struct stat st;
return KMOD_MODULE_COMING;
err = -errno;
- DBG(mod->ctx, "could not open '%s': %s\n", path, strerror(-err));
+ DBG(mod->ctx, "could not open '%s': %m\n", path);
}
return err;
}
fp = fopen("/proc/modules", "re");
if (fp == NULL) {
int err = -errno;
- ERR(mod->ctx, "could not open /proc/modules: %s\n", strerror(errno));
+ ERR(mod->ctx, "could not open /proc/modules: %m\n");
close(dfd);
return err;
}
fd = open(path, O_RDONLY | O_CLOEXEC);
if (fd < 0) {
err = -errno;
- DBG(mod->ctx, "could not open '%s': %s\n", path, strerror(errno));
+ DBG(mod->ctx, "could not open '%s': %m\n", path);
return err;
}
d = opendir(dname);
if (d == NULL) {
- ERR(mod->ctx, "could not open '%s': %s\n", dname, strerror(errno));
+ ERR(mod->ctx, "could not open '%s': %m\n", dname);
return NULL;
}
d = opendir(dname);
if (d == NULL) {
- ERR(mod->ctx, "could not open '%s': %s\n", dname, strerror(errno));
+ ERR(mod->ctx, "could not open '%s': %m\n", dname);
return NULL;
}