diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 04:09:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 04:09:34 +0000 |
commit | 4de68785edd25915183b5f84f192ccaffd126a2f (patch) | |
tree | bc6c5cfb5ba70242a610199b36601974042967eb /Detail.c | |
parent | Adding upstream version 4.2+20230508. (diff) | |
download | mdadm-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.c | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -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) { |