diff options
author | Lukasz Dorau <lukasz.dorau@intel.com> | 2011-10-19 15:16:33 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-10-20 03:56:56 +0200 |
commit | c4acd1e5c83a7ad746e8d0a0949e097c8aaf525c (patch) | |
tree | 17bf23435d72a1f55ca8d4cf5b5dd518091a432d | |
parent | imsm: fix: prevent segfault in mark_failure (diff) | |
download | mdadm-c4acd1e5c83a7ad746e8d0a0949e097c8aaf525c.tar.xz mdadm-c4acd1e5c83a7ad746e8d0a0949e097c8aaf525c.zip |
imsm: fix: correct debug printing of the volume's name
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>
-rw-r--r-- | super-intel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/super-intel.c b/super-intel.c index 2c1bf058..dfa85aa1 100644 --- a/super-intel.c +++ b/super-intel.c @@ -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) { |