summaryrefslogtreecommitdiff
path: root/include/linux/configfs.h
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-06-13 01:00:18 +0400
committerMark Fasheh <mfasheh@suse.com>2008-07-15 00:57:16 +0400
commit11c3b79218390a139f2d474ee1e983a672d5839a (patch)
tree03fa1a4927f2d9856ee45a64d522424478058b6f /include/linux/configfs.h
parent6d8344baee99402de58b5fa5dfea197242955c15 (diff)
downloadlinux-11c3b79218390a139f2d474ee1e983a672d5839a.tar.xz
configfs: Allow ->make_item() and ->make_group() to return detailed errors.
The configfs operations ->make_item() and ->make_group() currently return a new item/group. A return of NULL signifies an error. Because of this, -ENOMEM is the only return code bubbled up the stack. Multiple folks have requested the ability to return specific error codes when these operations fail. This patch adds that ability by changing the ->make_item/group() ops to return an int. Also updated are the in-kernel users of configfs. Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'include/linux/configfs.h')
-rw-r--r--include/linux/configfs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/configfs.h b/include/linux/configfs.h
index 3ae65b1bf90f..0488f937634a 100644
--- a/include/linux/configfs.h
+++ b/include/linux/configfs.h
@@ -165,8 +165,8 @@ struct configfs_item_operations {
};
struct configfs_group_operations {
- struct config_item *(*make_item)(struct config_group *group, const char *name);
- struct config_group *(*make_group)(struct config_group *group, const char *name);
+ int (*make_item)(struct config_group *group, const char *name, struct config_item **new_item);
+ int (*make_group)(struct config_group *group, const char *name, struct config_group **new_group);
int (*commit_item)(struct config_item *item);
void (*disconnect_notify)(struct config_group *group, struct config_item *item);
void (*drop_item)(struct config_group *group, struct config_item *item);