diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-17 16:48:55 +0000 |
---|---|---|
committer | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-30 14:14:48 +0200 |
commit | ac75e3648e6a9c3a8cf45d5fa491abd3a3ab3613 (patch) | |
tree | 42afd9455d4384b82a70625ec8b7194d4a08efda /procfs.h | |
parent | 3907bbbcfb806799a5349e46a2b804307a0e9836 (diff) |
Fix the failure semantics of procfs_make_node
* procfs.c (procfs_make_node): Invoke the cleanup callback on
failure, so that callers don't have to.
* procfs.h: Document the change.
* procfs_dir.c (procfs_dir_make_node), procfs_file.c
(procfs_file_make_node), proclist.c (proclist_make_node):
Update to reflect the change.
Diffstat (limited to 'procfs.h')
-rw-r--r-- | procfs.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -29,6 +29,8 @@ struct procfs_node_ops void (*cleanup) (void *hook); }; +/* Create a new node and return it. Returns NULL if it fails to allocate + enough memory. In this case, ops->cleanup will be invoked. */ struct node *procfs_make_node (const struct procfs_node_ops *ops, void *hook); |