From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jan 4 03:50:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 96E58FFB for ; Fri, 4 Jan 2013 03:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7AF6A7BF for ; Fri, 4 Jan 2013 03:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id r043o0uV096044 for ; Fri, 4 Jan 2013 03:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id r043o03R096043; Fri, 4 Jan 2013 03:50:00 GMT (envelope-from gnats) Resent-Date: Fri, 4 Jan 2013 03:50:00 GMT Resent-Message-Id: <201301040350.r043o03R096043@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eric Krausser Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F3055FC8 for ; Fri, 4 Jan 2013 03:43:57 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id B3EC07A3 for ; Fri, 4 Jan 2013 03:43:57 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r043hvtg085183 for ; Fri, 4 Jan 2013 03:43:57 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r043hvSv085182; Fri, 4 Jan 2013 03:43:57 GMT (envelope-from nobody) Message-Id: <201301040343.r043hvSv085182@red.freebsd.org> Date: Fri, 4 Jan 2013 03:43:57 GMT From: Eric Krausser To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/174960: sysutils/fusefs-ntfs mkntfs fails because of "no block device" X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 03:50:00 -0000 >Number: 174960 >Category: ports >Synopsis: sysutils/fusefs-ntfs mkntfs fails because of "no block device" >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 04 03:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Eric Krausser >Release: 9.1-RELEASE amd64 >Organization: private >Environment: FreeBSD schleppi.local 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Formatting a device with mkntfs fails, because "no block device" given. Please check ports/144852 This issue in sysutils/ntfsprogs is also valid for sysutils/fusefs-ntfs 2012.1.15, but in sysutils/ntfsprogs it's fixed with the appending patch. I guess more fixes and features from sysutils/ntfsprogs could be applied to improve sysutils/fusefs-ntfs, so sysutils/ntfsprogs should be obsolete. >How-To-Repeat: 1) install sysutils/fusefs-ntfs and load fuse.ko with /usr/local/etc/rc.d/fusefs onestart 2) create a device, e.g. "mdconfig -a -t malloc -s 16m -u 123" 3) try to format device with NTFS "mkntfs /dev/md123 /mnt/ntfs", it fails >Fix: copy the patch from /ports/sysutils/ntfsprogs/files/patch-ntfsprogs-mkntfs.c to /ports/sysutils/fusefs-ntfs/files/patch-ntfsprogs-mkntfs.c and reinstall the port sysutils/fusefs-ntfs Patch attached with submission follows: --- ntfsprogs/mkntfs.c 2007-09-19 18:51:09.000000000 +0200 +++ ntfsprogs/mkntfs.c 2010-03-16 17:26:42.000000000 +0100 @@ -552,12 +552,16 @@ total = 0LL; retry = 0; do { - bytes_written = dev->d_ops->write(dev, b, count); + bytes_written = (long long)dev->d_ops->write(dev, b, count); if (bytes_written == -1LL) { retry = errno; ntfs_log_perror("Error writing to %s", dev->d_name); errno = retry; return bytes_written; + } else if (bytes_written < 0) { + errno = EINVAL; + ntfs_log_error("Failed to write to device %s.\n", dev->d_name); + return -1; } else if (!bytes_written) { retry++; } else { @@ -3072,8 +3076,8 @@ goto done; } - if (!S_ISBLK(sbuf.st_mode)) { - ntfs_log_error("%s is not a block device.\n", vol->dev->d_name); + if (!S_ISCHR(sbuf.st_mode)) { + ntfs_log_error("%s is not a character device.\n", vol->dev->d_name); if (!opts.force) { ntfs_log_error("Refusing to make a filesystem here!\n"); goto done; >Release-Note: >Audit-Trail: >Unformatted: