summaryrefslogtreecommitdiffstats
path: root/Incremental.c
diff options
context:
space:
mode:
authorMateusz Kusiak <mateusz.kusiak@intel.com>2024-01-18 11:28:40 +0100
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-01-24 16:14:43 +0100
commit90fd70016b99e26e116b12246631b7d4aa3d3d08 (patch)
tree648a740ed3f7b338796a55f5f041f515b82875cb /Incremental.c
parenttests: Gate tests for linear flavor with variable LINEAR (diff)
downloadmdadm-90fd70016b99e26e116b12246631b7d4aa3d3d08.tar.xz
mdadm-90fd70016b99e26e116b12246631b7d4aa3d3d08.zip
Define sysfs max buffer size
sysfs_get_str() usages have inconsistant buffer size. This results in wild buffer declarations and redundant memory usage. Define maximum buffer size for sysfs strings. Replace wild sysfs string buffer sizes for globaly defined value. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Incremental.c b/Incremental.c
index 3551c65b..52e39623 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -1650,7 +1650,7 @@ int IncrementalRemove(char *devname, char *id_path, int verbose)
struct mdstat_ent *ent;
struct mddev_dev devlist;
struct mdinfo mdi;
- char buf[32];
+ char buf[SYSFS_MAX_BUF_SIZE];
if (!id_path)
dprintf("incremental removal without --path <id_path> lacks the possibility to re-add new device in this port\n");