add FIFO support
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 26 May 1990 03:54:10 +0000 (19:54 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 26 May 1990 03:54:10 +0000 (19:54 -0800)
SCCS-vsn: usr.sbin/mtree/mtree.h 5.6
SCCS-vsn: usr.sbin/mtree/spec.c 5.10
SCCS-vsn: usr.sbin/mtree/compare.c 5.6

usr/src/usr.sbin/mtree/compare.c
usr/src/usr.sbin/mtree/mtree.h
usr/src/usr.sbin/mtree/spec.c

index a91d4cf..d263d30 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)compare.c  5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)compare.c  5.6 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -43,6 +43,10 @@ compare(name, s, p)
                if (!S_ISDIR(p->fts_statb.st_mode))
                        goto typeerr;
                break;
                if (!S_ISDIR(p->fts_statb.st_mode))
                        goto typeerr;
                break;
+       case F_FIFO:
+               if (!S_ISFIFO(p->fts_statb.st_mode))
+                       goto typeerr;
+               break;
        case F_FILE:
                if (!S_ISREG(p->fts_statb.st_mode))
                        goto typeerr;
        case F_FILE:
                if (!S_ISREG(p->fts_statb.st_mode))
                        goto typeerr;
@@ -151,6 +155,8 @@ ftype(type)
                return("char");
        case F_DIR:
                return("dir");
                return("char");
        case F_DIR:
                return("dir");
+       case F_FIFO:
+               return("fifo");
        case F_FILE:
                return("file");
        case F_LINK:
        case F_FILE:
                return("file");
        case F_LINK:
index 4773d5a..30e5a91 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)mtree.h     5.5 (Berkeley) %G%
+ *     @(#)mtree.h     5.6 (Berkeley) %G%
  */
 
 #include <string.h>
  */
 
 #include <string.h>
@@ -25,9 +25,10 @@ typedef struct _node {
 #define        F_BLOCK 0x001                           /* block special */
 #define        F_CHAR  0x002                           /* char special */
 #define        F_DIR   0x004                           /* directory */
 #define        F_BLOCK 0x001                           /* block special */
 #define        F_CHAR  0x002                           /* char special */
 #define        F_DIR   0x004                           /* directory */
-#define        F_FILE  0x008                           /* regular file */
-#define        F_LINK  0x010                           /* symbolic link */
-#define        F_SOCK  0x020                           /* socket */
+#define        F_FIFO  0x008                           /* fifo */
+#define        F_FILE  0x010                           /* regular file */
+#define        F_LINK  0x020                           /* symbolic link */
+#define        F_SOCK  0x040                           /* socket */
        u_short type;                           /* file type */
 
 #define        F_CKSUM 0x001                           /* check sum */
        u_short type;                           /* file type */
 
 #define        F_CKSUM 0x001                           /* check sum */
index 051194e..5b0d6ac 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)spec.c     5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)spec.c     5.10 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -165,6 +165,8 @@ set(ip)
                        case 'f':
                                if (!strcmp(val, "file"))
                                        ip->type = F_FILE;
                        case 'f':
                                if (!strcmp(val, "file"))
                                        ip->type = F_FILE;
+                               if (!strcmp(val, "fifo"))
+                                       ip->type = F_FIFO;
                                break;
                        case 'l':
                                if (!strcmp(val, "link"))
                                break;
                        case 'l':
                                if (!strcmp(val, "link"))