]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: fix: correct debug printing of the volume's name
authorLukasz Dorau <lukasz.dorau@intel.com>
Wed, 19 Oct 2011 13:16:33 +0000 (15:16 +0200)
committerNeilBrown <neilb@suse.de>
Thu, 20 Oct 2011 01:56:56 +0000 (12:56 +1100)
The volume's name is saved in the array of chars.
All elements of the array can have nonzero values
and the next byte in memory does not have to have
the value of 0, so one must be cautious when
printing out the volume's name.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index 2c1bf05865f15d1b861b62f8acbe403dae8d1b7a..dfa85aa1b7f6f08f953892cb6d67ecc127303b0c 100644 (file)
@@ -6642,9 +6642,9 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a,
         * are removed from container.
         */
        if (failed) {
-               dprintf("found failed disks in %s, check if there another"
+               dprintf("found failed disks in %.*s, check if there another"
                        "failed sub-array.\n",
-                       dev->volume);
+                       MAX_RAID_SERIAL_LEN, dev->volume);
                /* check if states of the other volumes allow for rebuild */
                for (i = 0; i <  super->anchor->num_raid_devs; i++) {
                        if (i != inst) {