From owner-freebsd-current@FreeBSD.ORG Sat Jan 3 18:54:55 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 133551065702 for ; Sat, 3 Jan 2009 18:54:55 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id C7E6A8FC08 for ; Sat, 3 Jan 2009 18:54:54 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 70A9C73098; Sat, 3 Jan 2009 19:59:47 +0100 (CET) Date: Sat, 3 Jan 2009 19:59:47 +0100 From: Luigi Rizzo To: Alex Keda Message-ID: <20090103185947.GA96480@onelab2.iet.unipi.it> References: <20090101183026.GA15385@onelab2.iet.unipi.it> <495FB22A.3000703@lissyara.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <495FB22A.3000703@lissyara.su> User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org Subject: Re: RFC: new utility, kmodpatch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 03 Jan 2009 18:54:55 -0000 On Sat, Jan 03, 2009 at 09:44:58PM +0300, Alex Keda wrote: > Luigi Rizzo ??????????: > >I mentioned this utility a couple of months ago, and it's now working > >so i would like to receive feedback on whether this is good to have > >as part of the system, or just keep it as a port (which is what > >i plan to do by default). > > > >In a nutshell, the kmodpatch utility can print or alter the content > >of device/quirk tables in kernel modules (I think Linux has some > >similar tool, though i don't remember the name -- or perhaps it is > >a feature of insmod ?). > > > >Full manpage is attached at the end, full sources are at > > > > http://info.iet.unipi.it/~luigi/FreeBSD/20090101-kmodpatch.tgz > > cannot build > HP$ gunzip --stdout 20090101-kmodpatch.tgz | tar --extract --file=- is this on amd64 ? in any case, as a temporary workaround just cast the arguments as suggested by the warnings. cheers luigi > HP$ cd kmodpatch > HP$ ll > total 32 > -rw-r--r-- 1 lissyara wheel 132B 1 ?????? 23:08 Makefile > -rw-r--r-- 1 lissyara wheel 6,1K 1 ?????? 23:07 kmodpatch.8 > -rw-r--r-- 1 lissyara wheel 16K 1 ?????? 22:48 kmodpatch.c > HP$ make > cc -O2 -pipe -O1 -Wall -Werror -Wunused -g -I/usr/local/include > -L/usr/local/lib -lkvm kmodpatch.c -o kmodpatch > cc1: warnings being treated as errors > kmodpatch.c: In function 'dump': > kmodpatch.c:234: warning: format '%d' expects type 'int', but argument 3 > has type 'size_t' > kmodpatch.c:291: warning: format '%016llx' expects type 'long long > unsigned int', but argument 3 has type 'uint64_t' > kmodpatch.c: In function 'do_rw': > kmodpatch.c:535: warning: format '%d' expects type 'int', but argument 5 > has type 'size_t' > *** Error code 1 > > Stop in /tmp/kmodpatch. > HP$