From: Stelian Pop Date: Wed, 28 Jan 2004 10:02:31 +0000 (+0000) Subject: Use minor()/major() instead of "& 0xff" in order to be 32 bit compliant X-Git-Tag: release_0_4b36~11 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e1ba02efc62b97a7430bdd6d22afe024ccdd7f1b;p=dump.git Use minor()/major() instead of "& 0xff" in order to be 32 bit compliant --- diff --git a/CHANGES b/CHANGES index b382d7f..e90eb97 100644 --- 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 . +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 for reporting + the bug. + Changes between versions 0.4b34 and 0.4b35 (released December 21, 2003) ======================================================================= diff --git a/restore/tape.c b/restore/tape.c index e82b780..cc98e71 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -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 @@ -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();