diff options
author | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2023-03-23 17:50:14 +0100 |
---|---|---|
committer | Jes Sorensen <jes@trained-monkey.org> | 2023-05-08 22:23:45 +0200 |
commit | b9ce7ab0218c550488587fdad5708628d6a5ffc2 (patch) | |
tree | 235d1a56bf56cb4ed8b5c3ca46c32afe67083d8f /sysfs.c | |
parent | Remove the config files in mdcheck_start|continue service (diff) | |
download | mdadm-b9ce7ab0218c550488587fdad5708628d6a5ffc2.tar.xz mdadm-b9ce7ab0218c550488587fdad5708628d6a5ffc2.zip |
mdadm: define DEV_MD_DIR
It is used many times. Additionally define _LEN to avoid repeated
strlen() calls when length is needed.
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Diffstat (limited to '')
-rw-r--r-- | sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1114,7 +1114,7 @@ void sysfsline(char *line) if (strncasecmp(w, "name=", 5) == 0) { char *devname = w + 5; - if (strncmp(devname, "/dev/md/", 8) == 0) { + if (strncmp(devname, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0) { if (sr->devname) pr_err("Only give one device per SYSFS line: %s\n", devname); |