need to change iphlen earlier; icmp_error needs original ip_len; cleanups
[unix-history] / usr / src / usr.bin / find / ls.c
index df32d80..834a31c 100644 (file)
@@ -2,21 +2,11 @@
  * Copyright (c) 1989 The Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1989 The Regents of the University of California.
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley.  The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * %sccs.include.redist.c%
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)ls.c       5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)ls.c       5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -36,14 +26,10 @@ printlong(name, accpath, sb)
        struct stat *sb;                /* stat buffer */
 {
        extern int errno;
        struct stat *sb;                /* stat buffer */
 {
        extern int errno;
-       static char *modep;
-       char *user_from_uid(), *group_from_gid(), *strerror();
+       char modep[15], *user_from_uid(), *group_from_gid(), *strerror();
 
        (void)printf("%6lu %4ld ", sb->st_ino, sb->st_blocks);
 
        (void)printf("%6lu %4ld ", sb->st_ino, sb->st_blocks);
-       if (strmode(sb->st_mode, &modep)) {
-               (void)fprintf(stderr, "find: %s.\n", strerror(errno));
-               exit(1);
-       }
+       (void)strmode(sb->st_mode, modep);
        (void)printf("%s %3u %-*s %-*s ", modep, sb->st_nlink, UT_NAMESIZE,
            user_from_uid(sb->st_uid, 0), UT_NAMESIZE,
            group_from_gid(sb->st_gid, 0));
        (void)printf("%s %3u %-*s %-*s ", modep, sb->st_nlink, UT_NAMESIZE,
            user_from_uid(sb->st_uid, 0), UT_NAMESIZE,
            group_from_gid(sb->st_gid, 0));