summaryrefslogtreecommitdiffstats
path: root/msg.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-01-31 05:50:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-01-31 05:50:16 +0000
commit19c986195eab02a3b1da7b532df623cf46d92418 (patch)
tree639e479365923111fbeb91a7d24dad570d50d0ff /msg.c
parentAdding upstream version 4.2+20231121. (diff)
downloadmdadm-19c986195eab02a3b1da7b532df623cf46d92418.tar.xz
mdadm-19c986195eab02a3b1da7b532df623cf46d92418.zip
Adding upstream version 4.2+20240118.upstream/4.2+20240118
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'msg.c')
-rw-r--r--msg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/msg.c b/msg.c
index 45cd450..ba0e25b 100644
--- a/msg.c
+++ b/msg.c
@@ -324,7 +324,7 @@ int block_monitor(char *container, const int freeze)
{
struct mdstat_ent *ent, *e, *e2;
struct mdinfo *sra = NULL;
- char buf[64];
+ char buf[SYSFS_MAX_BUF_SIZE];
int rv = 0;
if (check_mdmon_version(container))
@@ -366,7 +366,7 @@ int block_monitor(char *container, const int freeze)
!sysfs_attribute_available(sra, NULL, "sync_action")) ||
(freeze &&
sysfs_attribute_available(sra, NULL, "sync_action") &&
- sysfs_get_str(sra, NULL, "sync_action", buf, 20) > 0 &&
+ sysfs_get_str(sra, NULL, "sync_action", buf, sizeof(buf)) > 0 &&
strcmp(buf, "frozen\n") == 0))
/* pass */;
else {