summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorTomasz Majchrzak <tomasz.majchrzak@intel.com>2016-10-27 11:34:16 +0200
committerJes Sorensen <Jes.Sorensen@redhat.com>2016-11-17 15:46:42 +0100
commitcf52eff58ab9d08e3d016c4f22da8adfc295d7e0 (patch)
treec9702f2ab1392ea108d6fdcafe85998dbbe4db1b /monitor.c
parentIncrease buffer for sysfs path (diff)
downloadmdadm-cf52eff58ab9d08e3d016c4f22da8adfc295d7e0.tar.xz
mdadm-cf52eff58ab9d08e3d016c4f22da8adfc295d7e0.zip
Increase buffer for sysfs disk state
Bad block support has incremented sysfs disk state reported by kernel ("external_bbl") so it became longer than 20 bytes. It causes reshape to fail as it reads truncated entry from sysfs. Increase buffer so it can accommodate the string including all state values currently implemented in kernel at the same time. Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index 4c79ce23..3c554aba 100644
--- a/monitor.c
+++ b/monitor.c
@@ -131,8 +131,8 @@ static enum sync_action read_action( int fd)
int read_dev_state(int fd)
{
- char buf[60];
- int n = read_attr(buf, 60, fd);
+ char buf[100];
+ int n = read_attr(buf, sizeof(buf), fd);
char *cp;
int rv = 0;