FreeBSD Bugzilla – Attachment 65249 Details for
Bug 96744
[UPDATE] sysutils/ntfsprogs to 1.13.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 13.99 KB, created by
Martin Matuska
on 2006-05-04 04:10:13 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Martin Matuska
Created:
2006-05-04 04:10:13 UTC
Size:
13.99 KB
patch
obsolete
>diff -Nbur sysutils/ntfsprogs.orig/Makefile sysutils/ntfsprogs/Makefile >--- sysutils/ntfsprogs.orig/Makefile Thu May 4 05:02:50 2006 >+++ sysutils/ntfsprogs/Makefile Thu May 4 05:01:52 2006 >@@ -6,8 +6,7 @@ > # > > PORTNAME= ntfsprogs >-PORTVERSION= 1.12.1 >-PORTREVISION= 1 >+PORTVERSION= 1.13.0 > CATEGORIES= sysutils > MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} > MASTER_SITE_SUBDIR= linux-ntfs >@@ -22,6 +21,7 @@ > WANT_GNOME= yes > INSTALLS_SHLIB= yes > CONFIGURE_ARGS= --program-transform-name="" >+CONFIGURE_ENV+= PKG_CONFIG=${LOCALBASE}/bin/pkg-config > CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} > > OPTIONS= GNOMEVFS2 "Install GnomeVFS 2.0 libntfs interface" off \ >@@ -59,7 +59,7 @@ > CONFIGURE_ARGS+=--enable-fuse-module > PLIST_SUB+= FUSE="" > USE_GNOME+= pkgconfig >-BUILD_DEPENDS+= fusefs-libs>2.4:${PORTSDIR}/sysutils/fusefs-libs >+BUILD_DEPENDS+= fusefs-libs>2.5:${PORTSDIR}/sysutils/fusefs-libs > MLINKS+= ntfsmount.8 mount.ntfs-fuse.8 > .else > CONFIGURE_ARGS+=--disable-fuse-module >diff -Nbur sysutils/ntfsprogs.orig/distinfo sysutils/ntfsprogs/distinfo >--- sysutils/ntfsprogs.orig/distinfo Thu May 4 05:02:50 2006 >+++ sysutils/ntfsprogs/distinfo Thu May 4 03:55:44 2006 >@@ -1,3 +1,3 @@ >-MD5 (ntfsprogs-1.12.1.tar.gz) = 607b86d45ab65cf9db2255669545006e >-SHA256 (ntfsprogs-1.12.1.tar.gz) = 819085b87b48d8cac5bee125f2b56b93ae08354ca2cf212bf381ea001e1e490a >-SIZE (ntfsprogs-1.12.1.tar.gz) = 801124 >+MD5 (ntfsprogs-1.13.0.tar.gz) = 4679cf54fb37527503d7ad44ec5376a8 >+SHA256 (ntfsprogs-1.13.0.tar.gz) = a74aa19dca47c4744d0e1245687b54f0a0028e80a9b6e2ce99ba19fd8e168d57 >+SIZE (ntfsprogs-1.13.0.tar.gz) = 860532 >diff -Nbur sysutils/ntfsprogs.orig/files/patch-512b_blocks sysutils/ntfsprogs/files/patch-512b_blocks >--- sysutils/ntfsprogs.orig/files/patch-512b_blocks Thu May 4 05:02:50 2006 >+++ sysutils/ntfsprogs/files/patch-512b_blocks Thu Jan 1 01:00:00 1970 >@@ -1,84 +0,0 @@ >---- libntfs/attrib.c Sat Sep 4 13:16:32 2004 >-+++ libntfs/attrib.c Fri Jul 22 01:05:09 2005 >-@@ -709,9 +709,9 @@ >- */ >- s64 ntfs_attr_pread(ntfs_attr *na, const s64 pos, s64 count, void *b) >- { >-- s64 br, to_read, ofs, total, total2; >-+ s64 br, old_to_read, to_read, ofs, total, total2; >- ntfs_volume *vol; >- runlist_element *rl; >- >- Dprintf("%s(): Entering for inode 0x%llx, attr 0x%x, pos 0x%llx, " >- "count 0x%llx.\n", __FUNCTION__, >-@@ -741,6 +744,7 @@ >- if (pos + count > na->data_size) { >- if (pos >= na->data_size) >- return 0; >-+ Dprintf("trunacting read pos=%lld, na->data_size=%lld, (old) count=%lld\n", pos, na->data_size, count); >- count = na->data_size - pos; >- } >- vol = na->ni->vol; >-@@ -820,6 +825,10 @@ >- /* It is a real lcn, read it into @dst. */ >- to_read = min(count, (rl->length << vol->cluster_size_bits) - >- ofs); >-+ old_to_read = to_read; >-+ to_read = (to_read + 511) / 512 * 512; >-+ if(old_to_read != to_read) >-+ Dprintf("adjusted %lld->%lld\n", old_to_read, to_read); >- retry: >- Dprintf("%s(): Reading 0x%llx bytes from vcn 0x%llx, lcn 0x%llx, " >- "ofs 0x%llx.\n", __FUNCTION__, to_read, >-@@ -828,6 +837,8 @@ >- ofs, to_read, b); >- /* If everything ok, update progress counters and continue. */ >- if (br > 0) { >-+ if(br > old_to_read) >-+ br = old_to_read; >- total += br; >- count -= br; >- b = (u8*)b + br; >---- libntfs/device.c Sat Sep 4 13:16:32 2004 >-+++ libntfs/device.c Mon Jul 11 23:27:55 2005 >-@@ -441,10 +441,10 @@ >- */ >- static inline int ntfs_device_offset_valid(struct ntfs_device *dev, s64 ofs) >- { >-- char ch; >-+ char ch[512]; >- >- if (dev->d_ops->seek(dev, ofs, SEEK_SET) >= 0 && >-- dev->d_ops->read(dev, &ch, 1) == 1) >-+ dev->d_ops->read(dev, &ch, 512) > 0) >- return 0; >- return -1; >- } >---- ntfsprogs/ntfsclone.c Mon Jul 25 12:31:30 2005 >-+++ ntfsprogs/ntfsclone.c Mon Jul 25 12:33:32 2005 >-@@ -1080,9 +1080,9 @@ >- >- static int device_offset_valid(int fd, s64 ofs) >- { >-- char ch; >-+ char ch[512]; >- >-- if (lseek(fd, ofs, SEEK_SET) >= 0 && read(fd, &ch, 1) == 1) >-+ if (lseek(fd, ofs, SEEK_SET) >= 0 && read(fd, &ch, 512) > 0) >- return 0; >- return -1; >- } >---- ntfsprogs/ntfsresize.c Fri Oct 7 23:57:31 2005 >-+++ ntfsprogs/ntfsresize.c Tue Oct 11 13:35:09 2005 >-@@ -1971,6 +1971,11 @@ >- err_exit("Resident attribute in $Bitmap isn't supported!\n"); >- >- bm_bsize = nr_clusters_to_bitmap_byte_size(resize->new_volume_size); >-+ if(bm_bsize % 512 != 0) { >-+ s64 old_bm_bsize = bm_bsize; >-+ bm_bsize = (bm_bsize + 511) / 512 * 512; >-+ Dprintf("adjusted bm_bsize: %lld->%lld\n", old_bm_bsize, bm_bsize); >-+ } >- nr_bm_clusters = rounded_up_division(bm_bsize, vol->cluster_size); >- >- if (resize->shrink) { >diff -Nbur sysutils/ntfsprogs.orig/files/patch-libntfs::attrib.c sysutils/ntfsprogs/files/patch-libntfs::attrib.c >--- sysutils/ntfsprogs.orig/files/patch-libntfs::attrib.c Thu Jan 1 01:00:00 1970 >+++ sysutils/ntfsprogs/files/patch-libntfs::attrib.c Thu May 4 04:45:15 2006 >@@ -0,0 +1,39 @@ >+--- libntfs/attrib.c.orig Fri Feb 24 10:17:49 2006 >++++ libntfs/attrib.c Thu May 4 04:44:07 2006 >+@@ -763,7 +763,7 @@ >+ */ >+ s64 ntfs_attr_pread(ntfs_attr *na, const s64 pos, s64 count, void *b) >+ { >+- s64 br, to_read, ofs, total, total2; >++ s64 br, old_to_read, to_read, ofs, total, total2; >+ ntfs_volume *vol; >+ runlist_element *rl; >+ >+@@ -799,6 +799,7 @@ >+ if (pos + count > na->data_size) { >+ if (pos >= na->data_size) >+ return 0; >++ ntfs_log_trace("trunacting read pos=%lld, na->data_size=%lld, (old) count=%lld\n", pos, na->data_size, count); >+ count = na->data_size - pos; >+ } >+ /* If it is a resident attribute, get the value from the mft record. */ >+@@ -887,6 +888,10 @@ >+ /* It is a real lcn, read it into @dst. */ >+ to_read = min(count, (rl->length << vol->cluster_size_bits) - >+ ofs); >++ old_to_read = to_read; >++ to_read = (to_read + 511) / 512 * 512; >++ if(old_to_read != to_read) >++ ntfs_log_trace("adjusted %lld->%lld\n", old_to_read, to_read); >+ retry: >+ ntfs_log_trace("Reading 0x%llx bytes from vcn 0x%llx, lcn 0x%llx, " >+ "ofs 0x%llx.\n", to_read, rl->vcn, rl->lcn, ofs); >+@@ -894,6 +899,8 @@ >+ ofs, to_read, b); >+ /* If everything ok, update progress counters and continue. */ >+ if (br > 0) { >++ if(br > old_to_read) >++ br = old_to_read; >+ total += br; >+ count -= br; >+ b = (u8*)b + br; >diff -Nbur sysutils/ntfsprogs.orig/files/patch-libntfs::device.c sysutils/ntfsprogs/files/patch-libntfs::device.c >--- sysutils/ntfsprogs.orig/files/patch-libntfs::device.c Thu Jan 1 01:00:00 1970 >+++ sysutils/ntfsprogs/files/patch-libntfs::device.c Thu May 4 04:48:54 2006 >@@ -0,0 +1,15 @@ >+--- libntfs/device.c Sat Sep 4 13:16:32 2004 >++++ libntfs/device.c Mon Jul 11 23:27:55 2005 >+@@ -441,10 +441,10 @@ >+ */ >+ static inline int ntfs_device_offset_valid(struct ntfs_device *dev, s64 ofs) >+ { >+- char ch; >++ char ch[512]; >+ >+ if (dev->d_ops->seek(dev, ofs, SEEK_SET) >= 0 && >+- dev->d_ops->read(dev, &ch, 1) == 1) >++ dev->d_ops->read(dev, &ch, 512) > 0) >+ return 0; >+ return -1; >+ } >diff -Nbur sysutils/ntfsprogs.orig/files/patch-libntfs::unix_io.c sysutils/ntfsprogs/files/patch-libntfs::unix_io.c >--- sysutils/ntfsprogs.orig/files/patch-libntfs::unix_io.c Thu May 4 05:02:50 2006 >+++ sysutils/ntfsprogs/files/patch-libntfs::unix_io.c Thu May 4 04:07:57 2006 >@@ -1,29 +1,29 @@ >---- libntfs/unix_io.c.orig Mon Mar 21 12:16:42 2005 >-+++ libntfs/unix_io.c Mon Mar 21 12:17:19 2005 >-@@ -72,6 +72,7 @@ >+--- libntfs/unix_io.c.orig Sat Feb 4 03:42:15 2006 >++++ libntfs/unix_io.c Thu May 4 03:59:59 2006 >+@@ -110,6 +110,7 @@ > flk.l_type = F_WRLCK; > flk.l_whence = SEEK_SET; > flk.l_start = flk.l_len = 0LL; > +#if 0 > if (fcntl(DEV_FD(dev), F_SETLK, &flk)) { > err = errno; >- Dprintf("ntfs_device_unix_io_open: Could not lock %s for %s: " >-@@ -83,6 +84,7 @@ >- strerror(errno)); >+ ntfs_log_debug("ntfs_device_unix_io_open: Could not lock %s for %s\n", >+@@ -119,6 +120,7 @@ >+ "close %s", dev->d_name); > goto err_out; > } > +#endif >- /* Set our open flag. */ >- NDevSetOpen(dev); >- return 0; >-@@ -108,9 +110,11 @@ >+ /* Determine if device is a block device or not, ignoring errors. */ >+ if (!fstat(DEV_FD(dev), &sbuf) && S_ISBLK(sbuf.st_mode)) >+ NDevSetBlock(dev); >+@@ -155,9 +157,11 @@ > flk.l_type = F_UNLCK; > flk.l_whence = SEEK_SET; > flk.l_start = flk.l_len = 0LL; > +#if 0 > if (fcntl(DEV_FD(dev), F_SETLK, &flk)) >- Dprintf("ntfs_device_unix_io_close: Warning: Could not unlock " >- "%s: %s\n", dev->d_name, strerror(errno)); >+ ntfs_log_perror("ntfs_device_unix_io_close: Warning: Could not " >+ "unlock %s", dev->d_name); > +#endif > /* Close the file descriptor and clear our open flag. */ > if (close(DEV_FD(dev))) >diff -Nbur sysutils/ntfsprogs.orig/files/patch-ntfsprogs::ntfsclone.c sysutils/ntfsprogs/files/patch-ntfsprogs::ntfsclone.c >--- sysutils/ntfsprogs.orig/files/patch-ntfsprogs::ntfsclone.c Thu Jan 1 01:00:00 1970 >+++ sysutils/ntfsprogs/files/patch-ntfsprogs::ntfsclone.c Thu May 4 04:49:04 2006 >@@ -0,0 +1,14 @@ >+--- ntfsprogs/ntfsclone.c Mon Jul 25 12:31:30 2005 >++++ ntfsprogs/ntfsclone.c Mon Jul 25 12:33:32 2005 >+@@ -1080,9 +1080,9 @@ >+ >+ static int device_offset_valid(int fd, s64 ofs) >+ { >+- char ch; >++ char ch[512]; >+ >+- if (lseek(fd, ofs, SEEK_SET) >= 0 && read(fd, &ch, 1) == 1) >++ if (lseek(fd, ofs, SEEK_SET) >= 0 && read(fd, &ch, 512) > 0) >+ return 0; >+ return -1; >+ } >diff -Nbur sysutils/ntfsprogs.orig/files/patch-ntfsprogs::ntfsresize.c sysutils/ntfsprogs/files/patch-ntfsprogs::ntfsresize.c >--- sysutils/ntfsprogs.orig/files/patch-ntfsprogs::ntfsresize.c Thu Jan 1 01:00:00 1970 >+++ sysutils/ntfsprogs/files/patch-ntfsprogs::ntfsresize.c Thu May 4 04:47:31 2006 >@@ -0,0 +1,14 @@ >+--- ntfsprogs/ntfsresize.c.orig Tue Feb 14 12:17:52 2006 >++++ ntfsprogs/ntfsresize.c Thu May 4 04:46:10 2006 >+@@ -1974,6 +1974,11 @@ >+ err_exit("Resident attribute in $Bitmap isn't supported!\n"); >+ >+ bm_bsize = nr_clusters_to_bitmap_byte_size(resize->new_volume_size); >++ if(bm_bsize % 512 != 0) { >++ s64 old_bm_bsize = bm_bsize; >++ bm_bsize = (bm_bsize + 511) / 512 * 512; >++ ntfs_log_verbose("adjusted bm_bsize: %lld->%lld\n", old_bm_bsize, bm_bsize); >++ } >+ nr_bm_clusters = rounded_up_division(bm_bsize, vol->cluster_size); >+ >+ if (resize->shrink) { >diff -Nbur sysutils/ntfsprogs.orig/files/patch-ntfsprogs_ntfsmount.c sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c >--- sysutils/ntfsprogs.orig/files/patch-ntfsprogs_ntfsmount.c Thu May 4 05:02:50 2006 >+++ sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c Thu Jan 1 01:00:00 1970 >@@ -1,103 +0,0 @@ >---- ntfsprogs/Makefile.am.orig Sat Oct 8 00:35:40 2005 >-+++ ntfsprogs/Makefile.am Fri Jan 20 11:26:37 2006 >-@@ -88,7 +88,7 @@ >- ntfsmount_SOURCES = ntfsmount.c utils.c utils.h >- ntfsmount_LDADD = $(AM_LIBS) $(FUSE_MODULE_LIBS) >- ntfsmount_LDFLAGS = $(AM_LFLAGS) >--ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=22 >-+ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=25 >- endif >- >- # We don't distribute these >---- ntfsprogs/Makefile.in.orig Fri Jan 20 11:24:48 2006 >-+++ ntfsprogs/Makefile.in Fri Jan 20 11:26:40 2006 >-@@ -366,7 +366,7 @@ >- @ENABLE_FUSE_MODULE_TRUE@ntfsmount_SOURCES = ntfsmount.c utils.c utils.h >- @ENABLE_FUSE_MODULE_TRUE@ntfsmount_LDADD = $(AM_LIBS) $(FUSE_MODULE_LIBS) >- @ENABLE_FUSE_MODULE_TRUE@ntfsmount_LDFLAGS = $(AM_LFLAGS) >--@ENABLE_FUSE_MODULE_TRUE@ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=22 >-+@ENABLE_FUSE_MODULE_TRUE@ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=25 >- >- # We don't distribute these >- ntfsrm_SOURCES = ntfsrm.c ntfsrm.h utils.c utils.h >---- ntfsprogs/ntfsmount.c.orig Mon Oct 10 14:47:38 2005 >-+++ ntfsprogs/ntfsmount.c Fri Jan 20 11:42:09 2006 >-@@ -81,10 +81,10 @@ >- int state; >- long free_clusters; >- long free_mft; >-- uid_t uid; >-- gid_t gid; >-- mode_t fmask; >-- mode_t dmask; >-+ unsigned int uid; >-+ unsigned int gid; >-+ unsigned int fmask; >-+ unsigned int dmask; >- BOOL ro; >- BOOL show_sys_files; >- BOOL succeed_chmod; >-@@ -196,7 +196,7 @@ >- * Return 0 on success or -errno on error. >- */ >- static int ntfs_fuse_statfs(const char *path __attribute__((unused)), >-- struct statfs *sfs) >-+ struct statvfs *sfs) >- { >- long size; >- ntfs_volume *vol; >-@@ -204,10 +204,10 @@ >- vol = ctx->vol; >- if (!vol) >- return -ENODEV; >-- /* Type of filesystem. */ >-- sfs->f_type = NTFS_SB_MAGIC; >- /* Optimal transfer block size. */ >- sfs->f_bsize = vol->cluster_size; >-+ /* XXX This field needs to be filled, I guess it's fine this way... */ >-+ sfs->f_frsize = vol->cluster_size; >- /* >- * Total data blocks in file system in units of f_bsize and since >- * inodes are also stored in data blocs ($MFT is a file) this is just >-@@ -228,7 +228,7 @@ >- size = 0; >- sfs->f_ffree = size; >- /* Maximum length of filenames. */ >-- sfs->f_namelen = NTFS_MAX_NAME_LEN; >-+ sfs->f_namemax = NTFS_MAX_NAME_LEN; >- return 0; >- } >- >-@@ -1462,8 +1462,9 @@ >- int main(int argc, char *argv[]) >- { >- char *parsed_options; >-+ struct fuse_args margs = FUSE_ARGS_INIT(0, NULL); >- struct fuse *fh; >-- int ffd; >-+ int ffd = 0; >- >- utils_set_locale(); >- signal(SIGINT, signal_handler); >-@@ -1491,7 +1492,20 @@ >- } >- free(opts.device); >- /* Create filesystem. */ >-- ffd = fuse_mount(opts.mnt_point, parsed_options); >-+ /* >-+ * XXX Eventually, ntfsmount should drop it's homebrew option parsing >-+ * routines and use stock ones. Here we don't go that far, we just use the >-+ * FUSE opt parsing API to dummily create the structure which satisfies >-+ * fuse_mount's current signature (that is, revert all the work which >-+ * has been accomplished by the homebrew routine... silly, eh?). >-+ */ >-+ if ((fuse_opt_add_arg(&margs, "") == -1 || >-+ fuse_opt_add_arg(&margs, "-o") == -1 || >-+ fuse_opt_add_arg(&margs, parsed_options) == -1)) >-+ ffd = -1; >-+ if (ffd != -1) >-+ ffd = fuse_mount(opts.mnt_point, &margs); >-+ fuse_opt_free_args(&margs); >- if (ffd == -1) { >- Eprintf("fuse_mount failed.\n"); >- ntfs_fuse_destroy(); >diff -Nbur sysutils/ntfsprogs.orig/pkg-plist sysutils/ntfsprogs/pkg-plist >--- sysutils/ntfsprogs.orig/pkg-plist Thu May 4 05:02:50 2006 >+++ sysutils/ntfsprogs/pkg-plist Thu May 4 04:51:10 2006 >@@ -37,7 +37,7 @@ > lib/libntfs.a > lib/libntfs.la > lib/libntfs.so >-lib/libntfs.so.8 >+lib/libntfs.so.9 > sbin/mkntfs > sbin/mkfs.ntfs > %%FUSE%%sbin/mount.ntfs-fuse
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 96744
: 65249