- Update 20070102.

- Fix pkg-plist [1]
- Change PORTVERSION to start with 0. I hate PORTEPOCH.

PR:		107475
Noticed by:	kris (via pointyhat) [1]
This commit is contained in:
Max Khon 2007-01-10 21:54:31 +00:00
parent b4d7116641
commit e6b163ce09
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=182026
4 changed files with 72 additions and 61 deletions

View file

@ -5,12 +5,12 @@
# #
PORTNAME= ntfs PORTNAME= ntfs
PORTVERSION= 20061115.BETA PORTVERSION= 0.20070102.BETA
CATEGORIES= sysutils CATEGORIES= sysutils
MASTER_SITES= http://www.ntfs-3g.org/ MASTER_SITES= http://www.ntfs-3g.org/
MASTER_SITE_SUBDIR= fuse MASTER_SITE_SUBDIR= fuse
PKGNAMEPREFIX= fusefs- PKGNAMEPREFIX= fusefs-
DISTNAME= ${PORTNAME}-3g-0.${PORTVERSION:S,.,-,} DISTNAME= ${PORTNAME}-3g-${PORTVERSION:S,.BETA,-BETA,}
EXTRACT_SUFX= .tgz EXTRACT_SUFX= .tgz
MAINTAINER= fjoe@FreeBSD.org MAINTAINER= fjoe@FreeBSD.org
@ -23,7 +23,8 @@ BUILD_DEPENDS= fusefs-libs>=2.6.0:${PORTSDIR}/sysutils/fusefs-libs
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL} CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS= i386 amd64
INSTALLS_SHLIB= yes USE_LDCONFIG= yes
MAN8= ntfs-3g.8
post-patch: post-patch:
@${CP} ${FILESDIR}/unix_io_raw.c ${WRKSRC}/libntfs-3g @${CP} ${FILESDIR}/unix_io_raw.c ${WRKSRC}/libntfs-3g

View file

@ -1,3 +1,3 @@
MD5 (ntfs-3g-0.20061115-BETA.tgz) = 9a0c1a3d2a27deaeda6c39003e9f57c4 MD5 (ntfs-3g-0.20070102-BETA.tgz) = 3f03bae2ef34c7adb7a3aece6c921f94
SHA256 (ntfs-3g-0.20061115-BETA.tgz) = 07688def198062931fab960e3c44bfd083e109e5e15f4c9d429b824d7c83c2cb SHA256 (ntfs-3g-0.20070102-BETA.tgz) = 28f1fc26257802055275976dd9c606ac913d3caedd3c0a7b28538d234da8fee6
SIZE (ntfs-3g-0.20061115-BETA.tgz) = 559073 SIZE (ntfs-3g-0.20070102-BETA.tgz) = 561276

View file

@ -0,0 +1,16 @@
--- src/Makefile.in.orig Tue Jan 2 02:21:12 2007
+++ src/Makefile.in Thu Jan 11 03:38:55 2007
@@ -521,11 +521,11 @@
install-data-am: install-man
@$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+# $(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-exec-am: install-binPROGRAMS
@$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+# $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-info: install-info-am

View file

