diff options
author | Tomasz Majchrzak <tomasz.majchrzak@intel.com> | 2016-10-27 11:34:16 +0200 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@redhat.com> | 2016-11-17 15:46:42 +0100 |
commit | cf52eff58ab9d08e3d016c4f22da8adfc295d7e0 (patch) | |
tree | c9702f2ab1392ea108d6fdcafe85998dbbe4db1b /monitor.c | |
parent | Increase buffer for sysfs path (diff) | |
download | mdadm-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |