]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
remove some debug output
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 15 Dec 2014 23:55:53 +0000 (17:55 -0600)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 15 Dec 2014 23:55:53 +0000 (17:55 -0600)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
lxcfs.c

diff --git a/lxcfs.c b/lxcfs.c
index dd80aa4fc5497654f66b3d56ee90c41295ed80d7..97f38368c51f14fc7ed90099ea5e1f76edc7bb29 100644 (file)
--- a/lxcfs.c
+++ b/lxcfs.c
@@ -393,10 +393,8 @@ static int cg_getattr(const char *path, struct stat *sb)
                sb->st_mode = S_IFDIR | 00755;
                k = get_cgroup_key(controller, cgroup, "tasks");
                if (!k) {
-                       fprintf(stderr, "Failed to find a tasks file for %s\n", cgroup);
                        sb->st_uid = sb->st_gid = 0;
                } else {
-                       fprintf(stderr, "found a tasks file for %s\n", cgroup);
                        sb->st_uid = k->uid;
                        sb->st_gid = k->gid;
                }
@@ -595,8 +593,6 @@ int cg_write(const char *path, const char *buf, size_t size, off_t offset,
        nih_local char * cgdir = NULL;
        nih_local struct cgm_keys *k = NULL;
 
-fprintf(stderr, "cg_write: starting\n");
-
        if (offset)
                return -EIO;
 
@@ -691,6 +687,10 @@ int cg_chown(const char *path, uid_t uid, gid_t gid)
        return 0;
 }
 
+int cg_chmod(const char *path, mode_t mode)
+{
+}
+
 int cg_mkdir(const char *path, mode_t mode)
 {
        struct fuse_context *fc = fuse_get_context();
@@ -912,6 +912,13 @@ int lxcfs_rmdir(const char *path)
        return -EINVAL;
 }
 
+int lxcfs_chmod(const char *path, mode_t mode)
+{
+       if (strncmp(path, "/cgroup", 7) == 0)
+               return cg_chmod(path, mode);
+       return -EINVAL;
+}
+
 const struct fuse_operations lxcfs_ops = {
        .getattr = lxcfs_getattr,
        .readlink = NULL,
@@ -923,7 +930,7 @@ const struct fuse_operations lxcfs_ops = {
        .symlink = NULL,
        .rename = NULL,
        .link = NULL,
-       .chmod = NULL,
+       .chmod = lxcfs_chmod,
        .chown = lxcfs_chown,
        .truncate = lxcfs_truncate,
        .utime = NULL,