make swkill messages more informative
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 13 Mar 1985 10:13:13 +0000 (02:13 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 13 Mar 1985 10:13:13 +0000 (02:13 -0800)
SCCS-vsn: sys/kern/kern_exec.c 6.10
SCCS-vsn: sys/kern/kern_physio.c 6.5

usr/src/sys/kern/kern_exec.c
usr/src/sys/kern/kern_physio.c

index 9b03ea8..14d36e5 100644 (file)
@@ -1,4 +1,4 @@
-/*     kern_exec.c     6.    85/03/12        */
+/*     kern_exec.c     6.10    85/03/12        */
 
 #include "../machine/reg.h"
 #include "../machine/pte.h"
 
 #include "../machine/reg.h"
 #include "../machine/pte.h"
@@ -190,7 +190,7 @@ execve()
        uap = (struct execa *)u.u_ap;
        bno = rmalloc(argmap, (long)ctod(clrnd((int)btoc(NCARGS))));
        if (bno == 0) {
        uap = (struct execa *)u.u_ap;
        bno = rmalloc(argmap, (long)ctod(clrnd((int)btoc(NCARGS))));
        if (bno == 0) {
-               swkill(u.u_procp, "exece");
+               swkill(u.u_procp, "exec: no swap space");
                goto bad;
        }
        if (bno % CLSIZE)
                goto bad;
        }
        if (bno % CLSIZE)
@@ -423,7 +423,7 @@ getxfile(ip, ep, nargc, uid, gid)
 #endif
 
        if (u.u_error)
 #endif
 
        if (u.u_error)
-               swkill(u.u_procp, "i/o error mapping pages");
+               swkill(u.u_procp, "exec: I/O error mapping pages");
        /*
         * set SUID/SGID protections, if no tracing
         */
        /*
         * set SUID/SGID protections, if no tracing
         */
index 4d18752..fba6adf 100644 (file)
@@ -1,4 +1,4 @@
-/*     kern_physio.c   6.4     84/10/31        */
+/*     kern_physio.c   6.5     85/03/12        */
 
 #include "../machine/pte.h"
 
 
 #include "../machine/pte.h"
 
@@ -105,7 +105,7 @@ swap(p, dblkno, addr, nbytes, rdflg, flag, dev, pfcent)
                if (bp->b_flags & B_ERROR) {
                        if ((flag & (B_UAREA|B_PAGET)) || rdflg == B_WRITE)
                                panic("hard IO err in swap");
                if (bp->b_flags & B_ERROR) {
                        if ((flag & (B_UAREA|B_PAGET)) || rdflg == B_WRITE)
                                panic("hard IO err in swap");
-                       swkill(p, (char *)0);
+                       swkill(p, "swap: read error from swap device");
                }
                nbytes -= c;
                dblkno += btodb(c);
                }
                nbytes -= c;
                dblkno += btodb(c);
@@ -152,14 +152,9 @@ swkill(p, rout)
        struct proc *p;
        char *rout;
 {
        struct proc *p;
        char *rout;
 {
-       char *mesg;
 
 
-       printf("pid %d: ", p->p_pid);
-       if (rout)
-               printf(mesg = "killed due to no swap space\n");
-       else
-               printf(mesg = "killed on swap error\n");
-       uprintf("sorry, pid %d was %s", p->p_pid, mesg);
+       printf("pid %d: %s", p->p_pid, rout);
+       uprintf("sorry, pid %d was killed in %s", p->p_pid, rout);
        /*
         * To be sure no looping (e.g. in vmsched trying to
         * swap out) mark process locked in core (as though
        /*
         * To be sure no looping (e.g. in vmsched trying to
         * swap out) mark process locked in core (as though