summaryrefslogtreecommitdiffstats
path: root/Detail.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-11-01 04:09:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-11-01 04:09:34 +0000
commit4de68785edd25915183b5f84f192ccaffd126a2f (patch)
treebc6c5cfb5ba70242a610199b36601974042967eb /Detail.c
parentAdding upstream version 4.2+20230508. (diff)
downloadmdadm-4de68785edd25915183b5f84f192ccaffd126a2f.tar.xz
mdadm-4de68785edd25915183b5f84f192ccaffd126a2f.zip
Adding upstream version 4.2+20231026.upstream/4.2+20231026
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/Detail.c b/Detail.c
index 206d88e..57ac336 100644
--- a/Detail.c
+++ b/Detail.c
@@ -254,11 +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_DIR, DEV_MD_DIR_LEN) == 0) {
- printf("MD_DEVNAME=");
- print_escape(mp->path + DEV_MD_DIR_LEN);
- putchar('\n');
- }
+
+ if (mp && mp->path && strncmp(mp->path, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0)
+ printf("MD_DEVNAME=%s\n", mp->path + DEV_MD_DIR_LEN);
if (st->ss->export_detail_super)
st->ss->export_detail_super(st);
@@ -271,12 +269,9 @@ int Detail(char *dev, struct context *c)
__fname_from_uuid(mp->uuid, 0, nbuf, ':');
printf("MD_UUID=%s\n", nbuf+5);
}
- if (mp && mp->path &&
- strncmp(mp->path, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0) {
- printf("MD_DEVNAME=");
- print_escape(mp->path + DEV_MD_DIR_LEN);
- putchar('\n');
- }
+ if (mp && mp->path && strncmp(mp->path, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0)
+ printf("MD_DEVNAME=%s\n", mp->path + DEV_MD_DIR_LEN);
+
map_free(map);
}
if (!c->no_devices && sra) {