diff mbox series

[1/2] util.c: change devnm to const in mdmon functions

Message ID 20240507033856.2195-2-kinga.stefaniuk@intel.com (mailing list archive)
State Accepted
Headers show
Series New timeout while waiting for mdmon | expand

Checks

Context Check Description
mdraidci/vmtest-md-6-10-PR fail merge-conflict
mdraidci/vmtest-md-6-10-VM_Test-0 success Logs for Lint
mdraidci/vmtest-md-6-10-VM_Test-1 success Logs for ShellCheck
mdraidci/vmtest-md-6-10-VM_Test-2 success Logs for Unittests
mdraidci/vmtest-md-6-10-VM_Test-3 success Logs for Validate matrix.py
mdraidci/vmtest-md-6-10-VM_Test-5 success Logs for set-matrix
mdraidci/vmtest-md-6-10-VM_Test-6 success Logs for x86_64-gcc / build / build for x86_64 with gcc
mdraidci/vmtest-md-6-10-VM_Test-4 success Logs for build-kernel
mdraidci/vmtest-md-6-10-VM_Test-7 success Logs for x86_64-gcc / build-release
mdraidci/vmtest-md-6-10-VM_Test-8 fail Logs for x86_64-gcc / test (test_maps, false, 360) / test_maps on x86_64 with gcc
mdraidci/vmtest-md-6-10-VM_Test-9 fail Logs for x86_64-gcc / test (test_progs, false, 360) / test_progs on x86_64 with gcc
mdraidci/vmtest-md-6-10-VM_Test-10 fail Logs for x86_64-gcc / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on x86_64 with gcc
mdraidci/vmtest-md-6-10-VM_Test-11 success Logs for x86_64-gcc / test (test_progs_no_alu32_parallel, true, 30) / test_progs_no_alu32_parallel on x86_64 with gcc
mdraidci/vmtest-md-6-10-VM_Test-12 success Logs for x86_64-gcc / test (test_progs_parallel, true, 30) / test_progs_parallel on x86_64 with gcc
mdraidci/vmtest-md-6-10-VM_Test-13 fail Logs for x86_64-gcc / test (test_verifier, false, 360) / test_verifier on x86_64 with gcc
mdraidci/vmtest-md-6-10-VM_Test-14 fail Logs for x86_64-gcc / veristat / veristat on x86_64 with gcc
mdraidci/vmtest-md-6-10-VM_Test-15 success Logs for x86_64-llvm-17 / build / build for x86_64 with llvm-17
mdraidci/vmtest-md-6-10-VM_Test-16 success Logs for x86_64-llvm-17 / build-release / build for x86_64 with llvm-17 and -O2 optimization
mdraidci/vmtest-md-6-10-VM_Test-17 fail Logs for x86_64-llvm-17 / test (test_maps, false, 360) / test_maps on x86_64 with llvm-17
mdraidci/vmtest-md-6-10-VM_Test-19 fail Logs for x86_64-llvm-17 / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on x86_64 with llvm-17
mdraidci/vmtest-md-6-10-VM_Test-18 fail Logs for x86_64-llvm-17 / test (test_progs, false, 360) / test_progs on x86_64 with llvm-17
mdraidci/vmtest-md-6-10-VM_Test-21 success Logs for x86_64-llvm-17 / veristat
mdraidci/vmtest-md-6-10-VM_Test-25 fail Logs for x86_64-llvm-18 / test (test_progs, false, 360) / test_progs on x86_64 with llvm-18
mdraidci/vmtest-md-6-10-VM_Test-24 fail Logs for x86_64-llvm-18 / test (test_maps, false, 360) / test_maps on x86_64 with llvm-18
mdraidci/vmtest-md-6-10-VM_Test-20 fail Logs for x86_64-llvm-17 / test (test_verifier, false, 360) / test_verifier on x86_64 with llvm-17
mdraidci/vmtest-md-6-10-VM_Test-22 success Logs for x86_64-llvm-18 / build / build for x86_64 with llvm-18
mdraidci/vmtest-md-6-10-VM_Test-27 fail Logs for x86_64-llvm-18 / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on x86_64 with llvm-18
mdraidci/vmtest-md-6-10-VM_Test-23 success Logs for x86_64-llvm-18 / build-release / build for x86_64 with llvm-18 and -O2 optimization
mdraidci/vmtest-md-6-10-VM_Test-29 success Logs for x86_64-llvm-18 / veristat
mdraidci/vmtest-md-6-10-VM_Test-28 fail Logs for x86_64-llvm-18 / test (test_verifier, false, 360) / test_verifier on x86_64 with llvm-18
mdraidci/vmtest-md-6-10-VM_Test-26 fail Logs for x86_64-llvm-18 / test (test_progs_cpuv4, false, 360) / test_progs_cpuv4 on x86_64 with llvm-18

Commit Message

Kinga Stefaniuk May 7, 2024, 3:38 a.m. UTC
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>
---
 mdadm.h | 4 ++--
 util.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/mdadm.h b/mdadm.h
index ae2106a2f28f..af4c484afdf7 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -1767,8 +1767,8 @@  extern int is_subarray_active(char *subarray, char *devname);
 extern int open_subarray(char *dev, char *subarray, struct supertype *st, int quiet);
 extern struct superswitch *version_to_superswitch(char *vers);
 
-extern int mdmon_running(char *devnm);
-extern int mdmon_pid(char *devnm);
+extern int mdmon_running(const char *devnm);
+extern int mdmon_pid(const char *devnm);
 extern int check_env(char *name);
 extern __u32 random32(void);
 extern void random_uuid(__u8 *buf);
diff --git a/util.c b/util.c
index 9e8370450a8d..65056a19e2cd 100644
--- a/util.c
+++ b/util.c
@@ -1891,7 +1891,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];
@@ -1911,7 +1911,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)