Sun Mar 30 23:58:19 2014 UTC ()
Consistently use DIOCGDINFO.


(jakllsch)
diff -r1.10 -r1.11 pkgsrc/sysutils/ntfsprogs/Makefile
diff -r1.12 -r1.13 pkgsrc/sysutils/ntfsprogs/distinfo
diff -r1.5 -r1.6 pkgsrc/sysutils/ntfsprogs/patches/patch-ae

cvs diff -r1.10 -r1.11 pkgsrc/sysutils/ntfsprogs/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/ntfsprogs/Makefile 2012/10/23 19:51:15 1.10
+++ pkgsrc/sysutils/ntfsprogs/Makefile 2014/03/30 23:58:19 1.11
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.10 2012/10/23 19:51:15 asau Exp $ 1# $NetBSD: Makefile,v 1.11 2014/03/30 23:58:19 jakllsch Exp $
2 2
3DISTNAME= ntfsprogs-2.0.0 3DISTNAME= ntfsprogs-2.0.0
4PKGREVISION= 1 4PKGREVISION= 2
5CATEGORIES= sysutils 5CATEGORIES= sysutils
6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=linux-ntfs/} 6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=linux-ntfs/}
7EXTRACT_SUFX= .tar.bz2 7EXTRACT_SUFX= .tar.bz2
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://www.linux-ntfs.org/ 10HOMEPAGE= http://www.linux-ntfs.org/
11COMMENT= Linux-NTFS project utilities for the Windows NT Filesystem 11COMMENT= Linux-NTFS project utilities for the Windows NT Filesystem
12 12
13USE_LANGUAGES= c c++ 13USE_LANGUAGES= c c++
14USE_LIBTOOL= yes 14USE_LIBTOOL= yes
15GNU_CONFIGURE= yes 15GNU_CONFIGURE= yes
16 16
17# XXX support for this should be possibly integrated with other 17# XXX support for this should be possibly integrated with other

cvs diff -r1.12 -r1.13 pkgsrc/sysutils/ntfsprogs/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/sysutils/ntfsprogs/Attic/distinfo 2008/03/08 08:56:47 1.12
+++ pkgsrc/sysutils/ntfsprogs/Attic/distinfo 2014/03/30 23:58:19 1.13
@@ -1,12 +1,12 @@ @@ -1,12 +1,12 @@
1$NetBSD: distinfo,v 1.12 2008/03/08 08:56:47 adam Exp $ 1$NetBSD: distinfo,v 1.13 2014/03/30 23:58:19 jakllsch Exp $
2 2
3SHA1 (ntfsprogs-2.0.0.tar.bz2) = 75393dec021e73a922fe1fd034636de5a45f79a8 3SHA1 (ntfsprogs-2.0.0.tar.bz2) = 75393dec021e73a922fe1fd034636de5a45f79a8
4RMD160 (ntfsprogs-2.0.0.tar.bz2) = aaef354ed7dab572c81f0eece89dd5994babfa8d 4RMD160 (ntfsprogs-2.0.0.tar.bz2) = aaef354ed7dab572c81f0eece89dd5994babfa8d
5Size (ntfsprogs-2.0.0.tar.bz2) = 678114 bytes 5Size (ntfsprogs-2.0.0.tar.bz2) = 678114 bytes
6SHA1 (patch-ab) = 2f277b21885c75c5ba63e9fcf37faca3bb0451dd 6SHA1 (patch-ab) = 2f277b21885c75c5ba63e9fcf37faca3bb0451dd
7SHA1 (patch-ac) = 94cf3266fb5109c8f6fd874e00c35b2ac642a9f1 7SHA1 (patch-ac) = 94cf3266fb5109c8f6fd874e00c35b2ac642a9f1
8SHA1 (patch-ae) = 224e81c0ba3f530f52bbf646c1c66299b0519b3d 8SHA1 (patch-ae) = 0233d53dca5d9e8d39a6537a862c9b1143422381
9SHA1 (patch-af) = e89fb98fb9b365a7f24f7c9bcafb655594523622 9SHA1 (patch-af) = e89fb98fb9b365a7f24f7c9bcafb655594523622
10SHA1 (patch-ah) = b6da89fc9b5bbc83fa503dd887f3f2ec493ad7c7 10SHA1 (patch-ah) = b6da89fc9b5bbc83fa503dd887f3f2ec493ad7c7
11SHA1 (patch-am) = 8dfca2bb615662a18230e6816729808733e1c2d4 11SHA1 (patch-am) = 8dfca2bb615662a18230e6816729808733e1c2d4
12SHA1 (patch-an) = 894d4a11a8c7824120f78b329af4047b779f910b 12SHA1 (patch-an) = 894d4a11a8c7824120f78b329af4047b779f910b

