Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/usr.sbin/vnconfig Pull up revision 1.33 (requested by hub...



details:   https://anonhg.NetBSD.org/src/rev/fdaa68584f08
branches:  netbsd-3
changeset: 576895:fdaa68584f08
user:      riz <riz%NetBSD.org@localhost>
date:      Sun Aug 14 21:14:03 2005 +0000

description:
Pull up revision 1.33 (requested by hubertf in ticket #625):
Add support for reading cloop2 compressed filesystem images,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.

diffstat:

 usr.sbin/vnconfig/vnconfig.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (56 lines):

diff -r e195efb8bcc7 -r fdaa68584f08 usr.sbin/vnconfig/vnconfig.c
--- a/usr.sbin/vnconfig/vnconfig.c      Sun Aug 14 21:14:01 2005 +0000
+++ b/usr.sbin/vnconfig/vnconfig.c      Sun Aug 14 21:14:03 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnconfig.c,v 1.31 2004/04/21 01:05:48 christos Exp $   */
+/*     $NetBSD: vnconfig.c,v 1.31.2.1 2005/08/14 21:14:03 riz Exp $    */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -139,6 +139,7 @@
 int    verbose = 0;
 int    readonly = 0;
 int    force = 0;
+int    compressed = 0;
 char   *tabname;
 
 int    config __P((char *, char *, char *, int));
@@ -154,7 +155,7 @@
 {
        int ch, rv, action = VND_CONFIG;
 
-       while ((ch = getopt(argc, argv, "Fcf:lrt:uv")) != -1) {
+       while ((ch = getopt(argc, argv, "Fcf:lrt:uvz")) != -1) {
                switch (ch) {
                case 'F':
                        force = 1;
@@ -181,6 +182,10 @@
                case 'v':
                        verbose = 1;
                        break;
+               case 'z':
+                       compressed = 1;
+                       readonly = 1;
+                       break;
                default:
                case '?':
                        usage();
@@ -314,6 +319,9 @@
        if (readonly)
                vndio.vnd_flags |= VNDIOF_READONLY;
 
+       if (compressed)
+               vndio.vnd_flags |= VNF_COMP;
+
        /*
         * Clear (un-configure) the device
         */
@@ -409,7 +417,7 @@
 {
 
        (void)fprintf(stderr, "%s%s",
-           "usage: vnconfig [-crv] [-f disktab] [-t typename] vnode_disk"
+           "usage: vnconfig [-crvz] [-f disktab] [-t typename] vnode_disk"
                " regular-file [geomspec]\n",
            "       vnconfig -u [-Fv] vnode_disk\n"
            "       vnconfig -l [vnode_disk]\n");



Home | Main Index | Thread Index | Old Index