From owner-freebsd-current@FreeBSD.ORG Sun Jul 20 12:08:14 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 048AD37B401 for ; Sun, 20 Jul 2003 12:08:14 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D32343FAF for ; Sun, 20 Jul 2003 12:08:08 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9/8.12.3) with ESMTP id h6KJ7eFL033468 for ; Sun, 20 Jul 2003 13:07:40 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 20 Jul 2003 13:07:36 -0600 (MDT) Message-Id: <20030720.130736.73689720.imp@bsdimp.com> To: current@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sun_Jul_20_13:07:36_2003_620)--" Content-Transfer-Encoding: 7bit Subject: compressed modules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 19:08:14 -0000 ----Next_Part(Sun_Jul_20_13:07:36_2003_620)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Please try the enclosed patch. It adds support to sysinstall for compressed modules. I think this will save some space on the drivers disk since it isn't currently compressed (unless I'm smoking the good stuff). Warner ----Next_Part(Sun_Jul_20_13:07:36_2003_620)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sysinstall.diff" Index: modules.c =================================================================== RCS file: /cache/ncvs/src/usr.sbin/sysinstall/modules.c,v retrieving revision 1.6 diff -u -r1.6 modules.c --- modules.c 15 Jan 2003 21:47:36 -0000 1.6 +++ modules.c 18 May 2003 05:52:55 -0000 @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: src/usr.sbin/sysinstall/modules.c,v 1.6 2003/01/15 21:47:36 jhb Exp $ */ #include "sysinstall.h" @@ -91,6 +91,20 @@ else msgConfirm("Loading module %s failed", dp->d_name); } + } + if (strcmp(dp->d_name + dp->d_namlen - (sizeof(".ko.gz") - 1), ".ko.gz") == 0) { + snprintf(module, sizeof(module), "/tmp/%s", dp->d_name); + module[strlen(module) - sizeof(".gz")] = '\0'; + snprintf(desc, sizeof(desc), "zcat < %s/%s > %s", MODULESDIR, + dp->d_name, module); + system(desc); + if (kldload(module) < 0 && errno != EEXIST) { + if (desc_str[0]) + msgConfirm("Loading module %s failed\n%s", dp->d_name, desc_str); + else + msgConfirm("Loading module %s failed", dp->d_name); + } + unlink(module); } } closedir(dirp); ----Next_Part(Sun_Jul_20_13:07:36_2003_620)----