]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/utils.c
storage: constify where possible
[mirror_lxc.git] / src / lxc / utils.c
index 19e6c2ee6ef923228e5b22b5ba030519807cce6c..dd8e40d53de171ed8ba50f627ceeb0b50bdb78d1 100644 (file)
@@ -65,7 +65,7 @@ lxc_log_define(lxc_utils, lxc);
  */
 extern bool btrfs_try_remove_subvol(const char *path);
 
-static int _recursive_rmdir(char *dirname, dev_t pdev,
+static int _recursive_rmdir(const char *dirname, dev_t pdev,
                            const char *exclude, int level, bool onedev)
 {
        struct dirent *direntp;
@@ -180,18 +180,18 @@ static bool is_native_overlayfs(const char *path)
 }
 
 /* returns 0 on success, -1 if there were any failures */
-extern int lxc_rmdir_onedev(char *path, const char *exclude)
+extern int lxc_rmdir_onedev(const char *path, const char *exclude)
 {
        struct stat mystat;
        bool onedev = true;
 
-       if (is_native_overlayfs(path)) {
+       if (is_native_overlayfs(path))
                onedev = false;
-       }
 
        if (lstat(path, &mystat) < 0) {
                if (errno == ENOENT)
                        return 0;
+
                ERROR("Failed to stat %s", path);
                return -1;
        }