diff options
author | Mateusz Kusiak <mateusz.kusiak@intel.com> | 2024-01-18 11:28:40 +0100 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-01-24 16:14:43 +0100 |
commit | 90fd70016b99e26e116b12246631b7d4aa3d3d08 (patch) | |
tree | 648a740ed3f7b338796a55f5f041f515b82875cb /mdadm.h | |
parent | tests: Gate tests for linear flavor with variable LINEAR (diff) | |
download | mdadm-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 'mdadm.h')
-rw-r--r-- | mdadm.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -767,6 +767,8 @@ enum sysfs_read_flags { GET_DEVS_ALL = (1 << 27), }; +#define SYSFS_MAX_BUF_SIZE 64 + /* If fd >= 0, get the array it is open on, * else use devnm. */ |