From: Stelian Pop Date: Tue, 11 Feb 2003 09:56:46 +0000 (+0000) Subject: Fixed compare of dumped socket files by ignoring them. X-Git-Tag: release_0_4b34~17 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1176b3c1cb187c6c9f223c154fb4d58910717d18;p=dump.git Fixed compare of dumped socket files by ignoring them. --- diff --git a/CHANGES b/CHANGES index 906deb4..dee0408 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.213 2003/02/11 09:26:34 stelian Exp $ +$Id: CHANGES,v 1.214 2003/02/11 09:56:46 stelian Exp $ Changes between versions 0.4b33 and 0.4b34 (released ?????????????????) ======================================================================= @@ -12,6 +12,10 @@ Changes between versions 0.4b33 and 0.4b34 (released ?????????????????) with old build environments. Thanks to Kari Lempiainen for reporting the bug. +3. Fixed restore to correctly ignore sockets when comparing + a dump (as socket cannot be properly restored anyway). Thanks + to for reporting the bug. + Changes between versions 0.4b32 and 0.4b33 (released February 10, 2003) ======================================================================= diff --git a/restore/tape.c b/restore/tape.c index 2bb4472..145f769 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -46,7 +46,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.67 2003/01/10 14:42:51 stelian Exp $"; + "$Id: tape.c,v 1.68 2003/02/11 09:56:48 stelian Exp $"; #endif /* not lint */ #include @@ -1266,6 +1266,16 @@ comparefile(char *name) struct STAT stemp; #endif + curfile.name = name; + curfile.action = USING; + mode = curfile.dip->di_mode; + + if ((mode & IFMT) == IFSOCK) { + Vprintf(stdout, "skipped socket %s\n", name); + skipfile(); + return; + } + if ((r = LSTAT(name, &sb)) != 0) { warn("%s: does not exist (%d)", name, r); do_compare_error; @@ -1273,10 +1283,6 @@ comparefile(char *name) return; } - curfile.name = name; - curfile.action = USING; - mode = curfile.dip->di_mode; - Vprintf(stdout, "comparing %s (size: %ld, mode: 0%o)\n", name, (long)sb.st_size, mode);