From lyndon@ve7tcp.ampr.org  Fri Jun 19 09:04:27 1998
Received: from ve7tcp.ampr.org (ve7tcp.ampr.org [198.161.92.132])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA09627
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 19 Jun 1998 09:04:04 -0700 (PDT)
          (envelope-from lyndon@ve7tcp.ampr.org)
Received: (from lyndon@localhost)
	by ve7tcp.ampr.org (8.9.0/8.9.0) id KAA27837;
	Fri, 19 Jun 1998 10:03:58 -0600 (MDT)
Message-Id: <199806191603.KAA27837@ve7tcp.ampr.org>
Date: Fri, 19 Jun 1998 10:03:58 -0600 (MDT)
From: Lyndon Nerenberg <lyndon@ve7tcp.ampr.org>
Reply-To: lyndon@ve7tcp.ampr.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: vnconfig "open" error message confusing
X-Send-Pr-Version: 3.2

>Number:         6997
>Category:       bin
>Synopsis:       [patch] vnconfig "open" error message confusing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 19 09:10:01 PDT 1998
>Closed-Date:    Sun May 14 14:07:01 PDT 2000
>Last-Modified:  Sun May 14 14:07:27 PDT 2000
>Originator:     Lyndon Nerenberg
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

>Description:

If vnconfig can't open the device file, the error isn't too helpful.
It doesn't tall you which file the open failed on.

>How-To-Repeat:

	vnconfig -e /dev/vn0c /u1/SWAP swap

where /dev/vn0c doesn't exist.

>Fix:
	
The following patch replaces "open" with the failed pathname in the call
to warn().


*** vnconfig.c.ORIG	Fri Jun 19 09:56:40 1998
--- vnconfig.c	Fri Jun 19 09:57:26 1998
***************
*** 226,232 ****
  	rdev = rawdevice(dev);
  	f = fopen(rdev, "rw");
  	if (f == NULL) {
! 		warn("open");
  		return(1);
  	}
  	vnio.vn_file = file;
--- 226,232 ----
  	rdev = rawdevice(dev);
  	f = fopen(rdev, "rw");
  	if (f == NULL) {
! 		warn(dev);
  		return(1);
  	}
  	vnio.vn_file = file;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Sat Jun 27 02:47:40 PDT 1998 
State-Changed-Why:  
awaiting committer 
State-Changed-From-To: suspended->closed 
State-Changed-By: obrien 
State-Changed-When: Sun May 14 14:07:01 PDT 2000 
State-Changed-Why:  
committed 
>Unformatted:
