]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
um: siginfo cleanup
authorRichard Weinberger <richard@nod.at>
Fri, 19 Jul 2013 09:31:36 +0000 (11:31 +0200)
committerRichard Weinberger <richard@nod.at>
Fri, 19 Jul 2013 09:31:36 +0000 (11:31 +0200)
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>
arch/um/include/shared/frame_kern.h
arch/um/kernel/signal.c
arch/um/os-Linux/signal.c
arch/um/os-Linux/skas/process.c

index e584e40ee8320f62e82e67abe6230a40ac75b19d..f2ca5702a4e2ae2b418382712c93aeed03736450 100644 (file)
@@ -6,13 +6,13 @@
 #ifndef __FRAME_KERN_H_
 #define __FRAME_KERN_H_
 
-extern int setup_signal_stack_sc(unsigned long stack_top, int sig, 
+extern int setup_signal_stack_sc(unsigned long stack_top, int sig,
                                 struct k_sigaction *ka,
-                                struct pt_regs *regs, 
+                                struct pt_regs *regs,
                                 sigset_t *mask);
-extern int setup_signal_stack_si(unsigned long stack_top, int sig, 
+extern int setup_signal_stack_si(unsigned long stack_top, int sig,
                                 struct k_sigaction *ka,
-                                struct pt_regs *regs, siginfo_t *info, 
+                                struct pt_regs *regs, struct siginfo *info,
                                 sigset_t *mask);
 
 #endif
index 3e831b3fd07bb4f547db12eadb6ccecb99df86c9..f57e02e7910f66a6346d7454f7fd612ec6d0735f 100644 (file)
@@ -19,7 +19,7 @@ EXPORT_SYMBOL(unblock_signals);
  * OK, we're invoking a handler
  */
 static void handle_signal(struct pt_regs *regs, unsigned long signr,
-                        struct k_sigaction *ka, siginfo_t *info)
+                        struct k_sigaction *ka, struct siginfo *info)
 {
        sigset_t *oldset = sigmask_to_save();
        int singlestep = 0;
@@ -71,7 +71,7 @@ static void handle_signal(struct pt_regs *regs, unsigned long signr,
 static int kern_do_signal(struct pt_regs *regs)
 {
        struct k_sigaction ka_copy;
-       siginfo_t info;
+       struct siginfo info;
        int sig, handled_sig = 0;
 
        while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) {
index 9d9f1b4bf8269d89af35a08b5e24064337a410e4..905924b773d345b8f49de2905e62a546f6461cd9 100644 (file)
@@ -25,7 +25,7 @@ void (*sig_info[NSIG])(int, struct siginfo *, struct uml_pt_regs *) = {
        [SIGIO]         = sigio_handler,
        [SIGVTALRM]     = timer_handler };
 
-static void sig_handler_common(int sig, siginfo_t *si, mcontext_t *mc)
+static void sig_handler_common(int sig, struct siginfo *si, mcontext_t *mc)
 {
        struct uml_pt_regs r;
        int save_errno = errno;
@@ -61,7 +61,7 @@ static void sig_handler_common(int sig, siginfo_t *si, mcontext_t *mc)
 static int signals_enabled;
 static unsigned int signals_pending;
 
-void sig_handler(int sig, siginfo_t *si, mcontext_t *mc)
+void sig_handler(int sig, struct siginfo *si, mcontext_t *mc)
 {
        int enabled;
 
@@ -120,7 +120,7 @@ void set_sigstack(void *sig_stack, int size)
                panic("enabling signal stack failed, errno = %d\n", errno);
 }
 
-static void (*handlers[_NSIG])(int sig, siginfo_t *si, mcontext_t *mc) = {
+static void (*handlers[_NSIG])(int sig, struct siginfo *si, mcontext_t *mc) = {
        [SIGSEGV] = sig_handler,
        [SIGBUS] = sig_handler,
        [SIGILL] = sig_handler,
@@ -162,7 +162,7 @@ static void hard_handler(int sig, siginfo_t *si, void *p)
                while ((sig = ffs(pending)) != 0){
                        sig--;
                        pending &= ~(1 << sig);
-                       (*handlers[sig])(sig, si, mc);
+                       (*handlers[sig])(sig, (struct siginfo *)si, mc);
                }
 
                /*
index 441e4ba074f4c3386d06b8f7b7830f3c2c82aa8d..d531879a4617695e02df3c1550922cfede7ea4e3 100644 (file)
@@ -414,7 +414,7 @@ void userspace(struct uml_pt_regs *regs)
                if (WIFSTOPPED(status)) {
                        int sig = WSTOPSIG(status);
 
-                       ptrace(PTRACE_GETSIGINFO, pid, 0, &si);
+                       ptrace(PTRACE_GETSIGINFO, pid, 0, (struct siginfo *)&si);
 
                        switch (sig) {
                        case SIGSEGV:
@@ -422,7 +422,7 @@ void userspace(struct uml_pt_regs *regs)
                                    !ptrace_faultinfo) {
                                        get_skas_faultinfo(pid,
                                                           &regs->faultinfo);
-                                       (*sig_info[SIGSEGV])(SIGSEGV, &si,
+                                       (*sig_info[SIGSEGV])(SIGSEGV, (struct siginfo *)&si,
                                                             regs);
                                }
                                else handle_segv(pid, regs);
@@ -431,14 +431,14 @@ void userspace(struct uml_pt_regs *regs)
                                handle_trap(pid, regs, local_using_sysemu);
                                break;
                        case SIGTRAP:
-                               relay_signal(SIGTRAP, &si, regs);
+                               relay_signal(SIGTRAP, (struct siginfo *)&si, regs);
                                break;
                        case SIGVTALRM:
                                now = os_nsecs();
                                if (now < nsecs)
                                        break;
                                block_signals();
-                               (*sig_info[sig])(sig, &si, regs);
+                               (*sig_info[sig])(sig, (struct siginfo *)&si, regs);
                                unblock_signals();
                                nsecs = timer.it_value.tv_sec *
                                        UM_NSEC_PER_SEC +
@@ -452,7 +452,7 @@ void userspace(struct uml_pt_regs *regs)
                        case SIGFPE:
                        case SIGWINCH:
                                block_signals();
-                               (*sig_info[sig])(sig, &si, regs);
+                               (*sig_info[sig])(sig, (struct siginfo *)&si, regs);
                                unblock_signals();
                                break;
                        default: