]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Detail.c
Release 3.2.6 - stability release
[thirdparty/mdadm.git] / Detail.c
index 67ddc800b262b7312f666cb244ac46d1e71f29c3..946b5e9be783150b9d713aebc03ee143d1d5f2b9 100644 (file)
--- a/Detail.c
+++ b/Detail.c
@@ -206,8 +206,11 @@ int Detail(char *dev, int brief, int export, int test, char *homehost, char *pre
                        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)
-                               printf("MD_DEVNAME=%s\n", mp->path+8);
+                           strncmp(mp->path, "/dev/md/", 8) == 0) {
+                               printf("MD_DEVNAME=");
+                               print_escape(mp->path+8);
+                               putchar('\n');
+                       }
 
                        if (st->ss->export_detail_super)
                                st->ss->export_detail_super(st);
@@ -220,8 +223,11 @@ int Detail(char *dev, int brief, int export, int test, char *homehost, char *pre
                                printf("MD_UUID=%s\n", nbuf+5);
                        }
                        if (mp && mp->path &&
-                           strncmp(mp->path, "/dev/md/", 8) == 0)
-                               printf("MD_DEVNAME=%s\n", mp->path+8);
+                           strncmp(mp->path, "/dev/md/", 8) == 0) {
+                               printf("MD_DEVNAME=");
+                               print_escape(mp->path+8);
+                               putchar('\n');
+                       }
                }
                goto out;
        }
@@ -537,7 +543,8 @@ This is pretty boring
                        if (disk.state & (1<<MD_DISK_REMOVED)) printf(" removed");
                        if (disk.state & (1<<MD_DISK_WRITEMOSTLY)) printf(" writemostly");
                        if ((disk.state &
-                            ((1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC)|(1<<MD_DISK_REMOVED)))
+                            ((1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC)
+                             |(1<<MD_DISK_REMOVED)|(1<<MD_DISK_FAULTY)))
                            == 0) {
                                printf(" spare");
                                if (is_26) {