summaryrefslogtreecommitdiffstats
path: root/Detail.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-12 12:47:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-12 12:47:09 +0000
commitb959dcfcd0319d4311e67fa40ebb407605efc9d9 (patch)
treeac91bd6261967ff19b62a1859a4f544112ec4522 /Detail.c
parentReleasing debian version 4.2+20230313-1. (diff)
downloadmdadm-b959dcfcd0319d4311e67fa40ebb407605efc9d9.tar.xz
mdadm-b959dcfcd0319d4311e67fa40ebb407605efc9d9.zip
Merging upstream version 4.2+20230508.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Detail.c b/Detail.c
index 4ef2646..206d88e 100644
--- a/Detail.c
+++ b/Detail.c
@@ -254,10 +254,9 @@ int Detail(char *dev, struct context *c)
fname_from_uuid(st, info, nbuf, ':');
printf("MD_UUID=%s\n", nbuf + 5);
mp = map_by_uuid(&map, info->uuid);
- if (mp && mp->path &&
- strncmp(mp->path, "/dev/md/", 8) == 0) {
+ if (mp && mp->path && strncmp(mp->path, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0) {
printf("MD_DEVNAME=");
- print_escape(mp->path + 8);
+ print_escape(mp->path + DEV_MD_DIR_LEN);
putchar('\n');
}
@@ -273,9 +272,9 @@ int Detail(char *dev, struct context *c)
printf("MD_UUID=%s\n", nbuf+5);
}
if (mp && mp->path &&
- strncmp(mp->path, "/dev/md/", 8) == 0) {
+ strncmp(mp->path, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0) {
printf("MD_DEVNAME=");
- print_escape(mp->path+8);
+ print_escape(mp->path + DEV_MD_DIR_LEN);
putchar('\n');
}
map_free(map);