diff options
author | Jes Sorensen <Jes.Sorensen@gmail.com> | 2017-03-30 22:52:37 +0200 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@gmail.com> | 2017-03-30 22:52:37 +0200 |
commit | dae131379f9fd82e2867aed25a3ff719f957e9a3 (patch) | |
tree | f337efe8338f6c9cb58086b274cf7ae32a3cd64c /mdadm.h | |
parent | sysfs: Use the presence of /sys/block/<dev>/md as indicator of valid device (diff) | |
download | mdadm-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |