Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ufs Allow negative values other than UNASSIGNED to b...



details:   https://anonhg.NetBSD.org/src/rev/dc4c7443b592
branches:  trunk
changeset: 542831:dc4c7443b592
user:      perseant <perseant%NetBSD.org@localhost>
date:      Sun Feb 09 03:26:59 2003 +0000

description:
Allow negative values other than UNASSIGNED to be returned from ufs_bmap;
fixes a bug introduced in the 64-bit daddr_t conversion, that manifests
itself in LFS with kernels compiled with the FFS_EI option.

diffstat:

 sys/ufs/ufs/ufs_bmap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 06780e6e9165 -r dc4c7443b592 sys/ufs/ufs/ufs_bmap.c
--- a/sys/ufs/ufs/ufs_bmap.c    Sat Feb 08 20:42:07 2003 +0000
+++ b/sys/ufs/ufs/ufs_bmap.c    Sun Feb 09 03:26:59 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_bmap.c,v 1.18 2003/01/24 21:55:30 fvdl Exp $       */
+/*     $NetBSD: ufs_bmap.c,v 1.19 2003/02/09 03:26:59 perseant Exp $   */
 
 /*
  * Copyright (c) 1989, 1991, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.18 2003/01/24 21:55:30 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.19 2003/02/09 03:26:59 perseant Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -233,7 +233,7 @@
        if (bp)
                brelse(bp);
 
-       daddr = blkptrtodb(ump, daddr);
+       daddr = blkptrtodb(ump, (int32_t)daddr); /* XXX ondisk32 */
        *bnp = daddr == 0 ? -1 : daddr;
        return (0);
 }



Home | Main Index | Thread Index | Old Index