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 16:23:45 -0400 |
commit | b9ce7ab0218c550488587fdad5708628d6a5ffc2 (patch) | |
tree | 235d1a56bf56cb4ed8b5c3ca46c32afe67083d8f /mdadm.h | |
parent | 76c224c6cfc8ff154bd041d30b9551faecd593c1 (diff) | |
download | mdadm-b9ce7ab0218c550488587fdad5708628d6a5ffc2.tar.gz |
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 'mdadm.h')
-rw-r--r-- | mdadm.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -100,6 +100,14 @@ struct dlm_lksb { #define DEFAULT_BITMAP_DELAY 5 #define DEFAULT_MAX_WRITE_BEHIND 256 +/* DEV_MD_DIR points to named MD devices directory. + * DEV_MD_DIR_LEN is a length with Null byte excluded. + */ +#ifndef DEV_MD_DIR +#define DEV_MD_DIR "/dev/md/" +#define DEV_MD_DIR_LEN (sizeof(DEV_MD_DIR) - 1) +#endif /* DEV_MD_DIR */ + /* MAP_DIR should be somewhere that persists across the pivotroot * from early boot to late boot. * /run seems to have emerged as the best standard. |