cvs diff -r1.5 -r1.6 pkgsrc/sysutils/ntfsprogs/patches/Attic/patch-ae (expand / switch to unified diff)

--- pkgsrc/sysutils/ntfsprogs/patches/Attic/patch-ae 2008/03/08 08:56:47 1.5
+++ pkgsrc/sysutils/ntfsprogs/patches/Attic/patch-ae 2014/03/30 23:58:19 1.6
@@ -1,39 +1,39 @@ @@ -1,39 +1,39 @@
1$NetBSD: patch-ae,v 1.5 2008/03/08 08:56:47 adam Exp $ 1$NetBSD: patch-ae,v 1.6 2014/03/30 23:58:19 jakllsch Exp $
2 2
3--- libntfs/device.c.orig 2007-09-26 20:28:34.000000000 +0200 3--- libntfs/device.c.orig 2007-09-26 18:28:34.000000000 +0000
4+++ libntfs/device.c 4+++ libntfs/device.c
5@@ -85,6 +85,10 @@ 5@@ -85,6 +85,10 @@
6 # define BLKBSZSET _IOW(0x12,113,size_t) /* Set device block size in bytes. */ 6 # define BLKBSZSET _IOW(0x12,113,size_t) /* Set device block size in bytes. */
7 #endif 7 #endif
8  8
9+#if defined(__NetBSD__) 9+#if defined(__NetBSD__)
10+#include <sys/disklabel.h> /* XXX autoconf this ? */ 10+#include <sys/disklabel.h> /* XXX autoconf this ? */
11+#endif 11+#endif
12+ 12+
13 /** 13 /**
14 * ntfs_device_alloc - allocate an ntfs device structure and pre-initialize it 14 * ntfs_device_alloc - allocate an ntfs device structure and pre-initialize it
15 * @name: name of the device (must be present) 15 * @name: name of the device (must be present)
16@@ -599,6 +603,23 @@ s64 ntfs_device_size_get(struct ntfs_dev 16@@ -599,6 +603,23 @@ s64 ntfs_device_size_get(struct ntfs_dev
17 } 17 }
18 } 18 }
19 #endif 19 #endif
20+#ifdef DIOCGPART 20+#ifdef DIOCGDINFO
21+ { 21+ {
22+ struct stat st; 22+ struct stat st;
23+ if (dev->d_ops->stat(dev, &st) >= 0) { 23+ if (dev->d_ops->stat(dev, &st) >= 0) {
24+ struct disklabel disklabel; 24+ struct disklabel disklabel;
25+ int secsize; 25+ int secsize;
26+ s64 psize; 26+ s64 psize;
27+ if (dev->d_ops->ioctl(dev, DIOCGDINFO, &disklabel) >= 0) { 27+ if (dev->d_ops->ioctl(dev, DIOCGDINFO, &disklabel) >= 0) {
28+ secsize = disklabel.d_secsize; 28+ secsize = disklabel.d_secsize;
29+ psize = disklabel.d_partitions[DISKPART(st.st_rdev)].p_size; 29+ psize = disklabel.d_partitions[DISKPART(st.st_rdev)].p_size;
30+ ntfs_log_debug("DIOCGPART nr %d byte blocks = %lld (0x%llx)\n", 30+ ntfs_log_debug("DIOCGDINFO part %d nr %d byte blocks = %lld (0x%llx)\n",
31+ secsize, psize, psize); 31+ DISKPART(st.st_rdev), secsize, psize, psize);
32+ return psize * secsize / block_size; 32+ return psize * secsize / block_size;
33+ } 33+ }
34+ } 34+ }
35+ } 35+ }
36+#endif 36+#endif
37 /* 37 /*
38 * We couldn't figure it out by using a specialized ioctl, 38 * We couldn't figure it out by using a specialized ioctl,
39 * so do binary search to find the size of the device. 39 * so do binary search to find the size of the device.