diff options
author | 2007-06-02 01:02:56 +0000 | |
---|---|---|
committer | 2007-06-02 01:02:56 +0000 | |
commit | ce7d09aab5788454126b9a7371d1b5fb6c950abb (patch) | |
tree | 97909ae0dc1b0303017e9bd9fec3e6f6aef2dfb4 | |
parent | Add optional metadata element. This will be needed in the future for (diff) | |
download | wireguard-openbsd-ce7d09aab5788454126b9a7371d1b5fb6c950abb.tar.xz wireguard-openbsd-ce7d09aab5788454126b9a7371d1b5fb6c950abb.zip |
do the daddr_t -> daddr64_t or int32_t dance here as well
"this code sucks -- pedro", "just put it in -- tom".
-rw-r--r-- | sys/ntfs/ntfs.h | 10 | ||||
-rw-r--r-- | sys/ntfs/ntfs_subr.c | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/ntfs/ntfs.h b/sys/ntfs/ntfs.h index 42d2b80e605..e1ddb09d729 100644 --- a/sys/ntfs/ntfs.h +++ b/sys/ntfs/ntfs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs.h,v 1.4 2007/02/11 20:29:22 miod Exp $ */ +/* $OpenBSD: ntfs.h,v 1.5 2007/06/02 01:02:56 deraadt Exp $ */ /* $NetBSD: ntfs.h,v 1.5 2003/04/24 07:50:19 christos Exp $ */ /*- @@ -36,7 +36,7 @@ typedef u_int16_t wchar; #pragma pack(1) #define BBSIZE 1024 #define BBOFF ((off_t)(0)) -#define BBLOCK ((daddr_t)(0)) +#define BBLOCK 0 #define NTFS_MFTINO 0 #define NTFS_VOLUMEINO 3 #define NTFS_ATTRDEFINO 4 @@ -278,14 +278,12 @@ struct ntfsmount { #define VTOF(v) ((struct fnode *)((v)->v_data)) #define FTOV(f) ((f)->f_vp) #define FTONT(f) ((f)->f_ip) -#define ntfs_cntobn(cn) (daddr_t)((cn) * (ntmp->ntm_spc)) +#define ntfs_cntobn(cn) (daddr64_t)((cn) * (ntmp->ntm_spc)) #define ntfs_cntob(cn) (off_t)((cn) * (ntmp)->ntm_spc * (ntmp)->ntm_bps) #define ntfs_btocn(off) (cn_t)((off) / ((ntmp)->ntm_spc * (ntmp)->ntm_bps)) #define ntfs_btocl(off) (cn_t)((off + ntfs_cntob(1) - 1) / ((ntmp)->ntm_spc * (ntmp)->ntm_bps)) #define ntfs_btocnoff(off) (off_t)((off) % ((ntmp)->ntm_spc * (ntmp)->ntm_bps)) -#define ntfs_bntob(bn) (daddr_t)((bn) * (ntmp)->ntm_bps) - -#define ntfs_bpbl (daddr_t)((ntmp)->ntm_bps) +#define ntfs_bntob(bn) (int32_t)((bn) * (ntmp)->ntm_bps) #if __FreeBSD_version >= 300000 || defined(__NetBSD__) MALLOC_DECLARE(M_NTFSMNT); diff --git a/sys/ntfs/ntfs_subr.c b/sys/ntfs/ntfs_subr.c index 1d56edd30f8..24891e564a1 100644 --- a/sys/ntfs/ntfs_subr.c +++ b/sys/ntfs/ntfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_subr.c,v 1.10 2007/04/12 22:02:57 thib Exp $ */ +/* $OpenBSD: ntfs_subr.c,v 1.11 2007/06/02 01:02:56 deraadt Exp $ */ /* $NetBSD: ntfs_subr.c,v 1.4 2003/04/10 21:37:32 jdolecek Exp $ */ /*- @@ -293,7 +293,7 @@ ntfs_loadntnode( struct ntnode * ip) { struct filerec *mfrp; - daddr_t bn; + daddr64_t bn; int error,off; struct attr *ap; struct ntvattr *nvap; |