From owner-freebsd-hackers@FreeBSD.ORG Sun May 21 17:28:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E37D216A703 for ; Sun, 21 May 2006 17:28:54 +0000 (UTC) (envelope-from ricardo_bsd@yahoo.com.br) Received: from smtp107.mail.mud.yahoo.com (smtp107.mail.mud.yahoo.com [209.191.85.217]) by mx1.FreeBSD.org (Postfix) with SMTP id 7CF1F43D48 for ; Sun, 21 May 2006 17:28:54 +0000 (GMT) (envelope-from ricardo_bsd@yahoo.com.br) Received: (qmail 3963 invoked from network); 21 May 2006 17:28:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.br; h=Received:Date:To:Subject:From:Organization:Content-Type:MIME-Version:Content-Transfer-Encoding:Message-ID:User-Agent; b=IbtBEJc8ptcoNawRcVhuqAQPGXdVCL8oxZNeFmcy+KmmD5HHU0EQxJ7fXZAAKfVcq6ansVuwWOOOgodLTlxsQJUQIPEcmFZj7vji2C+htnlpsed8eOFvB80p3WhJ50Ns6O3ON9BhOh0AX49Upkxw2fUH5q2ZL7UmaR5IfRQYYTM= ; Received: from unknown (HELO myfreebsd) (ricardo?bsd@201.1.77.188 with login) by smtp107.mail.mud.yahoo.com with SMTP; 21 May 2006 17:28:52 -0000 Date: Sun, 21 May 2006 14:28:29 -0300 To: "freebsd-hackers@freebsd.org" From: "Ricardo A. Reis" Organization: UNIFESP Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable Message-ID: User-Agent: Opera Mail/9.00 (FreeBSD) Subject: kldfind, updated for version 0.56 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2006 17:28:59 -0000 Hi all, I corrected option implementation, now kldfind accept options in = any = order Changelog: 0.56: Corrected use of getopts, Mupdated man with option and examples (is necessary re-view optio= n = in pod2man for pre-formate string) I've two questions, First about exit codes, when program is executed without options,= = how this must return ? kldunload and kldload not return the same exit codes, [ricardo@myfreebsd:~/kldfind] # kldload usage: kldload [-v] file ... zsh: 48524 exit 1 kldload [ricardo@myfreebsd:~/kldfind] # kldunload usage: kldunload [-fv] -i id ... kldunload [-fv] [-n] name ... zsh: 48539 exit 64 kldunload [ricardo@myfreebsd:~/kldfind] # ./kldfind-v056 usage: kldfind-v056 [-chqsv] ... In kldfind i return 0 The last question is about short description in -v (verbose = output), i use this line for capture from man line after NAME section, man acpi |col -b|awk '/^NAME/,/-/ { gsub(/^.* [-]+ |^.* -- |( = )+|^[ ]+|--$/,"") ; print }'|\ tail -n1 |tr '\n' ' ' 2>&1 This work for severals man, it acceptable ? Thanks for any comments. http://ricardo.epm.br/freebsd/script/kldfind/kldfind-v056 Ricardo A. Reis UNIFESP Unix and Network Admin _______________________________________________________ Abra sua conta no Yahoo! Mail: 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz. http://br.info.mail.yahoo.com/