X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;ds=sidebyside;f=restore%2Ftape.c;h=32a5582d1e32f11e51ef1a69e4a2f2117a79d611;hb=ec387a1267f4cac7625cd5b6d1c1f080d39085b3;hp=9e1e28c2594a70d94f4bc21ab66d49f34b9ca692;hpb=ddd2ef55b78a62c4bc3daad18bef8a90e85a2052;p=dump.git diff --git a/restore/tape.c b/restore/tape.c index 9e1e28c..32a5582 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -42,16 +42,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $Id: tape.c,v 1.5 1999/10/11 13:31:13 stelian Exp $ */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)tape.c 8.9 (Berkeley) 5/1/95"; -#endif -static const char rcsid[] = - "$Id: tape.c,v 1.3 1999/10/11 12:59:21 stelian Exp $"; -#endif /* not lint */ - #include #include #include @@ -602,10 +596,11 @@ extractfile(char *name) } (void) chown(name, curfile.dip->di_uid, curfile.dip->di_gid); (void) chmod(name, mode); + if (flags) #ifdef __linux__ - (void) fsetflags(name, flags); + (void) fsetflags(name, flags); #else - (void) chflags(name, flags); + (void) chflags(name, flags); #endif skipfile(); utimes(name, timep); @@ -627,10 +622,14 @@ extractfile(char *name) } (void) chown(name, curfile.dip->di_uid, curfile.dip->di_gid); (void) chmod(name, mode); + if (flags) #ifdef __linux__ - (void) fsetflags(name, flags); + { + warn("%s: fsetflags called on a special file", name); + (void) fsetflags(name, flags); + } #else - (void) chflags(name, flags); + (void) chflags(name, flags); #endif skipfile(); utimes(name, timep); @@ -652,10 +651,11 @@ extractfile(char *name) } (void) fchown(ofile, curfile.dip->di_uid, curfile.dip->di_gid); (void) fchmod(ofile, mode); + if (flags) #ifdef __linux__ - (void) fsetflags(ofile, flags); + (void) setflags(ofile, flags); #else - (void) fchflags(ofile, flags); + (void) fchflags(ofile, flags); #endif getfile(xtrfile, xtrskip); (void) close(ofile);