Date: Sun, 9 May 1999 23:57:07 +0900 (JST) From: sanewo@ba2.so-net.ne.jp To: FreeBSD-gnats-submit@freebsd.org Subject: bin/11608: vnconfig not supporting swap-backed vn device except via config file Message-ID: <199905091457.XAA06294@ba2.so-net.ne.jp>
next in thread | raw e-mail | index | archive | help
>Number: 11608 >Category: bin >Synopsis: vnconfig not supporting swap-backed vn device except via config file >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun May 9 08:00:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Takanori Saneto >Release: FreeBSD 4.0-CURRENT i386 >Organization: An individual >Environment: 4.0-CURRENT as of 1999-May-08 >Description: Without using config file (/etc/vntab), there is no way to configure vn device so it is swap-backed. To let vn device know it should be swap-backed, ``vn_file'' argument should be NULL. In vnconfig command, in the case of not using config file, vn_file will always be filled from argv, thus cannot be NULL. In the case of using config file, if ``regular-file'' part is in the form of "%xxx", it is interpreted as a swap-size spec and vn_file will be NULL. (this feature is not documented, BTW) >How-To-Repeat: >Fix: Possible fix is as follows: Index: /usr/src/usr.sbin/vnconfig/vnconfig.c =================================================================== RCS file: /sd0/FreeBSD/cvs/src/usr.sbin/vnconfig/vnconfig.c,v retrieving revision 1.9 diff -u -r1.9 vnconfig.c --- vnconfig.c 1999/03/14 09:20:01 1.9 +++ vnconfig.c 1999/05/08 12:42:21 @@ -196,7 +196,7 @@ if (argc < optind + 1) usage(); vndisks[0].dev = argv[optind++]; - vndisks[0].file = argv[optind++]; + if (!size) vndisks[0].file = argv[optind++]; vndisks[0].flags = flags; vndisks[0].size = size; vndisks[0].autolabel = autolabel; >Release-Note: >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?199905091457.XAA06294>