@ -60,6 +60,7 @@
#include "debug.h" #include "debug.h"
#include "device.h" #include "device.h"
#include "logging.h" #include "logging.h"
#include "misc.h"
typedef struct { typedef struct {
int fd; int fd;
@ -149,7 +150,8 @@ raw_io_pwrite(struct ntfs_device *dev, const char *buf, size_t count, s64 offset
* *
* Returns: * Returns:
*/ */
static int ntfs_device_unix_raw_io_open(struct ntfs_device *dev, int flags) static int
ntfs_device_unix_raw_io_open(struct ntfs_device *dev, int flags)
{ {
#if 0 #if 0
struct flock flk; struct flock flk;
@ -168,7 +170,7 @@ static int ntfs_device_unix_raw_io_open(struct ntfs_device *dev, int flags)
if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode)) if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode))
NDevSetBlock(dev); NDevSetBlock(dev);
dev->d_private = malloc(sizeof(unix_raw_fd)); dev->d_private = ntfs_malloc(sizeof(unix_raw_fd));
if (!dev->d_private) if (!dev->d_private)
return -1; return -1;
DEV_FD(dev)->fd = -1; DEV_FD(dev)->fd = -1;
@ -232,7 +234,8 @@ err_out:
* *
* Returns: * Returns:
*/ */
static int ntfs_device_unix_raw_io_close(struct ntfs_device *dev) static int
ntfs_device_unix_raw_io_close(struct ntfs_device *dev)
{ {
#if 0 #if 0
struct flock flk; struct flock flk;
@ -275,8 +278,8 @@ static int ntfs_device_unix_raw_io_close(struct ntfs_device *dev)
* *
* Returns: * Returns:
*/ */
static s64 ntfs_device_unix_raw_io_seek(struct ntfs_device *dev, s64 offset, static s64
int whence) ntfs_device_unix_raw_io_seek(struct ntfs_device *dev, s64 offset, int whence)
{ {
s64 abs_pos; s64 abs_pos;
@ -310,17 +313,18 @@ static s64 ntfs_device_unix_raw_io_seek(struct ntfs_device *dev, s64 offset,
} }
/** /**
* ntfs_device_unix_raw_io_read - Read from the device, from the current location * ntfs_device_unix_raw_io_pread - Perform a positioned read from the device
* @dev: * @dev:
* @buf: * @buf:
* @count: * @count:
* @offset:
* *
* Description... * Description...
* *
* Returns: * Returns:
*/ */
static s64 ntfs_device_unix_raw_io_read(struct ntfs_device *dev, void *buf, static s64
s64 count) ntfs_device_unix_raw_io_pread(struct ntfs_device *dev, void *buf, s64 count, s64 offset)
{ {
s64 start, start_aligned; s64 start, start_aligned;
s64 end, end_aligned; s64 end, end_aligned;
@ -329,17 +333,11 @@ static s64 ntfs_device_unix_raw_io_read(struct ntfs_device *dev, void *buf,
ssize_t nr; ssize_t nr;
/* short-circuit for regular files */ /* short-circuit for regular files */
start = DEV_FD(dev)->pos; start = offset;
if (count > RAW_IO_MAX_SIZE) if (count > RAW_IO_MAX_SIZE)
count = RAW_IO_MAX_SIZE; count = RAW_IO_MAX_SIZE;
if (RAW_IO_ALIGNED(dev, start, count)) { if (RAW_IO_ALIGNED(dev, start, count))
nr = raw_io_pread(dev, buf, count, start); return raw_io_pread(dev, buf, count, start);
if (nr <= 0)
return nr;
DEV_FD(dev)->pos += nr;
return nr;
}
/* /*
* +- start_aligned +- end_aligned * +- start_aligned +- end_aligned
@ -363,9 +361,9 @@ static s64 ntfs_device_unix_raw_io_read(struct ntfs_device *dev, void *buf,
start, start_aligned, end, end_aligned); start, start_aligned, end, end_aligned);
/* allocate buffer */ /* allocate buffer */
buf_aligned = malloc(count_aligned); buf_aligned = ntfs_malloc(count_aligned);
if (buf_aligned == NULL) { if (buf_aligned == NULL) {
ntfs_log_trace("malloc(%d) failed\n", count_aligned); ntfs_log_trace("ntfs_malloc(%d) failed\n", count_aligned);
return -1; return -1;
} }
@ -385,22 +383,22 @@ static s64 ntfs_device_unix_raw_io_read(struct ntfs_device *dev, void *buf,
nr -= start - start_aligned; nr -= start - start_aligned;
if (nr > count) if (nr > count)
nr = count; nr = count;
DEV_FD(dev)->pos += nr;
return nr; return nr;
} }
/** /**
* ntfs_device_unix_raw_io_write - Write to the device, at the current location * ntfs_device_unix_raw_io_pwrite - Perform a positioned write to the device
* @dev: * @dev:
* @buf: * @buf:
* @count: * @count:
* @offset:
* *
* Description... * Description...
* *
* Returns: * Returns:
*/ */
static s64 ntfs_device_unix_raw_io_write(struct ntfs_device *dev, const void *buf, static s64
s64 count) ntfs_device_unix_raw_io_pwrite(struct ntfs_device *dev, const void *buf, s64 count, s64 offset)
{ {
s64 start, start_aligned; s64 start, start_aligned;
s64 end, end_aligned; s64 end, end_aligned;
@ -415,17 +413,11 @@ static s64 ntfs_device_unix_raw_io_write(struct ntfs_device *dev, const void *bu
NDevSetDirty(dev); NDevSetDirty(dev);
/* short-circuit for regular files */ /* short-circuit for regular files */
start = DEV_FD(dev)->pos; start = offset;
if (count > RAW_IO_MAX_SIZE) if (count > RAW_IO_MAX_SIZE)
count = RAW_IO_MAX_SIZE; count = RAW_IO_MAX_SIZE;
if (RAW_IO_ALIGNED(dev, start, count)) { if (RAW_IO_ALIGNED(dev, start, count))
nw = raw_io_pwrite(dev, buf, count, start); return raw_io_pwrite(dev, buf, count, start);
if (nw <= 0)
return nw;
DEV_FD(dev)->pos += nw;
return nw;
}
/* /*
* +- start_aligned +- end_aligned * +- start_aligned +- end_aligned
@ -449,9 +441,9 @@ static s64 ntfs_device_unix_raw_io_write(struct ntfs_device *dev, const void *bu
start, start_aligned, end, end_aligned); start, start_aligned, end, end_aligned);
/* allocate buffer */ /* allocate buffer */
buf_aligned = malloc(count_aligned); buf_aligned = ntfs_malloc(count_aligned);
if (buf_aligned == NULL) { if (buf_aligned == NULL) {
ntfs_log_trace("malloc(%d) failed\n", count_aligned); ntfs_log_trace("ntfs_malloc(%d) failed\n", count_aligned);
return -1; return -1;
} }
@ -483,48 +475,48 @@ static s64 ntfs_device_unix_raw_io_write(struct ntfs_device *dev, const void *bu
nw -= start - start_aligned; nw -= start - start_aligned;
if (nw > count) if (nw > count)
nw = count; nw = count;
DEV_FD(dev)->pos += nw;
return nw; return nw;
} }
/** /**
* ntfs_device_unix_raw_io_pread - Perform a positioned read from the device * ntfs_device_unix_raw_io_read - Read from the device, from the current location
* @dev: * @dev:
* @buf: * @buf:
* @count: * @count:
* @offset:
* *
* Description... * Description...
* *
* Returns: * Returns:
*/ */
static s64 ntfs_device_unix_raw_io_pread(struct ntfs_device *dev, void *buf, static s64
s64 count, s64 offset) ntfs_device_unix_raw_io_read(struct ntfs_device *dev, void *buf, s64 count)
{ {
return ntfs_pread(dev, offset, count, buf); s64 nr = ntfs_device_unix_raw_io_pread(
dev, buf, count, DEV_FD(dev)->pos);
if (nr > 0)
DEV_FD(dev)->pos += nr;
return nr;
} }
/** /**
* ntfs_device_unix_raw_io_pwrite - Perform a positioned write to the device * ntfs_device_unix_raw_io_write - Write to the device, at the current location
* @dev: * @dev:
* @buf: * @buf:
* @count: * @count:
* @offset:
* *
* Description... * Description...
* *
* Returns: * Returns:
*/ */
static s64 ntfs_device_unix_raw_io_pwrite(struct ntfs_device *dev, const void *buf, static s64
s64 count, s64 offset) ntfs_device_unix_raw_io_write(struct ntfs_device *dev, const void *buf,
s64 count)
{ {
if (NDevReadOnly(dev)) { s64 nw = ntfs_device_unix_raw_io_pwrite(
errno = EROFS; dev, buf, count, DEV_FD(dev)->pos);
return -1; if (nw > 0)
} DEV_FD(dev)->pos += nw;
NDevSetDirty(dev); return nw;
return ntfs_pwrite(dev, offset, count, buf);
} }
/** /**
@ -535,7 +527,8 @@ static s64 ntfs_device_unix_raw_io_pwrite(struct ntfs_device *dev, const void *b
* *
* Returns: * Returns:
*/ */
static int ntfs_device_unix_raw_io_sync(struct ntfs_device *dev) static int
ntfs_device_unix_raw_io_sync(struct ntfs_device *dev)
{ {
if (!NDevReadOnly(dev)) { if (!NDevReadOnly(dev)) {
int res = fsync(DEV_FD(dev)->fd); int res = fsync(DEV_FD(dev)->fd);
@ -555,7 +548,8 @@ static int ntfs_device_unix_raw_io_sync(struct ntfs_device *dev)
* *
* Returns: * Returns:
*/ */
static int ntfs_device_unix_raw_io_stat(struct ntfs_device *dev, struct stat *buf) static int
ntfs_device_unix_raw_io_stat(struct ntfs_device *dev, struct stat *buf)
{ {
return fstat(DEV_FD(dev)->fd, buf); return fstat(DEV_FD(dev)->fd, buf);
} }
@ -570,8 +564,8 @@ static int ntfs_device_unix_raw_io_stat(struct ntfs_device *dev, struct stat *bu
* *
* Returns: * Returns:
*/ */
static int ntfs_device_unix_raw_io_ioctl(struct ntfs_device *dev, int request, static int
void *argp) ntfs_device_unix_raw_io_ioctl(struct ntfs_device *dev, int request, void *argp)
{ {
return ioctl(DEV_FD(dev)->fd, request, argp); return ioctl(DEV_FD(dev)->fd, request, argp);
} }