summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@gmail.com>2017-03-30 22:52:37 +0200
committerJes Sorensen <Jes.Sorensen@gmail.com>2017-03-30 22:52:37 +0200
commitdae131379f9fd82e2867aed25a3ff719f957e9a3 (patch)
treef337efe8338f6c9cb58086b274cf7ae32a3cd64c /mdadm.h
parentsysfs: Use the presence of /sys/block/<dev>/md as indicator of valid device (diff)
downloadmdadm-dae131379f9fd82e2867aed25a3ff719f957e9a3.tar.xz
mdadm-dae131379f9fd82e2867aed25a3ff719f957e9a3.zip
sysfs: Make sysfs_init() return an error code
Rather than have the caller inspect the returned content, return an error code from sysfs_init(). In addition make all callers actually check it. Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdadm.h b/mdadm.h
index 084bc970..612bd863 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -639,7 +639,7 @@ enum sysfs_read_flags {
* else use devnm.
*/
extern int sysfs_open(char *devnm, char *devname, char *attr);
-extern void sysfs_init(struct mdinfo *mdi, int fd, char *devnm);
+extern int sysfs_init(struct mdinfo *mdi, int fd, char *devnm);
extern void sysfs_init_dev(struct mdinfo *mdi, unsigned long devid);
extern void sysfs_free(struct mdinfo *sra);
extern struct mdinfo *sysfs_read(int fd, char *devnm, unsigned long options);