Our logging function will always spew out the function name.
Signed-off-by: 0x0916 <w@laoqinren.net>
dir = opendir(dirname);
if (!dir) {
- ERROR("%s: failed to open %s", __func__, dirname);
+ ERROR("Failed to open %s", dirname);
return -1;
}
}
ret = lstat(pathname, &mystat);
if (ret) {
- SYSERROR("%s: failed to stat %s", __func__, pathname);
+ SYSERROR("Failed to stat %s", pathname);
failed=1;
if (!saved_errno)
saved_errno = errno;
}
if (rmdir(dirname) < 0) {
- SYSERROR("%s: failed to delete %s", __func__, dirname);
+ SYSERROR("Failed to delete %s", dirname);
if (!saved_errno)
saved_errno = errno;
failed=1;
ret = closedir(dir);
if (ret) {
- SYSERROR("%s: failed to close directory %s", __func__, dirname);
+ SYSERROR("Failed to close directory %s", dirname);
if (!saved_errno)
saved_errno = errno;
failed=1;
return ret;
}
/* Callers don't do this, but regression/sanity check */
- ERROR("%s: was not expecting 0 bufsize", __func__);
+ ERROR("was not expecting 0 bufsize");
return -1;
}
buf[ret] = '\0';
goto out;
}
if (send_creds(sv[0], getpid(), getuid(), getgid())) {
- SYSERROR("%s: Error sending pid over SCM_CREDENTIAL", __func__);
+ SYSERROR("Error sending pid over SCM_CREDENTIAL");
goto out;
}
fds.fd = sv[0];
goto out;
}
if (send_creds(sv[0], getpid(), newuid, 0)) {
- SYSERROR("%s: Error sending pid over SCM_CREDENTIAL", __func__);
+ SYSERROR("Error sending pid over SCM_CREDENTIAL");
goto out;
}
fds.fd = sv[0];
if (rootuid == geteuid()) {
// nothing to do
- INFO("%s: container root is our uid; no need to chown" ,__func__);
+ INFO("Container root is our uid; no need to chown");
return 0;
}
dir = opendir(dirname);
if (!dir) {
- ERROR("%s: failed to open %s", __func__, dirname);
+ ERROR("failed to open %s", dirname);
return -1;
}
ret = lstat(pathname, &mystat);
if (ret) {
- ERROR("%s: failed to stat %s", __func__, pathname);
+ ERROR("Failed to stat %s", pathname);
failed = 1;
continue;
}
failed=1;
} else {
if (unlink(pathname) < 0) {
- SYSERROR("%s: failed to delete %s", __func__, pathname);
+ SYSERROR("Failed to delete %s", pathname);
failed=1;
}
}
}
if (rmdir(dirname) < 0 && !btrfs_try_remove_subvol(dirname)) {
- ERROR("%s: failed to delete %s", __func__, dirname);
+ ERROR("Failed to delete %s", dirname);
failed=1;
}
ret = closedir(dir);
if (ret) {
- ERROR("%s: failed to close directory %s", __func__, dirname);
+ ERROR("Failed to close directory %s", dirname);
failed=1;
}
if (lstat(path, &mystat) < 0) {
if (errno == ENOENT)
return 0;
- ERROR("%s: failed to stat %s", __func__, path);
+ ERROR("Failed to stat %s", path);
return -1;
}