summaryrefslogtreecommitdiff
path: root/sysutils/ntfsprogs/patches/patch-ae
diff options
context:
space:
mode:
authoragc <agc>2004-10-05 12:39:38 +0000
committeragc <agc>2004-10-05 12:39:38 +0000
commit0f8630f2f5ad2e84a69d57f6bbc9a35716bcf7b1 (patch)
tree9e05cdc5cb99325ca1dbfda4bd49a8375c0b131b /sysutils/ntfsprogs/patches/patch-ae
parent343b04e23451c9869b9639e4f01630313b68b420 (diff)
downloadpkgsrc-0f8630f2f5ad2e84a69d57f6bbc9a35716bcf7b1.tar.gz
Initial import of ntfsprogs-1.9.4 into the packages collection.
The Linux-NTFS project (http://linux-ntfs.sf.net/) aims to bring full support for the NTFS filesystem to the Linux operating system. The ntfsprogs package currently consists of a static library and utilities such as mkntfs, ntfscat, ntfsls, ntfsresize, and ntfsundelete (for a full list of included utilities see man 8 ntfsprogs after installation). Provided in PR 27119 by Darrin B. Jewell, modified by myself to remove dylib files from PLIST, add NetBSD statvfs compatibility, and quieten a warning in one of the patches. Darrin's patches perform the following changes: . provide for redirection of error output without having an lvalue stderr . support for NetBSD disklabels . fix for ntfs_attr_pread to avoid reading a partial block . workaround for darwin sys/mount.h namespace pollution This package is currently configured with the gnome-vfs module disabled.
Diffstat (limited to 'sysutils/ntfsprogs/patches/patch-ae')
-rw-r--r--sysutils/ntfsprogs/patches/patch-ae39
1 files changed, 39 insertions, 0 deletions
diff --git a/sysutils/ntfsprogs/patches/patch-ae b/sysutils/ntfsprogs/patches/patch-ae
new file mode 100644
index 00000000000..47431e9a17e
--- /dev/null
+++ b/sysutils/ntfsprogs/patches/patch-ae
@@ -0,0 +1,39 @@
+$NetBSD: patch-ae,v 1.1.1.1 2004/10/05 12:39:38 agc Exp $
+
+--- libntfs/device.c.orig Sat Sep 4 06:16:32 2004
++++ libntfs/device.c
+@@ -52,6 +52,10 @@
+ #define HDIO_GETGEO 0x0301 /* Get device geometry. */
+ #endif
+
++#if defined(__NetBSD__)
++#include <sys/disklabel.h> /* XXX autoconf this ? */
++#endif
++
+ /**
+ * ntfs_device_alloc - allocate an ntfs device structure and pre-initialize it
+ * name: name of the device (must be present)
+@@ -498,6 +502,23 @@ s64 ntfs_device_size_get(struct ntfs_dev
+ (unsigned long)this_floppy.size,
+ (unsigned long)this_floppy.size);
+ return (s64)this_floppy.size * 512 / block_size;
++ }
++ }
++#endif
++#ifdef DIOCGPART
++ {
++ struct stat st;
++ if (dev->d_ops->stat(dev, &st) >= 0) {
++ struct disklabel disklabel;
++ int secsize;
++ s64 psize;
++ if (dev->d_ops->ioctl(dev, DIOCGDINFO, &disklabel) >= 0) {
++ secsize = disklabel.d_secsize;
++ psize = disklabel.d_partitions[DISKPART(st.st_rdev)].p_size;
++ Dprintf("DIOCGPART nr %d byte blocks = %lld (0x%llx)\n",
++ secsize, psize, psize);
++ return psize * secsize / block_size;
++ }
+ }
+ }
+ #endif