diff options
author | Richard Weinberger <richard@nod.at> | 2013-07-19 05:31:36 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2013-07-19 05:31:36 -0400 |
commit | 9a8c1359571c5d5e2fbc43cf457a6486b70a70cb (patch) | |
tree | 4a1ea590b186fca57a1dfa3f76177f7622b6d721 /arch | |
parent | 7473534130c3156d199512c99ff1b796233e8547 (diff) |
um: siginfo cleanup
Currently we use both struct siginfo and siginfo_t.
Let's use struct siginfo internally to avoid ongoing
compiler warning. We are allowed to do so because
struct siginfo and siginfo_t are equivalent.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/include/shared/frame_kern.h | 8 | ||||
-rw-r--r-- | arch/um/kernel/signal.c | 4 | ||||
-rw-r--r-- | arch/um/os-Linux/signal.c | 8 | ||||
-rw-r--r-- | arch/um/os-Linux/skas/process.c | 10 |
4 files changed, 15 insertions, 15 deletions
diff --git a/arch/um/include/shared/frame_kern.h b/arch/um/include/shared/frame_kern.h index e584e40ee832..f2ca5702a4e2 100644 --- a/arch/um/include/shared/frame_kern.h +++ b/arch/um/include/shared/frame_kern.h | |||
@@ -6,13 +6,13 @@ | |||
6 | #ifndef __FRAME_KERN_H_ | 6 | #ifndef __FRAME_KERN_H_ |
7 | #define __FRAME_KERN_H_ | 7 | #define __FRAME_KERN_H_ |
8 | 8 | ||
9 | extern int setup_signal_stack_sc(unsigned long stack_top, int sig, | 9 | extern int setup_signal_stack_sc(unsigned long stack_top, int sig, |
10 | struct k_sigaction *ka, | 10 | struct k_sigaction *ka, |
11 | struct pt_regs *regs, | 11 | struct pt_regs *regs, |
12 | sigset_t *mask); | 12 | sigset_t *mask); |
13 | extern int setup_signal_stack_si(unsigned long stack_top, int sig, | 13 | extern int setup_signal_stack_si(unsigned long stack_top, int sig, |
14 | struct k_sigaction *ka, | 14 | struct k_sigaction *ka, |
15 | struct pt_regs *regs, siginfo_t *info, | 15 | struct pt_regs *regs, struct siginfo *info, |
16 | sigset_t *mask); | 16 | sigset_t *mask); |
17 | 17 | ||
18 | #endif | 18 | #endif |
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index 3e831b3fd07b..f57e02e7910f 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c | |||
@@ -19,7 +19,7 @@ EXPORT_SYMBOL(unblock_signals); | |||
19 | * OK, we're invoking a handler | 19 | * OK, we're invoking a handler |
20 | */ | 20 | */ |
21 | static void handle_signal(struct pt_regs *regs, unsigned long signr, | 21 | static void handle_signal(struct pt_regs *regs, unsigned long signr, |
22 | struct k_sigaction *ka, siginfo_t *info) | 22 | struct k_sigaction *ka, struct siginfo *info) |
23 | { | 23 | { |
24 | sigset_t *oldset = sigmask_to_save(); | 24 | sigset_t *oldset = sigmask_to_save(); |
25 | int singlestep = 0; | 25 | int singlestep = 0; |
@@ -71,7 +71,7 @@ static void handle_signal(struct pt_regs *regs, unsigned long signr, | |||
71 | static int kern_do_signal(struct pt_regs *regs) | 71 | static int kern_do_signal(struct pt_regs *regs) |
72 | { | 72 | { |
73 | struct k_sigaction ka_copy; | 73 | struct k_sigaction ka_copy; |
74 | siginfo_t info; | 74 | struct siginfo info; |
75 | int sig, handled_sig = 0; | 75 | int sig, handled_sig = 0; |
76 | 76 | ||
77 | while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) { | 77 | while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) { |
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index 9d9f1b4bf826..905924b773d3 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c | |||
@@ -25,7 +25,7 @@ void (*sig_info[NSIG])(int, struct siginfo *, struct uml_pt_regs *) = { | |||
25 | [SIGIO] = sigio_handler, | 25 | [SIGIO] = sigio_handler, |
26 | [SIGVTALRM] = timer_handler }; | 26 | [SIGVTALRM] = timer_handler }; |
27 | 27 | ||
28 | static void sig_handler_common(int sig, siginfo_t *si, mcontext_t *mc) | 28 | static void sig_handler_common(int sig, struct siginfo *si, mcontext_t *mc) |
29 | { | 29 | { |
30 | struct uml_pt_regs r; | 30 | struct uml_pt_regs r; |
31 | int save_errno = errno; | 31 | int save_errno = errno; |
@@ -61,7 +61,7 @@ static void sig_handler_common(int sig, siginfo_t *si, mcontext_t *mc) | |||
61 | static int signals_enabled; | 61 | static int signals_enabled; |
62 | static unsigned int signals_pending; | 62 | static unsigned int signals_pending; |
63 | 63 | ||
64 | void sig_handler(int sig, siginfo_t *si, mcontext_t *mc) | 64 | void sig_handler(int sig, struct siginfo *si, mcontext_t *mc) |
65 | { | 65 | { |
66 | int enabled; | 66 | int enabled; |
67 | 67 | ||
@@ -120,7 +120,7 @@ void set_sigstack(void *sig_stack, int size) | |||
120 | panic("enabling signal stack failed, errno = %d\n", errno); | 120 | panic("enabling signal stack failed, errno = %d\n", errno); |
121 | } | 121 | } |
122 | 122 | ||
123 | static void (*handlers[_NSIG])(int sig, siginfo_t *si, mcontext_t *mc) = { | 123 | static void (*handlers[_NSIG])(int sig, struct siginfo *si, mcontext_t *mc) = { |
124 | [SIGSEGV] = sig_handler, | 124 | [SIGSEGV] = sig_handler, |
125 | [SIGBUS] = sig_handler, | 125 | [SIGBUS] = sig_handler, |
126 | [SIGILL] = sig_handler, | 126 | [SIGILL] = sig_handler, |
@@ -162,7 +162,7 @@ static void hard_handler(int sig, siginfo_t *si, void *p) | |||
162 | while ((sig = ffs(pending)) != 0){ | 162 | while ((sig = ffs(pending)) != 0){ |
163 | sig--; | 163 | sig--; |
164 | pending &= ~(1 << sig); | 164 | pending &= ~(1 << sig); |
165 | (*handlers[sig])(sig, si, mc); | 165 | (*handlers[sig])(sig, (struct siginfo *)si, mc); |
166 | } | 166 | } |
167 | 167 | ||
168 | /* | 168 | /* |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 441e4ba074f4..d531879a4617 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -414,7 +414,7 @@ void userspace(struct uml_pt_regs *regs) | |||
414 | if (WIFSTOPPED(status)) { | 414 | if (WIFSTOPPED(status)) { |
415 | int sig = WSTOPSIG(status); | 415 | int sig = WSTOPSIG(status); |
416 | 416 | ||
417 | ptrace(PTRACE_GETSIGINFO, pid, 0, &si); | 417 | ptrace(PTRACE_GETSIGINFO, pid, 0, (struct siginfo *)&si); |
418 | 418 | ||
419 | switch (sig) { | 419 | switch (sig) { |
420 | case SIGSEGV: | 420 | case SIGSEGV: |
@@ -422,7 +422,7 @@ void userspace(struct uml_pt_regs *regs) | |||
422 | !ptrace_faultinfo) { | 422 | !ptrace_faultinfo) { |
423 | get_skas_faultinfo(pid, | 423 | get_skas_faultinfo(pid, |
424 | ®s->faultinfo); | 424 | ®s->faultinfo); |
425 | (*sig_info[SIGSEGV])(SIGSEGV, &si, | 425 | (*sig_info[SIGSEGV])(SIGSEGV, (struct siginfo *)&si, |
426 | regs); | 426 | regs); |
427 | } | 427 | } |
428 | else handle_segv(pid, regs); | 428 | else handle_segv(pid, regs); |
@@ -431,14 +431,14 @@ void userspace(struct uml_pt_regs *regs) | |||
431 | handle_trap(pid, regs, local_using_sysemu); | 431 | handle_trap(pid, regs, local_using_sysemu); |
432 | break; | 432 | break; |
433 | case SIGTRAP: | 433 | case SIGTRAP: |
434 | relay_signal(SIGTRAP, &si, regs); | 434 | relay_signal(SIGTRAP, (struct siginfo *)&si, regs); |
435 | break; | 435 | break; |
436 | case SIGVTALRM: | 436 | case SIGVTALRM: |
437 | now = os_nsecs(); | 437 | now = os_nsecs(); |
438 | if (now < nsecs) | 438 | if (now < nsecs) |
439 | break; | 439 | break; |
440 | block_signals(); | 440 | block_signals(); |
441 | (*sig_info[sig])(sig, &si, regs); | 441 | (*sig_info[sig])(sig, (struct siginfo *)&si, regs); |
442 | unblock_signals(); | 442 | unblock_signals(); |
443 | nsecs = timer.it_value.tv_sec * | 443 | nsecs = timer.it_value.tv_sec * |
444 | UM_NSEC_PER_SEC + | 444 | UM_NSEC_PER_SEC + |
@@ -452,7 +452,7 @@ void userspace(struct uml_pt_regs *regs) | |||
452 | case SIGFPE: | 452 | case SIGFPE: |
453 | case SIGWINCH: | 453 | case SIGWINCH: |
454 | block_signals(); | 454 | block_signals(); |
455 | (*sig_info[sig])(sig, &si, regs); | 455 | (*sig_info[sig])(sig, (struct siginfo *)&si, regs); |
456 | unblock_signals(); | 456 | unblock_signals(); |
457 | break; | 457 | break; |
458 | default: | 458 | default: |