copyinstr/copyoutstr now return ENAMETOOLONG when name is too long
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Sat, 20 Oct 1990 08:32:17 +0000 (00:32 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Sat, 20 Oct 1990 08:32:17 +0000 (00:32 -0800)
SCCS-vsn: sys/kern/kern_exec.c 7.32
SCCS-vsn: sys/kern/kern_prot.c 7.16
SCCS-vsn: sys/tahoe/tahoe/locore.s 7.15
SCCS-vsn: sys/vax/vax/locore.s 7.26
SCCS-vsn: sys/hp300/hp300/locore.s 7.4

usr/src/sys/hp300/hp300/locore.s
usr/src/sys/kern/kern_exec.c
usr/src/sys/kern/kern_prot.c
usr/src/sys/tahoe/tahoe/locore.s
usr/src/sys/vax/vax/locore.s

index ae4e52b..d3e6953 100644 (file)
@@ -11,7 +11,7 @@
  *
  * from: Utah $Hdr: locore.s 1.47 89/10/08$
  *
  *
  * from: Utah $Hdr: locore.s 1.47 89/10/08$
  *
- *     @(#)locore.s    7.3 (Berkeley) %G%
+ *     @(#)locore.s    7.4 (Berkeley) %G%
  */
 
        .text
  */
 
        .text
@@ -1184,7 +1184,7 @@ Lcisflt1:
        moveq   #EFAULT,d0              | copy fault
        jra     Lcisdone
 Lcisflt2:
        moveq   #EFAULT,d0              | copy fault
        jra     Lcisdone
 Lcisflt2:
-       moveq   #ENOENT,d0              | ran out of space
+       moveq   #ENAMETOOLONG,d0        | ran out of space
        jra     Lcisdone        
 
 /*
        jra     Lcisdone        
 
 /*
@@ -1222,7 +1222,7 @@ Lcosflt1:
        moveq   #EFAULT,d0              | copy fault
        jra     Lcosdone
 Lcosflt2:
        moveq   #EFAULT,d0              | copy fault
        jra     Lcosdone
 Lcosflt2:
-       moveq   #ENOENT,d0              | ran out of space
+       moveq   #ENAMETOOLONG,d0        | ran out of space
        jra     Lcosdone        
 
 /*
        jra     Lcosdone        
 
 /*
@@ -1259,7 +1259,7 @@ Lcsflt1:
        moveq   #EFAULT,d0              | copy fault
        jra     Lcsdone
 Lcsflt2:
        moveq   #EFAULT,d0              | copy fault
        jra     Lcsdone
 Lcsflt2:
-       moveq   #ENOENT,d0              | ran out of space
+       moveq   #ENAMETOOLONG,d0        | ran out of space
        jra     Lcsdone 
 
 /* 
        jra     Lcsdone 
 
 /* 
index 51b0c72..74d7014 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)kern_exec.c 7.31 (Berkeley) %G%
+ *     @(#)kern_exec.c 7.32 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -391,7 +391,7 @@ execve(p, uap, retval)
                        cp += len;
                        nc += len;
                        cc -= len;
                        cp += len;
                        nc += len;
                        cc -= len;
-               } while (error == ENOENT);
+               } while (error == ENAMETOOLONG);
                if (error) {
                        if (bp)
                                brelse(bp);
                if (error) {
                        if (bp)
                                brelse(bp);
@@ -476,7 +476,7 @@ badarg:
                        cp += len;
                        nc += len;
                        cc -= len;
                        cp += len;
                        nc += len;
                        cc -= len;
-               } while (error == ENOENT);
+               } while (error == ENAMETOOLONG);
                if (error == EFAULT)
                        panic("exec: EFAULT");
        }
                if (error == EFAULT)
                        panic("exec: EFAULT");
        }
index 7c4b5dd..82acedd 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)kern_prot.c 7.15 (Berkeley) %G%
+ *     @(#)kern_prot.c 7.16 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -526,7 +526,7 @@ setlogin(p, uap, retval)
                return (error);
        error = copyinstr((caddr_t)uap->namebuf, (caddr_t)p->p_logname,
            sizeof (p->p_logname) - 1, (int *) 0);
                return (error);
        error = copyinstr((caddr_t)uap->namebuf, (caddr_t)p->p_logname,
            sizeof (p->p_logname) - 1, (int *) 0);
-       if (error == ENOENT)            /* name too long */
+       if (error == ENAMETOOLONG)              /* name too long */
                error = EINVAL;
        return (error);
 }
                error = EINVAL;
        return (error);
 }
index d8f5feb..6f4c362 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)locore.s    7.14 (Berkeley) %G%
+ *     @(#)locore.s    7.15 (Berkeley) %G%
  */
 
 #include "../tahoe/mtpr.h"
  */
 
 #include "../tahoe/mtpr.h"
@@ -1104,7 +1104,7 @@ ENTRY(copyinstr, 0)
        movl    $(NBPG*CLSIZE),r2       # check next page
        tstl    r5                      # run out of space?
        jneq    1b
        movl    $(NBPG*CLSIZE),r2       # check next page
        tstl    r5                      # run out of space?
        jneq    1b
-       movl    $ENOENT,r0              # set error code and return
+       movl    $ENAMETOOLONG,r0        # set error code and return
        jbr     6f
 3:
        tstl    16(fp)                  # return length?
        jbr     6f
 3:
        tstl    16(fp)                  # return length?
@@ -1181,7 +1181,7 @@ ENTRY(copyoutstr, 0)
        movl    $(NBPG*CLSIZE),r2       # check next page
        tstl    r5                      # run out of space?
        jneq    1b
        movl    $(NBPG*CLSIZE),r2       # check next page
        tstl    r5                      # run out of space?
        jneq    1b
-       movl    $ENOENT,r0              # set error code and return
+       movl    $ENAMETOOLONG,r0        # set error code and return
        jbr     6b
 5:
        clrl    *$0             # this should never execute, if it does
        jbr     6b
 5:
        clrl    *$0             # this should never execute, if it does
@@ -1215,7 +1215,7 @@ ENTRY(copystr, 0)
        movl    r4,r1
        movl    r3,r2
        movblk                          # copy next piece
        movl    r4,r1
        movl    r3,r2
        movblk                          # copy next piece
-       movl    $ENOENT,r0              # set error code and return
+       movl    $ENAMETOOLONG,r0        # set error code and return
        jbr     6b
 
 /*
        jbr     6b
 
 /*
index 34e77b9..8b51b1d 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)locore.s    7.25 (Berkeley) %G%
+ *     @(#)locore.s    7.26 (Berkeley) %G%
  */
 
 #include "psl.h"
  */
 
 #include "psl.h"
@@ -1317,7 +1317,7 @@ ENTRY(copyinstr, R6)
        movl    $(NBPG*CLSIZE),r2       # check next page
        tstl    r6                      # run out of space?
        jneq    1b
        movl    $(NBPG*CLSIZE),r2       # check next page
        tstl    r6                      # run out of space?
        jneq    1b
-       movl    $ENOENT,r0              # set error code and return
+       movl    $ENAMETOOLONG,r0        # set error code and return
        jbr     9f
 3:
        tstl    16(ap)                  # return length?
        jbr     9f
 3:
        tstl    16(ap)                  # return length?
@@ -1383,7 +1383,7 @@ ENTRY(copyoutstr, R6)
        movl    $(NBPG*CLSIZE),r2       # check next page
        tstl    r6                      # run out of space?
        jneq    1b
        movl    $(NBPG*CLSIZE),r2       # check next page
        tstl    r6                      # run out of space?
        jneq    1b
-       movl    $ENOENT,r0              # set error code and return
+       movl    $ENAMETOOLONG,r0        # set error code and return
        jbr     9b
 
 /*
        jbr     9b
 
 /*
@@ -1424,7 +1424,7 @@ ENTRY(copystr, R6)
        movc3   r2,(r1),(r3)            # copy in next piece
        tstl    r6                      # run out of space?
        jneq    1b
        movc3   r2,(r1),(r3)            # copy in next piece
        tstl    r6                      # run out of space?
        jneq    1b
-       movl    $ENOENT,r0              # set error code and return
+       movl    $ENAMETOOLONG,r0        # set error code and return
        jbr     9b
 
 /* 
        jbr     9b
 
 /*