head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.36 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.34 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.32 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.30 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.28 pkgsrc-2009Q4-base:1.3 pkgsrc-2008Q4:1.3.0.26 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.24 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.22 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.20 pkgsrc-2008Q2-base:1.3 pkgsrc-2008Q1:1.3.0.18 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.16 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.14 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.12 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.10 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.8 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.6 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.4 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.2 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.1.1.1.0.10 pkgsrc-2005Q4-base:1.1.1.1 pkgsrc-2005Q3:1.1.1.1.0.8 pkgsrc-2005Q3-base:1.1.1.1 pkgsrc-2005Q2:1.1.1.1.0.6 pkgsrc-2005Q2-base:1.1.1.1 pkgsrc-2005Q1:1.1.1.1.0.4 pkgsrc-2005Q1-base:1.1.1.1 pkgsrc-2004Q4:1.1.1.1.0.2 pkgsrc-2004Q4-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2006.03.03.10.15.46; author adam; state dead; branches; next 1.2; 1.2 date 2006.01.26.21.43.51; author adam; state Exp; branches; next 1.1; 1.1 date 2004.10.05.12.39.38; author agc; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2004.10.05.12.39.38; author agc; state Exp; branches; next ; desc @@ 1.3 log @Changes 1.13.0: * mkntfs now creates NTFS 3.1 (Windows XP) volumes by default * ntfsmount can deal with symbolic links and device files * bug fixes and improvements @ text @$NetBSD: patch-ad,v 1.2 2006/01/26 21:43:51 adam Exp $ --- libntfs/debug.c.orig 2004-09-09 09:54:06.000000000 +0200 +++ libntfs/debug.c @@@@ -25,18 +25,20 @@@@ #include "attrib.h" #include "debug.h" +FILE *ntfs_err_out = stderr; + /** - * Sprintf - silencable output to stderr - * @@silent: if 0 string is output to stderr + * Sprintf - silencable output to ntfs_err_out + * @@silent: if 0 string is output to ntfs_err_out * @@fmt: printf style format string * @@...: optional arguments for the printf style format string * - * If @@silent is 0, output the string @@fmt to stderr. + * If @@silent is 0, output the string @@fmt to ntfs_err_out. * * This is basically a replacement for: * * if (!silent) - * fprintf(stderr, fmt, ...); + * fprintf(ntfs_err_out, fmt, ...); * * It is more convenient to use Sprintf instead of the above code and perhaps * more importantly, Sprintf makes it much easier to turn it into a "do @@@@ -48,18 +50,22 @@@@ void __Sprintf(const int silent, const c int eo; va_list ap; - if (silent) + if (silent || !ntfs_err_out) return; eo = errno; va_start(ap, fmt); - vfprintf(stderr, fmt, ap); + vfprintf(ntfs_err_out, fmt, ap); va_end(ap); + fflush(ntfs_err_out); errno = eo; } #ifdef DEBUG -/* Debug output to stderr. To get it run ./configure --enable-debug. */ +#ifdef HAVE_STRING_H +#include +#endif +/* Debug output to ntfs_err_out. To get it run ./configure --enable-debug. */ void __ntfs_error(const char *function, const char *fmt, ...) { @@@@ -68,13 +74,16 @@@@ void __ntfs_error(const char *function, va_list args; char err_buf[1024]; + if (!ntfs_err_out) + return; if (function) flen = strlen(function); va_start(args, fmt); - vsnprintf(err_buf, sizeof(err_buf), fmt, args); + vsnprintf(ntfs_err_out, sizeof(err_buf), fmt, args); va_end(args); - fprintf(stderr, "NTFS error: %s(): %s\n", flen ? function : "", + fprintf(ntfs_err_out, "NTFS error: %s(): %s\n", flen ? function : "", err_buf); + fflush(ntfs_err_out); errno = eo; } @@@@ -86,13 +95,16 @@@@ void __ntfs_debug (const char *file, int va_list args; char err_buf[1024]; + if (!ntfs_err_out) + return; if (function) flen = strlen(function); va_start(args, fmt); - vsnprintf(err_buf, sizeof(err_buf), fmt, args); + vsnprintf(ntfs_err_out, sizeof(err_buf), fmt, args); va_end(args); - fprintf(stderr, "NTFS DEBUG (%s, %d): %s(): %s\n", file, line, + fprintf(ntfs_err_out, "NTFS DEBUG (%s, %d): %s(): %s\n", file, line, flen ? function : "", err_buf); + fflush(ntfs_err_out); errno = eo; } @@@@ -101,16 +113,23 @@@@ void __Dprintf(const char *fmt, ...) int eo = errno; va_list ap; + if (!ntfs_err_out) + return; va_start(ap, fmt); - vfprintf(stderr, fmt, ap); + vfprintf(ntfs_err_out, fmt, ap); va_end(ap); + fflush(ntfs_err_out); errno = eo; } void __Dputs(const char *s) { int eo = errno; - fprintf(stderr, "%s\n", s); + + if (!ntfs_err_out) + return; + fprintf(ntfs_err_out, "%s\n", s); + fflush(ntfs_err_out); errno = eo; } @ 1.2 log @Changes 1.12.1: - Fix hardcoded location for uninstalling mount.ntfs-fuse hardlink to match the relocatable location for installing it. - Move mount.ntfs-fuse and mkfs.ntfs to be symlinks instead of hardlinks and move both to /sbin rather than prefix/sbin. Note we still obey $destdir so building packages works as well as installing into alternate chroot / other system still works. - ntfscmp: fix some corner cases and all memory leaks; handle corrupt NTFS more gracefully. - If the system does not have realpath(), supply our own dummy version which just copies the string without any kind of checking or expansion. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Initial revision @ text @d3 1 a3 1 --- libntfs/debug.c.orig Sat Sep 4 06:16:32 2004 d30 1 a30 1 @@@@ -48,41 +50,61 @@@@ a51 1 + d54 1 a54 1 void __Dprintf(const char *fmt, ...) d56 39 a119 16 void __Dperror(const char *s) { int eo = errno; - perror(s); + + if (!ntfs_err_out) + return; + if (s && s[0]) { + fprintf(ntfs_err_out, "%s: %s\n", s, strerror(eo)); + } else { + fprintf(ntfs_err_out, "%s\n", strerror(eo)); + } + fflush(ntfs_err_out); errno = eo; } @ 1.1.1.1 log @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. @ text @@