summaryrefslogtreecommitdiffstats
path: root/probe_roms.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-25 16:20:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-25 16:20:34 +0000
commitd970b407fc0f4fba35fc31aab80ea6ea69788a52 (patch)
tree491e11b95bf9ea1a3fb1e6a886a65b8491cf9841 /probe_roms.c
parentAdding debian version 4.2-5. (diff)
downloadmdadm-d970b407fc0f4fba35fc31aab80ea6ea69788a52.tar.xz
mdadm-d970b407fc0f4fba35fc31aab80ea6ea69788a52.zip
Merging upstream version 4.2+20230223.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'probe_roms.c')
-rw-r--r--probe_roms.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/probe_roms.c b/probe_roms.c
index 7ea04c7..94c80c2 100644
--- a/probe_roms.c
+++ b/probe_roms.c
@@ -22,7 +22,6 @@
#include "probe_roms.h"
#include "mdadm.h"
#include <unistd.h>
-#include <signal.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
@@ -69,7 +68,8 @@ static int probe_address16(const __u16 *ptr, __u16 *val)
void probe_roms_exit(void)
{
- signal(SIGBUS, SIG_DFL);
+ signal_s(SIGBUS, SIG_DFL);
+
if (rom_fd >= 0) {
close(rom_fd);
rom_fd = -1;
@@ -98,7 +98,7 @@ int probe_roms_init(unsigned long align)
if (roms_init())
return -1;
- if (signal(SIGBUS, sigbus) == SIG_ERR)
+ if (signal_s(SIGBUS, sigbus) == SIG_ERR)
rc = -1;
if (rc == 0) {
fd = open("/dev/mem", O_RDONLY);