summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorKinga Stefaniuk <kinga.stefaniuk@intel.com>2024-05-07 05:38:55 +0200
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-05-14 11:07:27 +0200
commitb0f4e8e30f38d83f7e3f53d01d72d4cb3b4d42d7 (patch)
tree2adf313972e469ffee2c9a051ef41c9c7af3cc1c /util.c
parenttests/23rdev-lifetime: fix a typo (diff)
downloadmdadm-b0f4e8e30f38d83f7e3f53d01d72d4cb3b4d42d7.tar.xz
mdadm-b0f4e8e30f38d83f7e3f53d01d72d4cb3b4d42d7.zip
util.c: change devnm to const in mdmon functions
Devnm shall not be changed inside mdmon_running() and mdmon_pid() functions, change this parameter to const. Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 4fbf11c4..e2b490e1 100644
--- a/util.c
+++ b/util.c
@@ -1902,7 +1902,7 @@ unsigned long long min_recovery_start(struct mdinfo *array)
return recovery_start;
}
-int mdmon_pid(char *devnm)
+int mdmon_pid(const char *devnm)
{
char path[100];
char pid[10];
@@ -1922,7 +1922,7 @@ int mdmon_pid(char *devnm)
return atoi(pid);
}
-int mdmon_running(char *devnm)
+int mdmon_running(const char *devnm)
{
int pid = mdmon_pid(devnm);
if (pid <= 0)