get rid of MPX checks, add symbolic link checks
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 10 May 1982 12:58:04 +0000 (04:58 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 10 May 1982 12:58:04 +0000 (04:58 -0800)
SCCS-vsn: usr.bin/file/file.c 4.4

usr/src/usr.bin/file/file.c

index 4302ad0..504421c 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)file.c     4.3 (Berkeley) 4.3";
+static char sccsid[] = "@(#)file.c     4.4 (Berkeley) 4.4";
 /*
  * file - determine type of file
  */
 /*
  * file - determine type of file
  */
@@ -68,7 +68,7 @@ char *file;
        struct stat mbuf;
 
        ifile = -1;
        struct stat mbuf;
 
        ifile = -1;
-       if(stat(file, &mbuf) < 0) {
+       if (lstat(file, &mbuf) < 0) {
                printf("cannot stat\n");
                return;
        }
                printf("cannot stat\n");
                return;
        }
@@ -78,16 +78,12 @@ char *file;
                printf("character");
                goto spcl;
 
                printf("character");
                goto spcl;
 
-       case S_IFDIR:
-               printf("directory\n");
-               return;
-
-       case S_IFMPC:
-               printf("char multiplexor\n");
+       case S_IFLNK:
+               printf("symbolic link\n");
                return;
 
                return;
 
-       case S_IFMPB:
-               printf("block multiplexor\n");
+       case S_IFDIR:
+               printf("directory\n");
                return;
 
        case S_IFBLK:
                return;
 
        case S_IFBLK: