From nobody@FreeBSD.org  Wed May 30 02:01:09 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C01B106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 May 2012 02:01:09 +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 276128FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 May 2012 02:01:09 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U218sd077656
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 May 2012 02:01:08 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q4U218ka077655;
	Wed, 30 May 2012 02:01:08 GMT
	(envelope-from nobody)
Message-Id: <201205300201.q4U218ka077655@red.freebsd.org>
Date: Wed, 30 May 2012 02:01:08 GMT
From: Boris Kochergin <spawk@acm.poly.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: fsck_msdosfs(8) missing newline in output
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         168447
>Category:       bin
>Synopsis:       fsck_msdosfs(8) missing newline in output
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 30 02:10:02 UTC 2012
>Closed-Date:    Thu Dec 06 08:38:28 UTC 2012
>Last-Modified:  Thu Dec 06 08:38:28 UTC 2012
>Originator:     Boris Kochergin
>Release:        9.0-RELEASE
>Organization:
New York Internet
>Environment:
FreeBSD t40 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 10:49:39 EST 2012     root@t42:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
fsck_msdosfs(8) doesn't print a newline at the end of its output in the event that the device you want to check does not exist:

# fsck_msdosfs /dev/da0
** /dev/da0
Can't open (No such file or directory)root@t40 /root

Bug also exists in -CURRENT.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- /usr/src/sbin/fsck_msdosfs/check.c.orig	2012-05-29 21:46:19.000000000 -0400
+++ /usr/src/sbin/fsck_msdosfs/check.c	2012-05-29 21:47:39.000000000 -0400
@@ -31,6 +31,7 @@
   "$FreeBSD: src/sbin/fsck_msdosfs/check.c,v 1.14 2010/06/20 09:40:54 brian Exp $";
 #endif /* not lint */
 
+#include <errno.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
@@ -67,7 +68,7 @@
 		printf("\n");
 
 	if (dosfs < 0) {
-		perror("Can't open");
+		printf("Can't open (%s)\n", strerror(errno));
 		return 8;
 	}
 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jh 
Responsible-Changed-By: jh 
Responsible-Changed-When: Sat Nov 3 09:15:29 UTC 2012 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168447 
State-Changed-From-To: open->patched 
State-Changed-By: jh 
State-Changed-When: Sat Nov 3 09:18:49 UTC 2012 
State-Changed-Why:  
Patched in head (r242511). Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168447 
State-Changed-From-To: patched->closed 
State-Changed-By: jh 
State-Changed-When: Thu Dec 6 08:38:27 UTC 2012 
State-Changed-Why:  
Fixed in head, stable/9 and stable/8. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168447 
>Unformatted:
