From 2e555f4100de1ce92bb01d09fd4b635fb0e133f4 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Thu, 3 Dec 2009 12:46:29 +0000 Subject: [PATCH] Fix restoration of extended attributes for fifos and device nodes. --- CHANGES | 5 ++++- restore/tape.c | 16 +++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/CHANGES b/CHANGES index 65b638a..e41a1be 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.305 2009/09/07 08:51:04 stelian Exp $ +$Id: CHANGES,v 1.306 2009/12/03 12:46:29 stelian Exp $ Changes between versions 0.4b42 and 0.4b43 (released ?????????????) =================================================================== @@ -18,6 +18,9 @@ Changes between versions 0.4b42 and 0.4b43 (released ?????????????) (this also fixes a build failure when selinux libraries are not installed). +4. Fix restoration of extended attributes of fifos and device nodes. + Thanks to Igor Zhbanov for the bug report. + Changes between versions 0.4b41 and 0.4b42 (released June 18, 2009) =================================================================== diff --git a/restore/tape.c b/restore/tape.c index b779fd7..fa4a961 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.93 2009/07/23 14:10:39 stelian Exp $"; + "$Id: tape.c,v 1.94 2009/12/03 12:46:30 stelian Exp $"; #endif /* not lint */ #include @@ -892,16 +892,14 @@ extractfile(struct entry *ep, int doremove) case IFIFO: Vprintf(stdout, "extract fifo %s\n", name); - if (Nflag) { - skipfile(); + skipfile(); + if (Nflag) return (GOOD); - } if (! (spcl.c_flags & DR_METAONLY)) { if (uflag && !Nflag) (void)unlink(name); if (mkfifo(name, mode) < 0) { warn("%s: cannot create fifo", name); - skipfile(); return (FAIL); } } @@ -922,22 +920,19 @@ extractfile(struct entry *ep, int doremove) (void) chflags(name, flags); #endif #endif - skipfile(); return (GOOD); case IFCHR: case IFBLK: Vprintf(stdout, "extract special file %s\n", name); - if (Nflag) { - skipfile(); + skipfile(); + if (Nflag) return (GOOD); - } if (! (spcl.c_flags & DR_METAONLY)) { if (uflag) (void)unlink(name); if (mknod(name, mode, (int)curfile.dip->di_rdev) < 0) { warn("%s: cannot create special file", name); - skipfile(); return (FAIL); } } @@ -964,7 +959,6 @@ extractfile(struct entry *ep, int doremove) } #endif #endif - skipfile(); return (GOOD); case IFREG: -- 2.39.2