summaryrefslogtreecommitdiff
path: root/fs/aufs/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/aufs/sysfs.c')
-rw-r--r--fs/aufs/sysfs.c48
1 files changed, 8 insertions, 40 deletions
diff --git a/fs/aufs/sysfs.c b/fs/aufs/sysfs.c
index 549f71d1a..cc74d02b1 100644
--- a/fs/aufs/sysfs.c
+++ b/fs/aufs/sysfs.c
@@ -1,18 +1,5 @@
/*
* Copyright (C) 2005-2015 Junjiro R. Okajima
- *
- * This program, aufs is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@@ -23,30 +10,7 @@
#include <linux/seq_file.h>
#include "aufs.h"
-#ifdef CONFIG_AUFS_FS_MODULE
-/* this entry violates the "one line per file" policy of sysfs */
-static ssize_t config_show(struct kobject *kobj, struct kobj_attribute *attr,
- char *buf)
-{
- ssize_t err;
- static char *conf =
-/* this file is generated at compiling */
-#include "conf.str"
- ;
-
- err = snprintf(buf, PAGE_SIZE, conf);
- if (unlikely(err >= PAGE_SIZE))
- err = -EFBIG;
- return err;
-}
-
-static struct kobj_attribute au_config_attr = __ATTR_RO(config);
-#endif
-
static struct attribute *au_attr[] = {
-#ifdef CONFIG_AUFS_FS_MODULE
- &au_config_attr.attr,
-#endif
NULL, /* need to NULL terminate the list of attributes */
};
@@ -97,9 +61,11 @@ static int sysaufs_si_br(struct seq_file *seq, struct super_block *sb,
case AuBrSysfs_BR:
path.mnt = au_br_mnt(br);
path.dentry = au_h_dptr(root, bindex);
- au_seq_path(seq, &path);
- au_optstr_br_perm(&perm, br->br_perm);
- err = seq_printf(seq, "=%s\n", perm.a);
+ err = au_seq_path(seq, &path);
+ if (!err) {
+ au_optstr_br_perm(&perm, br->br_perm);
+ err = seq_printf(seq, "=%s\n", perm.a);
+ }
break;
case AuBrSysfs_BRID:
err = seq_printf(seq, "%d\n", br->br_id);
@@ -260,7 +226,9 @@ static int au_brinfo(struct super_block *sb, union aufs_brinfo __user *arg)
if (unlikely(err))
break;
- au_seq_path(seq, &br->br_path);
+ err = au_seq_path(seq, &br->br_path);
+ if (unlikely(err))
+ break;
err = seq_putc(seq, '\0');
if (!err && seq->count <= sz) {
err = copy_to_user(arg->path, seq->buf, seq->count);