From owner-freebsd-bugs@FreeBSD.ORG Sun Nov 23 04:20:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7205106567A for ; Sun, 23 Nov 2008 04:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8B4178FC12 for ; Sun, 23 Nov 2008 04:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mAN4K1N9043129 for ; Sun, 23 Nov 2008 04:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mAN4K1mg043128; Sun, 23 Nov 2008 04:20:01 GMT (envelope-from gnats) Resent-Date: Sun, 23 Nov 2008 04:20:01 GMT Resent-Message-Id: <200811230420.mAN4K1mg043128@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D9681065672 for ; Sun, 23 Nov 2008 04:16:16 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 33E708FC08 for ; Sun, 23 Nov 2008 04:16:16 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mAN4GGWo065665 for ; Sun, 23 Nov 2008 04:16:16 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mAN4GFdu065664; Sun, 23 Nov 2008 04:16:15 GMT (envelope-from nobody) Message-Id: <200811230416.mAN4GFdu065664@www.freebsd.org> Date: Sun, 23 Nov 2008 04:16:15 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/129078: Bug in hexsyntax.c:new_syntax -- literal instead of escaped newline used X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2008 04:20:01 -0000 >Number: 129078 >Category: misc >Synopsis: Bug in hexsyntax.c:new_syntax -- literal instead of escaped newline used >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 23 04:20:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 8-CURRENT >Organization: n/a >Environment: FreeBSD optimus.gateway.2wire.net 8.0-CURRENT FreeBSD 8.0-CURRENT #5: Thu Nov 20 23:31:07 PST 2008 gcooper@optimus.gateway.2wire.net:/usr/obj/usr/src/sys/OPTIMUS amd64 >Description: Found this minor typo bug while trying to correct the other PR's assigned to me related to hexdump. At first glance it doesn't appear to fix anything, but I could be wrong. >How-To-Repeat: Unsure. >Fix: Patch attached with submission follows: Index: hexsyntax.c =================================================================== --- hexsyntax.c (revision 185157) +++ hexsyntax.c (working copy) @@ -65,7 +65,8 @@ add("\"%08.8_ax \" 8/1 \"%02x \" \" \" 8/1 \"%02x \" "); add("\" |\" 16/1 \"%_p\" \"|\\n\""); } - while ((ch = getopt(argc, argv, "bcCde:f:n:os:vx")) != -1) + while ((ch = getopt(argc, argv, "bcCde:f:n:os:vx")) != -1) { + switch (ch) { case 'b': add("\"%07.7_Ax\n\""); @@ -124,8 +125,10 @@ usage(); } + } + if (!fshead) { - add("\"%07.7_Ax\n\""); + add("\"%07.7_Ax\\n\""); add("\"%07.7_ax \" 8/2 \"%04x \" \"\\n\""); } >Release-Note: >Audit-Trail: >Unformatted: