From owner-freebsd-ports@FreeBSD.ORG Fri Jan 20 11:40:22 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6130D16A420 for ; Fri, 20 Jan 2006 11:40:22 +0000 (GMT) (envelope-from freebsd-ports@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2B6743D49 for ; Fri, 20 Jan 2006 11:40:21 +0000 (GMT) (envelope-from freebsd-ports@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Ezucs-0003VM-Ks for freebsd-ports@freebsd.org; Fri, 20 Jan 2006 12:40:18 +0100 Received: from www.creo.hu ([217.113.62.14]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Jan 2006 12:40:18 +0100 Received: from csaba-ml by www.creo.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Jan 2006 12:40:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-ports@freebsd.org From: Csaba Henk Date: Fri, 20 Jan 2006 11:12:12 +0000 (UTC) Lines: 118 Message-ID: X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: www.creo.hu User-Agent: slrn/0.9.8.1 (FreeBSD) Sender: news Subject: ntfsprogs: ntfsmount update X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2006 11:40:22 -0000 Hi! sysutils/fusefs-libs has been upgraded recently. This upgrade breaks sysutils/ntfsprogs compilation with FUSE support enabled. The patch below lets ntfsprogs compile against current fusefs-libs. Note that if it's applied, then in turn it breaks compilation against the old fusefs-libs port, so the Makefile should then be adjusted to require at least fusefs-libs 2.5.0. Regards, Csaba [patch 'till bottom] --- 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();