From owner-svn-src-all@FreeBSD.ORG Fri Jan 2 08:21:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A0A4106564A; Fri, 2 Jan 2009 08:21:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 862C68FC08; Fri, 2 Jan 2009 08:21:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n028LLdg091686; Fri, 2 Jan 2009 08:21:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n028LLPa091685; Fri, 2 Jan 2009 08:21:21 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901020821.n028LLPa091685@svn.freebsd.org> From: Warner Losh Date: Fri, 2 Jan 2009 08:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186696 - head/usr.sbin/fwcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 08:21:22 -0000 Author: imp Date: Fri Jan 2 08:21:21 2009 New Revision: 186696 URL: http://svn.freebsd.org/changeset/base/186696 Log: Add fd = -1 after close when we detect the format so that subsequent open_dev will reopen the device. Modified: head/usr.sbin/fwcontrol/fwcontrol.c Modified: head/usr.sbin/fwcontrol/fwcontrol.c ============================================================================== --- head/usr.sbin/fwcontrol/fwcontrol.c Fri Jan 2 07:25:30 2009 (r186695) +++ head/usr.sbin/fwcontrol/fwcontrol.c Fri Jan 2 08:21:21 2009 (r186696) @@ -1065,6 +1065,7 @@ main(int argc, char **argv) if (recvfn == NULL) { /* guess... */ recvfn = detect_recv_fn(fd, TAG | CHANNEL); close(fd); + fd = -1; } snprintf(devbase, sizeof(devbase), "%s%d.0", device_string, current_board); if (open_dev(&fd, devbase) < 0)