]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
remove the `__func__` macro
author0x0916 <w@laoqinren.net>
Mon, 26 Jun 2017 09:55:12 +0000 (17:55 +0800)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 15 Aug 2017 22:56:17 +0000 (18:56 -0400)
Our logging function will always spew out the function name.

Signed-off-by: 0x0916 <w@laoqinren.net>
src/lxc/cgfs.c
src/lxc/cgmanager.c
src/lxc/conf.c
src/lxc/utils.c

index a6d7300ed3522c72a1f22adae5ff204b1da245f6..18d5151df265486d0e373a8762fc47115140f175 100644 (file)
@@ -163,7 +163,7 @@ static int cgroup_rmdir(char *dirname)
 
        dir = opendir(dirname);
        if (!dir) {
-               ERROR("%s: failed to open %s", __func__, dirname);
+               ERROR("Failed to open %s", dirname);
                return -1;
        }
 
@@ -188,7 +188,7 @@ static int cgroup_rmdir(char *dirname)
                }
                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;
@@ -204,7 +204,7 @@ static int cgroup_rmdir(char *dirname)
        }
 
        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;
@@ -212,7 +212,7 @@ static int cgroup_rmdir(char *dirname)
 
        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;
@@ -2204,7 +2204,7 @@ static int cgroup_read_from_file(const char *fn, char buf[], size_t bufsize)
                        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';
index 9f8eaf867af287f7bd5cfe00a8d01977a262d25e..6464ae5242d267ae0a6b3e27a3b5ecfd3c3165cb 100644 (file)
@@ -384,7 +384,7 @@ static int do_chown_cgroup(const char *controller, const char *cgroup_path,
                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];
@@ -399,7 +399,7 @@ static int do_chown_cgroup(const char *controller, const char *cgroup_path,
                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];
index eb43f270b6bd2f4e00bf15865dc4b2cd00c16076..67ef58b213acfe9d5a5cda4f6d384c7985c5f918 100644 (file)
@@ -3913,7 +3913,7 @@ int chown_mapped_root(char *path, struct lxc_conf *conf)
 
        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;
        }
 
index 5a179ae05795321f0477da24e2eb5712ac373268..620f0525636f4a820ed34d200d5c75bd34011429 100644 (file)
@@ -69,7 +69,7 @@ static int _recursive_rmdir(char *dirname, dev_t pdev, bool onedev)
 
        dir = opendir(dirname);
        if (!dir) {
-               ERROR("%s: failed to open %s", __func__, dirname);
+               ERROR("failed to open %s", dirname);
                return -1;
        }
 
@@ -93,7 +93,7 @@ static int _recursive_rmdir(char *dirname, dev_t pdev, bool onedev)
 
                ret = lstat(pathname, &mystat);
                if (ret) {
-                       ERROR("%s: failed to stat %s", __func__, pathname);
+                       ERROR("Failed to stat %s", pathname);
                        failed = 1;
                        continue;
                }
@@ -109,20 +109,20 @@ static int _recursive_rmdir(char *dirname, dev_t pdev, bool onedev)
                                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;
        }
 
@@ -161,7 +161,7 @@ extern int lxc_rmdir_onedev(char *path)
        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;
        }