diff options
author | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-10-07 11:45:46 +0200 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-11-04 10:25:26 +0100 |
commit | fdeb831823b63d1ee6c95a892af201b1550e6ee5 (patch) | |
tree | 892c8a09cd4345b6523e2b78d94408afbde385be /mdadm.h | |
parent | [PATCH] mdadm: Grow.c distinguish takeover vs reshape on grow operation (diff) | |
download | mdadm-fdeb831823b63d1ee6c95a892af201b1550e6ee5.tar.xz mdadm-fdeb831823b63d1ee6c95a892af201b1550e6ee5.zip |
sysfs: add sysfs_open_memb_attr()
Function is added to not repeat defining "dev-%s", disk_name.
Related code branches are updated. Ioctl way for setting disk
faulty/remove is removed, sysfs is always used now.
Some non functional style issues are fixed in Manage_subdevs().
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -803,13 +803,12 @@ extern mdadm_status_t sysfs_write_descriptor(const int fd, const char *value, extern mdadm_status_t write_attr(const char *value, const int fd); extern void sysfs_get_container_devnm(struct mdinfo *mdi, char *buf); -/* If fd >= 0, get the array it is open on, - * else use devnm. - */ extern int sysfs_open(char *devnm, char *devname, char *attr); +extern int sysfs_open_memb_attr(char *array_devnm, char *memb_devnm, char *attr, int oflag); extern int sysfs_init(struct mdinfo *mdi, int fd, char *devnm); extern void sysfs_init_dev(struct mdinfo *mdi, dev_t devid); extern void sysfs_free(struct mdinfo *sra); + extern struct mdinfo *sysfs_read(int fd, char *devnm, unsigned long options); extern int sysfs_attr_match(const char *attr, const char *str); extern int sysfs_match_word(const char *word, char **list); |