Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 1998 10:03:58 -0600 (MDT)
From:      Lyndon Nerenberg <lyndon@ve7tcp.ampr.org>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/6997: vnconfig "open" error message confusing
Message-ID:  <199806191603.KAA27837@ve7tcp.ampr.org>

next in thread | raw e-mail | index | archive | help

>Number:         6997
>Category:       bin
>Synopsis:       vnconfig "open" error message confusing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 19 09:10:01 PDT 1998
>Last-Modified:
>Originator:     Lyndon Nerenberg
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>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;
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806191603.KAA27837>