]> git.wh0rd.org - dump.git/commitdiff
Use minor()/major() instead of "& 0xff" in order to be 32 bit compliant
authorStelian Pop <stelian@popies.net>
Wed, 28 Jan 2004 10:02:31 +0000 (10:02 +0000)
committerStelian Pop <stelian@popies.net>
Wed, 28 Jan 2004 10:02:31 +0000 (10:02 +0000)
CHANGES
restore/tape.c

diff --git a/CHANGES b/CHANGES
index b382d7f25853cf9831e7392a3a780894837aea57..e90eb975ad32c0fa1fbe89bfce69c3accb5a84f4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.239 2004/01/27 10:37:25 stelian Exp $
+$Id: CHANGES,v 1.240 2004/01/28 10:02:31 stelian Exp $
 
 Changes between versions 0.4b35 and 0.4b36 (released ?????????????????)
 =======================================================================
@@ -18,6 +18,12 @@ Changes between versions 0.4b35 and 0.4b36 (released ?????????????????)
        sizes in a single run (make -B accept a list of values).
        Patch contributed by Florian Zumbiehl <florz@gmx.de>.
 
+5.     Use the glibc provided minor() and major() macros instead
+       of our own bitmask implementation. This should be safe for
+       when the major/minor namespace will migrate to 32 bits.
+       Thanks to Zhang Jun <zhangjun@nanjing-fnst.com> for reporting
+       the bug.
+
 Changes between versions 0.4b34 and 0.4b35 (released December 21, 2003)
 =======================================================================
 
index e82b780aeb9ebd12851ed0e3b35132cf627b371a..cc98e716d69566c55d78fede7fb94360d15622e2 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.77 2004/01/27 10:18:17 stelian Exp $";
+       "$Id: tape.c,v 1.78 2004/01/28 10:02:35 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -1643,10 +1643,10 @@ comparefile(char *name)
                        fprintf(stderr,
                                "%s: device changed from %d,%d to %d,%d.\n",
                                name,
-                               ((int)curfile.dip->di_rdev >> 8) & 0xff,
-                               (int)curfile.dip->di_rdev & 0xff,
-                               ((int)sb.st_rdev >> 8) & 0xff,
-                               (int)sb.st_rdev & 0xff);
+                               major(curfile.dip->di_rdev),
+                               minor(curfile.dip->di_rdev),
+                               major(sb.st_rdev),
+                               minor(sb.st_rdev));
                        do_compare_error;
                }
                skipfile();