summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authormartin <martin@FreeBSD.org>1995-02-10 21:57:02 +0000
committermartin <martin@FreeBSD.org>1995-02-10 21:57:02 +0000
commitf4a355cd1896f74a533ce0cfd615d620d5eb459f (patch)
tree0ed8270503a07eceaa5012f3c46a9305026099b2 /sbin
parentb05d6b2adca31b4fe6a2e29416dfa7a2bbbb7dfe (diff)
downloadFreeBSD-src-f4a355cd1896f74a533ce0cfd615d620d5eb459f.zip
FreeBSD-src-f4a355cd1896f74a533ce0cfd615d620d5eb459f.tar.gz
Added FIFO restore capability.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/restore/tape.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index 368c59c..965a28e 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -545,6 +545,19 @@ extractfile(name)
}
return (linkit(lnkbuf, name, SYMLINK));
+ case IFIFO:
+ if (mkfifo(name, mode) < 0) {
+ fprintf(stderr, "%s: cannot create FIFO: %s\n",
+ name, strerror(errno));
+ skipfile();
+ return (FAIL);
+ }
+ (void) chown(name, curfile.dip->di_uid, curfile.dip->di_gid);
+ (void) chmod(name, mode);
+ skipfile();
+ utimes(name, timep);
+ return (GOOD);
+
case IFCHR:
case IFBLK:
vprintf(stdout, "extract special file %s\n", name);
OpenPOWER on IntegriCloud