Module Name: src
Committed By: dholland
Date: Sat Oct 3 08:29:48 UTC 2015
Modified Files:
src/sbin/fsck_lfs: lfs.c
src/sys/ufs/lfs: lfs_accessors.h
Log Message:
Drop an explicit sign-extension in fsck that shouldn't be needed any
more.
To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sbin/fsck_lfs/lfs.c
cvs rdiff -u -r1.35 -r1.36 src/sys/ufs/lfs/lfs_accessors.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/fsck_lfs/lfs.c
diff -u src/sbin/fsck_lfs/lfs.c:1.66 src/sbin/fsck_lfs/lfs.c:1.67
--- src/sbin/fsck_lfs/lfs.c:1.66 Sat Oct 3 08:29:34 2015
+++ src/sbin/fsck_lfs/lfs.c Sat Oct 3 08:29:48 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.66 2015/10/03 08:29:34 dholland Exp $ */
+/* $NetBSD: lfs.c,v 1.67 2015/10/03 08:29:48 dholland Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -1090,8 +1090,6 @@ lfs_balloc(struct uvnode *vp, off_t star
if (error)
return (error);
- daddr = (daddr_t)((int32_t)daddr); /* XXX ondisk32 */
-
/*
* Do byte accounting all at once, so we can gracefully fail *before*
* we start assigning blocks.
Index: src/sys/ufs/lfs/lfs_accessors.h
diff -u src/sys/ufs/lfs/lfs_accessors.h:1.35 src/sys/ufs/lfs/lfs_accessors.h:1.36
--- src/sys/ufs/lfs/lfs_accessors.h:1.35 Sat Oct 3 08:28:16 2015
+++ src/sys/ufs/lfs/lfs_accessors.h Sat Oct 3 08:29:48 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_accessors.h,v 1.35 2015/10/03 08:28:16 dholland Exp $ */
+/* $NetBSD: lfs_accessors.h,v 1.36 2015/10/03 08:29:48 dholland Exp $ */
/* from NetBSD: lfs.h,v 1.165 2015/07/24 06:59:32 dholland Exp */
/* from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp */
@@ -501,6 +501,7 @@ lfs_dino_getdb(STRUCT_LFS *fs, union lfs
if (fs->lfs_is64) {
return dip->u_64.di_db[ix];
} else {
+ /* note: this must sign-extend or UNWRITTEN gets trashed */
return dip->u_32.di_db[ix];
}
}
@@ -512,6 +513,7 @@ lfs_dino_getib(STRUCT_LFS *fs, union lfs
if (fs->lfs_is64) {
return dip->u_64.di_ib[ix];
} else {
+ /* note: this must sign-extend or UNWRITTEN gets trashed */
return dip->u_32.di_ib[ix];
}
}