From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 03:51:16 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 BD45716A422; Sun, 12 Feb 2006 03:51:16 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from sakura.ninth-nine.com (sakura.ninth-nine.com [219.127.74.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4460543D45; Sun, 12 Feb 2006 03:51:16 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from nadesico.ninth-nine.com (nadesico.ninth-nine.com [219.127.74.122]) by sakura.ninth-nine.com (8.13.4/8.13.4/NinthNine) with ESMTP id k1C3pDnr084918; Sun, 12 Feb 2006 12:51:14 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Sun, 12 Feb 2006 12:51:13 +0900 From: Norikatsu Shigemura To: freebsd-hackers@FreeBSD.org Message-Id: <20060212125113.0a91eb28.nork@FreeBSD.org> X-Mailer: Sylpheed version 2.2.0rc (GTK+ 2.8.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (sakura.ninth-nine.com [219.127.74.121]); Sun, 12 Feb 2006 12:51:14 +0900 (JST) Cc: Chiharu Shibata , core@FreeBSD.org, re@FreeBSD.org, sos@FreeBSD.org Subject: kern/60163 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, 12 Feb 2006 03:51:16 -0000 I heard from Chiharu Shibata about kern/60163. http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/60163 (He knew that this pr was closed, recently) I cannot believe sos's close reason. ********************************************************** The most significant problem is "Cannot mount CD-EXTRA multisession cd.". No related /dev/acdXtY. ********************************************************** If there are no reason expect sos' close reason, the patch should be committed. How about this? From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 05:05:32 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 AEF4316A420 for ; Sun, 12 Feb 2006 05:05:32 +0000 (GMT) (envelope-from nielsen-list@memberwebs.com) Received: from mail.npubs.com (npubs.com [209.66.100.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73D2943D48 for ; Sun, 12 Feb 2006 05:05:32 +0000 (GMT) (envelope-from nielsen-list@memberwebs.com) From: Nate Nielsen User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ian Dowse References: <200602111542.aa07502@nowhere.iedowse.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-Id: <20060212051359.EB6FEDCA995@mail.npubs.com> X-Virus-Scanned: ClamAV using ClamSMTP Date: Sun, 12 Feb 2006 05:14:01 +0000 (GMT) Cc: freebsd-hackers@freebsd.org, Scott Long Subject: Re: Panic Kernel Dump to umass device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: nielsen@memberwebs.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2006 05:05:32 -0000 Ian Dowse wrote: > > The USB stack supports polled operations, so it's actually not to > hard to make this work. Below is a patch I had in one of my local > trees that adds a CAM poll handler to the umass driver. I've just > tested this and it does seem to make kernel dumping work, but I > guess it might not be as reliable as dumping to other devices. Thanks, that helps. It works nicely with a uhci USB controller. However when the ohci driver is in use, we crash somewhere in usb_transfer_complete. I'll look into this further. Cheers, Nate From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 05:37:24 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 975D116A420 for ; Sun, 12 Feb 2006 05:37:24 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43D3643D46 for ; Sun, 12 Feb 2006 05:37:24 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from verizon.net ([138.89.156.245]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IUK006BF7LTJA4A@vms046.mailsrvcs.net> for freebsd-hackers@freebsd.org; Sat, 11 Feb 2006 23:37:10 -0600 (CST) Date: Sun, 12 Feb 2006 00:37:04 -0500 From: Sergey Babkin Sender: root To: Jacques Fourie Message-id: <43EEC980.32C2FA40@verizon.net> MIME-version: 1.0 X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en, ru References: <20060208164141.GA21718@trispen.com> <20060208185836.GA55307@xor.obsecurity.org> <20060209092139.GB21718@trispen.com> X-Mailman-Approved-At: Sun, 12 Feb 2006 05:42:21 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Pre-loaded mfsroot size and FreeBSD 4.9 with 4G RAM X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2006 05:37:24 -0000 Jacques Fourie wrote: > > I have installed 6.0-RELEASE and the behaviour is still the same. If I try > to pre-load an md_image of 64M with 4G of RAM installed, the kernel panics > early in the boot cycle. Here is the panic on 6.0-RELEASE: > > 131072K of memory above 4GB ignored This is a kind of stupid question but is there any chance that the 64MB image overlaps with the PCI address hole? To elaborate: with 4GB memory installed there would be no address range to access the memory-mapped 32-bit PCI cards. So the motherboard circuitry relocates some amount of memory (the 128MB shown above) from some lower address to above 4GB and frees this address space below 4GB for mapping of the PCI cards. So the interesting question is: what is the address of this PCI hole and what is the loading address of the FreeBSD md_image? If they overlap then naturally a part of the image would go into nowhere and cause a panic. On my machine this PCI hole can be disabled in BIOS (I think so, there is also some kind of configuration in BIOS but I did not pay much attention to it as I don't have 4GB). -SB From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 09:27:08 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 260AC16A422 for ; Sun, 12 Feb 2006 09:27:08 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from pd4mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2278543D45 for ; Sun, 12 Feb 2006 09:27:05 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from pd2mr8so.prod.shaw.ca (pd2mr8so-qfe3.prod.shaw.ca [10.0.141.11]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUK00DLLI947F00@l-daemon> for freebsd-hackers@freebsd.org; Sun, 12 Feb 2006 02:27:04 -0700 (MST) Received: from pn2ml2so.prod.shaw.ca ([10.0.121.146]) by pd2mr8so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUK00BKDI94YU80@pd2mr8so.prod.shaw.ca> for freebsd-hackers@freebsd.org; Sun, 12 Feb 2006 02:27:04 -0700 (MST) Received: from soralx.cydem.org ([24.85.63.128]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUK00B49I946G80@l-daemon> for freebsd-hackers@freebsd.org; Sun, 12 Feb 2006 02:27:04 -0700 (MST) Date: Sun, 12 Feb 2006 01:27:03 -0800 From: soralx@cydem.org In-reply-to: <200602112334.k1BNYf83084494@gate.bitblocks.com> To: bakul@BitBlocks.com Message-id: <200602120127.03988.soralx@cydem.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit Content-disposition: inline References: <200602112334.k1BNYf83084494@gate.bitblocks.com> User-Agent: KMail/1.5.4 Cc: freebsd-hackers@freebsd.org Subject: Re: RAID5 on athlon64 machines 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, 12 Feb 2006 09:27:08 -0000 > > > Theoretically the sequential write rate should be same or > > > higher than the sequential read rate. Given an N+1 disk > > > > Seq write rate for the whole RAID5 array will always be lower > > than the write rate for it's single disk. > > You compute max data rates by considering the most optimistic > scenario, which is large sequetial writes. For *this* > situation write rate will be higher than a single disk's. How can the RAID5 write rate be higher for the whole array if not only it needs to write the data to all if its drives, but also compute and write a parity block? > > The parity blocks are not read on data reads, since this would be > > unnecessary overhead and would diminish performance. The parity > > blocks are read, however, when a read of a data sector results > > in a cyclic redundancy check (CRC) error." > > You can only do so if you know the array is consistent. If > the system crashed there is no such guarantee. So you either > have to rebuild the whole array to get to a consistent state > or do a parity check. If you don't check parity and you have > an inconsistent array, you can have a silent error (the data > may be trashed but you don't know that). But if you use RAM > without parity or ECC, you probably already don't care about > such errors. IMO, RAID does not protect against system crashes - all it does is provide performance increase and/or some protection against hardware failure (which will be detected with extremely high probability) enabling the admin to restore some data. p.S.: this is not hackers@ discussion. Timestamp: 0x43EEF1C0 [SorAlx] http://cydem.org.ua/ ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 09:36:35 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 26C6816A420; Sun, 12 Feb 2006 09:36:35 +0000 (GMT) (envelope-from sos@deepcore.dk) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8440343D49; Sun, 12 Feb 2006 09:36:34 +0000 (GMT) (envelope-from sos@deepcore.dk) Received: from [194.192.25.142] (spider.deepcore.dk [194.192.25.142]) by spider.deepcore.dk (8.13.4/8.13.4) with ESMTP id k1C9aKNv081358; Sun, 12 Feb 2006 10:36:21 +0100 (CET) (envelope-from sos@deepcore.dk) Message-ID: <43EF0194.3020605@deepcore.dk> Date: Sun, 12 Feb 2006 10:36:20 +0100 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Thunderbird 1.5 (X11/20060130) MIME-Version: 1.0 To: Norikatsu Shigemura References: <20060212125113.0a91eb28.nork@FreeBSD.org> In-Reply-To: <20060212125113.0a91eb28.nork@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-mail-scanned: by DeepCore Virus & Spam killer v1.16 Cc: Chiharu Shibata , freebsd-hackers@FreeBSD.ORG, re@FreeBSD.ORG, core@FreeBSD.ORG, sos@FreeBSD.ORG Subject: Re: kern/60163 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, 12 Feb 2006 09:36:35 -0000 Norikatsu Shigemura wrote: > I heard from Chiharu Shibata about kern/60163. > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/60163 > (He knew that this pr was closed, recently) > > I cannot believe sos's close reason. > > ********************************************************** > The most significant problem is "Cannot mount CD-EXTRA > multisession cd.". No related /dev/acdXtY. > ********************************************************** > > If there are no reason expect sos' close reason, the patch > should be committed. How about this? Uhm, why the fuzz about this now, this PR was closed on Mon Sep 6 11:40:13 GMT 2004 according to logs. However on the patch involved: setting the blocksize for the /dev/acd0 device depending on blocksize of any track is just as wrong as setting it to the size of the first track, it just fails in different ways. So the right way to do this on multitrack media, is to mount any track as /dev/acdNtY which will set the blocksize correctly for that track. Thats why the PR was closed as stated in the PR logs... So, if we should rehash this again I'll need more details on what it is that fails exactly doing what, CD layouts etc etc... -Søren From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 12:25:16 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 57ED716A420 for ; Sun, 12 Feb 2006 12:25:16 +0000 (GMT) (envelope-from davidt@yadt.co.uk) Received: from outcold.yadt.co.uk (outcold.yadt.co.uk [81.187.204.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id D040043D49 for ; Sun, 12 Feb 2006 12:25:15 +0000 (GMT) (envelope-from davidt@yadt.co.uk) Received: from localhost (localhost [127.0.0.1]) by outcold.yadt.co.uk (Postfix) with ESMTP id 3F3011DD4DC; Sun, 12 Feb 2006 12:25:14 +0000 (GMT) Received: from outcold.yadt.co.uk ([127.0.0.1]) by localhost (outcold.yadt.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 54317-02; Sun, 12 Feb 2006 12:25:13 +0000 (GMT) Received: by outcold.yadt.co.uk (Postfix, from userid 1001) id BD8BA1DD4D9; Sun, 12 Feb 2006 12:25:13 +0000 (GMT) Date: Sun, 12 Feb 2006 12:25:13 +0000 From: David Taylor To: soralx@cydem.org Message-ID: <20060212122513.GA58153@outcold.yadt.co.uk> Mail-Followup-To: soralx@cydem.org, freebsd-hackers@freebsd.org References: <200602112334.k1BNYf83084494@gate.bitblocks.com> <200602120127.03988.soralx@cydem.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <200602120127.03988.soralx@cydem.org> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: amavisd-new 2.3.3 (20050822) at yadt.co.uk Cc: freebsd-hackers@freebsd.org Subject: Re: RAID5 on athlon64 machines 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, 12 Feb 2006 12:25:16 -0000 On Sun, 12 Feb 2006, soralx@cydem.org wrote: [missing attribution] > > > > You compute max data rates by considering the most optimistic > > scenario, which is large sequetial writes. For *this* > > situation write rate will be higher than a single disk's. > > How can the RAID5 write rate be higher for the whole array if not > only it needs to write the data to all if its drives, but also > compute and write a parity block? Easy, you can write simultaneously to more than one drive, assuming the drive was the bottleneck in the first place. -- David Taylor From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 12:47:10 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 4B4D716A420 for ; Sun, 12 Feb 2006 12:47:10 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from pd4mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E575343D46 for ; Sun, 12 Feb 2006 12:47:08 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from pd4mr7so.prod.shaw.ca (pd4mr7so-qfe3.prod.shaw.ca [10.0.141.84]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUK0004KRFLRIB0@l-daemon> for freebsd-hackers@freebsd.org; Sun, 12 Feb 2006 05:45:21 -0700 (MST) Received: from pn2ml2so.prod.shaw.ca ([10.0.121.146]) by pd4mr7so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUK00DRVRFLLOD0@pd4mr7so.prod.shaw.ca> for freebsd-hackers@freebsd.org; Sun, 12 Feb 2006 05:45:21 -0700 (MST) Received: from soralx.cydem.org ([24.85.63.128]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUK00BDORFL6GA0@l-daemon> for freebsd-hackers@freebsd.org; Sun, 12 Feb 2006 05:45:21 -0700 (MST) Date: Sun, 12 Feb 2006 04:45:21 -0800 From: soralx@cydem.org In-reply-to: <20060212122513.GA58153@outcold.yadt.co.uk> To: davidt@yadt.co.uk Message-id: <200602120445.21139.soralx@cydem.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-15 Content-transfer-encoding: 7bit Content-disposition: inline References: <200602112334.k1BNYf83084494@gate.bitblocks.com> <200602120127.03988.soralx@cydem.org> <20060212122513.GA58153@outcold.yadt.co.uk> User-Agent: KMail/1.5.4 Cc: freebsd-hackers@freebsd.org Subject: Re: RAID5 on athlon64 machines 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, 12 Feb 2006 12:47:10 -0000 > On Sun, 12 Feb 2006, soralx@cydem.org wrote: > [missing attribution] > > > > You compute max data rates by considering the most optimistic > > > scenario, which is large sequetial writes. For *this* > > > situation write rate will be higher than a single disk's. > > > > How can the RAID5 write rate be higher for the whole array if not > > only it needs to write the data to all if its drives, but also > > compute and write a parity block? > > Easy, you can write simultaneously to more than one drive, assuming > the drive was the bottleneck in the first place. Sorry, my mistake. Confused some RAID levels... Of course, with RAID5, the data block will be split (not mirrored) across several drives (plus a parity block will be added). Perhaps the original poster (bitblocks.com!bakul) may want to resend his question? Since he's experiencing performance problems with gvinum, this could very well be a hackers@ question; some more details may be needed, though. I apologize for all the confusion created here. Timestamp: 0x43EF2B47 [SorAlx] http://cydem.org.ua/ ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 14:48:16 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 C5E9116A422 for ; Sun, 12 Feb 2006 14:48:16 +0000 (GMT) (envelope-from iedowse@iedowse.com) Received: from nowhere.iedowse.com (nowhere.iedowse.com [82.195.144.75]) by mx1.FreeBSD.org (Postfix) with SMTP id 029EF43D5A for ; Sun, 12 Feb 2006 14:48:14 +0000 (GMT) (envelope-from iedowse@iedowse.com) Received: from localhost ([127.0.0.1] helo=iedowse.com) by nowhere.iedowse.com via local-iedowse id ; 12 Feb 2006 14:48:13 +0000 (GMT) To: nielsen@memberwebs.com In-Reply-To: Your message of "Sun, 12 Feb 2006 05:14:01 GMT." <20060212051359.EB6FEDCA995@mail.npubs.com> Date: Sun, 12 Feb 2006 14:48:08 +0000 From: Ian Dowse Message-ID: <200602121448.aa27129@nowhere.iedowse.com> Cc: freebsd-hackers@freebsd.org, Scott Long Subject: Re: Panic Kernel Dump to umass device? 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, 12 Feb 2006 14:48:16 -0000 In message <20060212051359.EB6FEDCA995@mail.npubs.com>, Nate Nielsen writes: >Thanks, that helps. It works nicely with a uhci USB controller. > >However when the ohci driver is in use, we crash somewhere in >usb_transfer_complete. I'll look into this further. You could try updating to the latest 6-stable usb code, which might possibly help the ohci case. There were a number of quite severe ohci issues fixed since 6.0-release that might trigger more easily when using polling. In particular, these revisions may be of interest: ohci.c 1.154.2.1 ohcivar.h 1.40.2.1 usbdi.c 1.91.2.1 Ian From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 16:02:59 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 9D25916A422; Sun, 12 Feb 2006 16:02:59 +0000 (GMT) (envelope-from sos@deepcore.dk) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0023543D58; Sun, 12 Feb 2006 16:02:57 +0000 (GMT) (envelope-from sos@deepcore.dk) Received: from [194.192.25.142] (spider.deepcore.dk [194.192.25.142]) by spider.deepcore.dk (8.13.4/8.13.4) with ESMTP id k1CG2bfh086914; Sun, 12 Feb 2006 17:02:48 +0100 (CET) (envelope-from sos@deepcore.dk) Message-ID: <43EF5C1D.60005@deepcore.dk> Date: Sun, 12 Feb 2006 17:02:37 +0100 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Thunderbird 1.5 (X11/20060130) MIME-Version: 1.0 To: Chiharu Shibata References: <20060212121111.5A54E819F@m-kg282p.ocn.ne.jp> In-Reply-To: <20060212121111.5A54E819F@m-kg282p.ocn.ne.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-mail-scanned: by DeepCore Virus & Spam killer v1.16 Cc: freebsd-hackers@FreeBSD.ORG, re@FreeBSD.ORG, nork@FreeBSD.ORG, core@FreeBSD.ORG, sos@FreeBSD.ORG Subject: Re: kern/60163 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, 12 Feb 2006 16:02:59 -0000 Chiharu Shibata wrote: [snip] >> So, if we should rehash this again I'll need more details on what it is >> that fails exactly doing what, CD layouts etc etc... > > This is a sample DISC's rayout. > ==== > Starting track = 1, ending track = 13, TOC size = 114 bytes > track start duration block length type > ------------------------------------------------- > 1 0:02.00 4:09.25 0 18550 audio > 2 4:09.25 4:28.22 18550 19972 audio > 3 8:35.47 4:00.48 38522 17898 audio > 4 12:34.20 5:56.37 56420 26587 audio > 5 18:28.57 4:59.45 83007 22320 audio > 6 23:26.27 5:13.15 105327 23340 audio > 7 28:37.42 0:21.58 128667 1483 audio > 8 28:57.25 3:51.72 130150 17247 audio > 9 32:47.22 5:02.10 147397 22510 audio > 10 37:47.32 4:23.30 169907 19605 audio > 11 42:08.62 4:41.70 189512 20995 audio > 12 46:48.57 3:28.27 210507 15477 audio > 13 50:15.09 4:36.37 225984 20587 data > 170 54:49.46 - 246571 - - > ==== > > To mount this DISC, your opinion is... > (1) at first, try "cdcontrol -f /dev/acd0c info" to make sure where > track is data area. > (2) type "mount_cd9660 -o rdonly /dev/acd0t13 /cdrom". > Is this right? Yeah that used to work at least, if not it needs fixing of course.. Any chance you could put up a mirror of that disk image so I could burn me one exactly like it to test with please ? the one I had here of the sort seems to have gone amiss, making testing a pain.. -Søren From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 16:18:03 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 2E2D016A420 for ; Sun, 12 Feb 2006 16:18:03 +0000 (GMT) (envelope-from christian.holzberger@freenet.de) Received: from mout2.freenet.de (mout2.freenet.de [194.97.50.155]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6DEC43D45 for ; Sun, 12 Feb 2006 16:18:02 +0000 (GMT) (envelope-from christian.holzberger@freenet.de) Received: from [194.97.50.144] (helo=mx1.freenet.de) by mout2.freenet.de with esmtpa (Exim 4.61) (envelope-from ) id 1F8JvF-00047B-F1 for freebsd-hackers@freebsd.org; Sun, 12 Feb 2006 17:18:01 +0100 Received: from p54873199.dip0.t-ipconnect.de ([84.135.49.153] helo=molle.local.lan) by mx1.freenet.de with esmtpa (ID christian.holzberger@freenet.de) (Exim 4.61 #21) id 1F8JvF-0003AY-8X for freebsd-hackers@freebsd.org; Sun, 12 Feb 2006 17:18:01 +0100 From: Christian Holzberger To: freebsd-hackers@freebsd.org Content-Type: text/plain Date: Sun, 12 Feb 2006 17:19:03 +0100 Message-Id: <1139761143.1194.4.camel@molle.local.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: Moused 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, 12 Feb 2006 16:18:03 -0000 Hi, i patched ums.c to support up to 31 mouse buttons (changed button type to int and set MAX_BUTTONS to 31) so far the patch is working. Now i have a problem with the moused it ignores buttons 6 and 7 and 15 of my Logitech MediaPlay mouse. And i cant find the reason, somehow it isnt handled by the moused ... all other buttons work and moused gets the buttons as input... iam a bit stuck... help would be great and i hope i wrote to the right list. -- Greetings, Christian Holzberger Christian.Holzberger@freenet.de From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 12:11:13 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 B930716A422; Sun, 12 Feb 2006 12:11:13 +0000 (GMT) (envelope-from chi@bd.mbn.or.jp) Received: from smtp.fancy.ocn.ne.jp (fancy.ocn.ne.jp [210.190.142.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CEEC43D45; Sun, 12 Feb 2006 12:11:12 +0000 (GMT) (envelope-from chi@bd.mbn.or.jp) Received: from chino.localhost (p7027-ipad08okidate.aomori.ocn.ne.jp [58.88.78.27]) by smtp.fancy.ocn.ne.jp (Postfix) with ESMTP id 5A54E819F; Sun, 12 Feb 2006 21:11:11 +0900 (JST) Posted-Date: Sun, 12 Feb 2006 20:29:55 JST To: sos@deepcore.dk In-Reply-To: <43EF0194.3020605@deepcore.dk> From: chi@bd.mbn.or.jp (Chiharu Shibata) X-Mailer: mnews [version 1.22] 1999-12/19(Sun) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20060212121111.5A54E819F@m-kg282p.ocn.ne.jp> Date: Sun, 12 Feb 2006 21:11:11 +0900 (JST) X-Mailman-Approved-At: Sun, 12 Feb 2006 17:01:15 +0000 Cc: freebsd-hackers@FreeBSD.ORG, re@FreeBSD.ORG, nork@FreeBSD.ORG, core@FreeBSD.ORG, sos@FreeBSD.ORG Subject: Re: kern/60163 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, 12 Feb 2006 12:11:14 -0000 This is Chiharu Shibata. At Sun, 12 Feb 2006 10:36:20 JST, you wrote... >Norikatsu Shigemura wrote: >> I heard from Chiharu Shibata about kern/60163. >> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/60163 >> (He knew that this pr was closed, recently) >> >> I cannot believe sos's close reason. >> >> ********************************************************** >> The most significant problem is "Cannot mount CD-EXTRA >> multisession cd.". No related /dev/acdXtY. >> ********************************************************** >> >> If there are no reason expect sos' close reason, the patch >> should be committed. How about this? > >Uhm, why the fuzz about this now, this PR was closed on >Mon Sep 6 11:40:13 GMT 2004 according to logs. GNATS system does not mail to me, because I'm a follower of this PR, not a originator. >However on the patch involved: setting the blocksize for the /dev/acd0 >device depending on blocksize of any track is just as wrong as setting >it to the size of the first track, it just fails in different ways. >So the right way to do this on multitrack media, is to mount any track >as /dev/acdNtY which will set the blocksize correctly for that track. >Thats why the PR was closed as stated in the PR logs... > >So, if we should rehash this again I'll need more details on what it is >that fails exactly doing what, CD layouts etc etc... This is a sample DISC's rayout. ==== Starting track = 1, ending track = 13, TOC size = 114 bytes track start duration block length type ------------------------------------------------- 1 0:02.00 4:09.25 0 18550 audio 2 4:09.25 4:28.22 18550 19972 audio 3 8:35.47 4:00.48 38522 17898 audio 4 12:34.20 5:56.37 56420 26587 audio 5 18:28.57 4:59.45 83007 22320 audio 6 23:26.27 5:13.15 105327 23340 audio 7 28:37.42 0:21.58 128667 1483 audio 8 28:57.25 3:51.72 130150 17247 audio 9 32:47.22 5:02.10 147397 22510 audio 10 37:47.32 4:23.30 169907 19605 audio 11 42:08.62 4:41.70 189512 20995 audio 12 46:48.57 3:28.27 210507 15477 audio 13 50:15.09 4:36.37 225984 20587 data 170 54:49.46 - 246571 - - ==== To mount this DISC, your opinion is... (1) at first, try "cdcontrol -f /dev/acd0c info" to make sure where track is data area. (2) type "mount_cd9660 -o rdonly /dev/acd0t13 /cdrom". Is this right? 1st Problem: I cannot mount this DISC though the procedure is completed. "mount_cd9660: /dev/acd0t13: Invalid argument" Did you succeed? In this case, the "disklabel.d_secsize" is still "2352", even if /dev/acdNtY is used. Does the hidden problem like this remain? 2nd Problem: It varies by the DISCs where the starting track of data area. Therefore, there is no way to write the entry of CD Extra DISC in /etc/fstab, and so on. Of course, my(and originator) patch can mount any CD Extra DISCs by "/dev/acd0c". 3rd Problem: The originator says "atapicam is OK". SCSI and ATAPICAM use "/dev/cdYc", but ATA should use "/dev/acdYtN" to mount same CD Extra DISC. Don't you think this to be a strange specification? -- Chiharu Shibata chi@bd.mbn.or.jp From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 17:20:36 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 CB4FD16A420 for ; Sun, 12 Feb 2006 17:20:36 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from gate.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85A6543D45 for ; Sun, 12 Feb 2006 17:20:36 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost [127.0.0.1]) by gate.bitblocks.com (8.13.4/8.13.1) with ESMTP id k1CHKWFY089596; Sun, 12 Feb 2006 09:20:32 -0800 (PST) (envelope-from bakul@bitblocks.com) Message-Id: <200602121720.k1CHKWFY089596@gate.bitblocks.com> To: soralx@cydem.org In-reply-to: Your message of "Sun, 12 Feb 2006 01:27:03 PST." <200602120127.03988.soralx@cydem.org> Date: Sun, 12 Feb 2006 09:20:32 -0800 From: Bakul Shah Cc: freebsd-hackers@freebsd.org Subject: Re: RAID5 on athlon64 machines 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, 12 Feb 2006 17:20:36 -0000 > > You compute max data rates by considering the most optimistic > > scenario, which is large sequetial writes. For *this* > > situation write rate will be higher than a single disk's. > > How can the RAID5 write rate be higher for the whole array if not > only it needs to write the data to all if its drives, but also > compute and write a parity block? You write to all the disks at the same time. While the disks are busy writing you compute parity for the next stripe. In my case disk bw is 60MB/s. Memory bw is I thin 3GB/s. There ought to be plenty of bw and cpu for xor computing. > IMO, RAID does not protect against system crashes - all it does > is provide performance increase and/or some protection against > hardware failure (which will be detected with extremely high > probability) enabling the admin to restore some data. No it can't if you don't do the parity check on reads and a previous write to the stripe was incomplete due to system crash. You will happily deliver incorrect data to the user and he only knows *something* is wrong when his system crashes or program misbehaves or some binary data doesn't quite feel right or some text is garbled or some secondary bad effect. May be you need to use the same principle in your learning? Check your understanding by applying it and trying to extend it. Don't just believe what you read, cross-check it. Question the (so called) authority! The revolution will not be televised. Oops I think I have a scrambled brain block. From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 12 23:11:32 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 314A316A420 for ; Sun, 12 Feb 2006 23:11:32 +0000 (GMT) (envelope-from fli+freebsd-hackers@shapeshifter.se) Received: from mx1.h3q.net (manticore.shapeshifter.se [212.37.5.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2DA443D45 for ; Sun, 12 Feb 2006 23:11:31 +0000 (GMT) (envelope-from fli+freebsd-hackers@shapeshifter.se) Received: from localhost (localhost [127.0.0.1]) by mx1.h3q.net (Postfix) with ESMTP id 464521A8EC for ; Mon, 13 Feb 2006 00:11:29 +0100 (CET) Received: from mx1.h3q.net ([127.0.0.1]) by localhost (mx1.h3q.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 35611-06 for ; Mon, 13 Feb 2006 00:11:26 +0100 (CET) Received: from [192.168.0.83] (81-234-243-91-o926.tbon.telia.com [81.234.243.91]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.h3q.net (Postfix) with ESMTP id 4CED61A8E5 for ; Mon, 13 Feb 2006 00:11:25 +0100 (CET) Message-ID: <43EFC098.1010602@shapeshifter.se> Date: Mon, 13 Feb 2006 00:11:20 +0100 From: Fredrik Lindberg User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050928) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at h3q.net Subject: UPEK TouchChip TFM/ESS Fingerprint BSP driver for FreeBSD 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, 12 Feb 2006 23:11:32 -0000 Hi all, I just thought that I let you know that UPEK [1] has released a native FreeBSD driver (binary only, closed source) for their fingerprint sensors. UPEK manufactures alot of fingerprint sensors, both built-in and standalone usb-readers. You can find them for example in several notebooks (IBM, Asus, Samsung, NEC, etc). There is a full list avaiable at http://www.upek.com/customer/pcnetworking/default.asp The driver itself is avaiable at http://www.upek.com/support/dl_freeBSD_bsp.asp and works as a module to the BioAPI [2] framework. I've also written a small quick-starting guide which covers the basics, it's avaiable at http://shapeshifter.se/articles/upek_touchchip_freebsd/ Please keep in mind that this is all quite new and should be treated as "beta code". I should probably point out that I'm not affiliated with UPEK in any way except for providing their developers guidance in porting their Linux driver to FreeBSD. Also, I would like to thank the guys over at UPEK, especially Martin Konecny, for making this possible. Fredrik Lindberg [1] http://www.upek.com [2] http://www.bioapi.org From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 13 03:17:53 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 C23A216A420; Mon, 13 Feb 2006 03:17:53 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64F5D43D45; Mon, 13 Feb 2006 03:17:53 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from [192.168.1.101] (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id 063AD244C33; Mon, 13 Feb 2006 12:17:51 +0900 (JST) Message-ID: <43EFFA5F.4040605@freebsd.org> Date: Mon, 13 Feb 2006 12:17:51 +0900 From: Daichi GOTO User-Agent: Thunderbird 1.5 (X11/20060210) MIME-Version: 1.0 To: Dario Freni , freebsd-hackers@freebsd.org, freebsd-current@freebsd.org References: <200602100423.k1A4N8MG080084@cwsys.cwsent.com> <43ECEAC9.70602@freesbie.org> In-Reply-To: <43ECEAC9.70602@freesbie.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander@Leidinger.net, Daichi GOTO , ozawa@ongs.co.jp Subject: patchset-8-fix1 for 6.x release (Re: [unionfs][patch] improvements of the unionfs - Problem Report, kern/91010) 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: Mon, 13 Feb 2006 03:17:53 -0000 I have updated the patchset-8-fix1 for 6.x of unionfs. Patchset-8-fix1 for 6.x: For 6.x http://people.freebsd.org/~daichi/unionfs/unionfs6-p8-fix1.diff Changes in unionfs6-p8-fix1.diff - fixed 6.x build failure So sorry, unionfs6-p8 has a build failure unwittingly :( -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 13 12:33:08 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 6D34616A420; Mon, 13 Feb 2006 12:33:08 +0000 (GMT) (envelope-from sos@deepcore.dk) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E8A043D72; Mon, 13 Feb 2006 12:32:58 +0000 (GMT) (envelope-from sos@deepcore.dk) Received: from [194.192.25.142] (spider.deepcore.dk [194.192.25.142]) by spider.deepcore.dk (8.13.4/8.13.4) with ESMTP id k1DCWp86004624; Mon, 13 Feb 2006 13:32:51 +0100 (CET) (envelope-from sos@deepcore.dk) Message-ID: <43F07C73.6040502@deepcore.dk> Date: Mon, 13 Feb 2006 13:32:51 +0100 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Thunderbird 1.5 (X11/20060130) MIME-Version: 1.0 To: Chiharu Shibata References: <20060213121101.47A5AA98F@m-kg282p.ocn.ne.jp> In-Reply-To: <20060213121101.47A5AA98F@m-kg282p.ocn.ne.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-mail-scanned: by DeepCore Virus & Spam killer v1.16 Cc: freebsd-hackers@FreeBSD.ORG, re@FreeBSD.ORG, nork@FreeBSD.ORG, core@FreeBSD.ORG, sos@FreeBSD.ORG Subject: Re: kern/60163 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: Mon, 13 Feb 2006 12:33:08 -0000 Chiharu Shibata wrote: > At Sun, 12 Feb 2006 17:02:37 JST, you wrote... > >>> To mount this DISC, your opinion is... >>> (1) at first, try "cdcontrol -f /dev/acd0c info" to make sure where >>> track is data area. >>> (2) type "mount_cd9660 -o rdonly /dev/acd0t13 /cdrom". >>> Is this right? >> Yeah that used to work at least, if not it needs fixing of course.. > > Hmm, succeeded under your environment... > >> Any chance you could put up a mirror of that disk image so I could burn >> me one exactly like it to test with please ? the one I had here of the >> sort seems to have gone amiss, making testing a pain.. > > My sample DISC is a commercial product. The copy is forbidden, of course. > However, about this problem, We may consider that it is not peculiar to > this product. > When I wrote that patch at first, some testers used another DISC, and > some result as me with/without patch. Well, without proper samples it'll be hard to work on this, if this is as common as suggested finding free samples that I can use for testing should not be a problem ? > > A various situation, my environment does not change/update-to-current. > So I will collect testers again and have it investigated whether it can > mount via /dev/acdNtY or not. > If it can, I will withdraw about "1st Problem". > > But "2nd/3rd Problem" remains as before, I want to ask your opinion > about these. > Moreover, the point that beforehand investigation of which track is > data area, this is very unreasonable restriction, I think. Hmm, could it be that the data track is always the last track ? You cannot compare SCSI/ATAPI behavior here, since the SCSI layer cannot handle ! %512 byte sectors it doesn't have to handle audio tracks. Native ATA/ATAPI on the other hand supports *any* sector size and needs to set the right sector size for each track. Now if you need a specific track you need to access that one via the acdNtY interface to gt the sector size right, if that fails I'll fix it :) Oh, and yes I'm talking 6.x and -current here, anything before that I don't support due to lack of spare time.... -Søren From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 13 12:11:03 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 3CCD416A435; Mon, 13 Feb 2006 12:11:03 +0000 (GMT) (envelope-from chi@bd.mbn.or.jp) Received: from smtp.fancy.ocn.ne.jp (fancy.ocn.ne.jp [210.190.142.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD14A43D4C; Mon, 13 Feb 2006 12:11:02 +0000 (GMT) (envelope-from chi@bd.mbn.or.jp) Received: from chino.localhost (p7027-ipad08okidate.aomori.ocn.ne.jp [58.88.78.27]) by smtp.fancy.ocn.ne.jp (Postfix) with ESMTP id 47A5AA98F; Mon, 13 Feb 2006 21:11:01 +0900 (JST) Posted-Date: Mon, 13 Feb 2006 20:19:40 JST To: sos@deepcore.dk In-Reply-To: <43EF5C1D.60005@deepcore.dk> From: chi@bd.mbn.or.jp (Chiharu Shibata) X-Mailer: mnews [version 1.22] 1999-12/19(Sun) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20060213121101.47A5AA98F@m-kg282p.ocn.ne.jp> Date: Mon, 13 Feb 2006 21:11:01 +0900 (JST) X-Mailman-Approved-At: Mon, 13 Feb 2006 12:37:28 +0000 Cc: freebsd-hackers@FreeBSD.ORG, re@FreeBSD.ORG, nork@FreeBSD.ORG, core@FreeBSD.ORG, sos@FreeBSD.ORG Subject: Re: kern/60163 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: Mon, 13 Feb 2006 12:11:03 -0000 At Sun, 12 Feb 2006 17:02:37 JST, you wrote... >> To mount this DISC, your opinion is... >> (1) at first, try "cdcontrol -f /dev/acd0c info" to make sure where >> track is data area. >> (2) type "mount_cd9660 -o rdonly /dev/acd0t13 /cdrom". >> Is this right? > >Yeah that used to work at least, if not it needs fixing of course.. Hmm, succeeded under your environment... >Any chance you could put up a mirror of that disk image so I could burn >me one exactly like it to test with please ? the one I had here of the >sort seems to have gone amiss, making testing a pain.. My sample DISC is a commercial product. The copy is forbidden, of course. However, about this problem, We may consider that it is not peculiar to this product. When I wrote that patch at first, some testers used another DISC, and some result as me with/without patch. A various situation, my environment does not change/update-to-current. So I will collect testers again and have it investigated whether it can mount via /dev/acdNtY or not. If it can, I will withdraw about "1st Problem". But "2nd/3rd Problem" remains as before, I want to ask your opinion about these. Moreover, the point that beforehand investigation of which track is data area, this is very unreasonable restriction, I think. -- Chiharu Shibata chi@bd.mbn.or.jp From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 13 17:04:12 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 B1AB616A422; Mon, 13 Feb 2006 17:04:12 +0000 (GMT) (envelope-from ariff@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD66F43D48; Mon, 13 Feb 2006 17:04:10 +0000 (GMT) (envelope-from ariff@FreeBSD.org) Received: from misaki (root@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with SMTP id k1DH46v7096752; Mon, 13 Feb 2006 17:04:08 GMT (envelope-from ariff@FreeBSD.org) Date: Tue, 14 Feb 2006 01:03:37 +0800 From: Ariff Abdullah To: =?ISO-8859-1?Q?S=F8ren?= Schmidt Message-Id: <20060214010337.6e4e4a5a.ariff@FreeBSD.org> In-Reply-To: <43F07C73.6040502@deepcore.dk> References: <20060213121101.47A5AA98F@m-kg282p.ocn.ne.jp> <43F07C73.6040502@deepcore.dk> Organization: FreeBSD X-Mailer: /usr/local/lib/ruby/1.8/net/smtp.rb Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Tue__14_Feb_2006_01_03_37_+0800_0AYRAe7uJ4b7=l+/" Cc: re@FreeBSD.org, freebsd-hackers@FreeBSD.org, core@FreeBSD.org, nork@FreeBSD.org, chi@bd.mbn.or.jp, sos@FreeBSD.org Subject: Re: kern/60163 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: Mon, 13 Feb 2006 17:04:12 -0000 --Signature=_Tue__14_Feb_2006_01_03_37_+0800_0AYRAe7uJ4b7=l+/ Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 13 Feb 2006 13:32:51 +0100 S=F8ren Schmidt wrote: >=20 > Well, without proper samples it'll be hard to work on this, if this > is as common as suggested finding free samples that I can use for > testing should not be a problem ? > It is quite easy to produce CD-EXTRA (using cdrecord): # cdrecord -v -v speed=3D12 -multi -pad -audio yada.wav # cdrecord -msinfo 0,18302 # mkisofs -C 0,18302 -o yada.iso /usr/share/examples # cdrecord -v -v speed=3D12 -data yada.iso # cdcontrol i Starting track =3D 1, ending track =3D 2, TOC size =3D 26 bytes track start duration block length type ------------------------------------------------- 1 0:02.00 1:32.02 0 6902 audio 2 4:06.02 0:17.42 18302 1317 data 170 4:23.44 - 19619 - - # mount -t cd9660 /dev/acd0 /cdrom mount_cd9660: /dev/acd0: Invalid argument As suggested by you: # mount -t cd9660 /dev/acd0t02 /cdrom mount_cd9660: /dev/acd0t02: Input/output error Using atapicam dev: # mount -t cd9660 /dev/cd0 /cdrom # ls /cdrom ... ... (files files files) > Hmm, could it be that the data track is always the last track ? >=20 Yes. IIRC, CD-EXTRA: Audio track(s) at first session, data at the end. CD Mixed Mode: Data at first (session|track), audio tracks follows to the end. -- Ariff Abdullah FreeBSD --Signature=_Tue__14_Feb_2006_01_03_37_+0800_0AYRAe7uJ4b7=l+/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD8Lvrlr+deMUwTNoRAk5HAJ9XXX7MjnBjB6fgHSHhcGBKGMjcaACePTIx rB1tqWTALBsV88wfNShSlmA= =ClgW -----END PGP SIGNATURE----- --Signature=_Tue__14_Feb_2006_01_03_37_+0800_0AYRAe7uJ4b7=l+/-- From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 13 17:07:57 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 1BFCA16A424 for ; Mon, 13 Feb 2006 17:07:57 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id C807243D5A for ; Mon, 13 Feb 2006 17:07:55 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 8360284 for multiple; Mon, 13 Feb 2006 12:07:15 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k1DH7oZM050573; Mon, 13 Feb 2006 12:07:53 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org, babkin@users.sourceforge.net Date: Mon, 13 Feb 2006 12:07:05 -0500 User-Agent: KMail/1.9.1 References: <20060208164141.GA21718@trispen.com> <43EEC980.32C2FA40@verizon.net> In-Reply-To: <43EEC980.32C2FA40@verizon.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602131207.07212.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1286/Mon Feb 13 06:41:56 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED,AWL autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Subject: Re: Pre-loaded mfsroot size and FreeBSD 4.9 with 4G RAM 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: Mon, 13 Feb 2006 17:07:57 -0000 On Sunday 12 February 2006 00:37, Sergey Babkin wrote: > Jacques Fourie wrote: > > I have installed 6.0-RELEASE and the behaviour is still the same. If I > > try to pre-load an md_image of 64M with 4G of RAM installed, the kernel > > panics early in the boot cycle. Here is the panic on 6.0-RELEASE: > > > > 131072K of memory above 4GB ignored > > This is a kind of stupid question but is there any chance that the 64MB > image overlaps with the PCI address hole? To elaborate: with > 4GB memory installed there would be no address range to access the > memory-mapped 32-bit PCI cards. So the motherboard circuitry > relocates some amount of memory (the 128MB shown above) from > some lower address to above 4GB and frees this address space below > 4GB for mapping of the PCI cards. So the interesting question > is: what is the address of this PCI hole and what is the loading > address of the FreeBSD md_image? If they overlap then naturally > a part of the image would go into nowhere and cause a panic. > > On my machine this PCI hole can be disabled in BIOS (I think so, > there is also some kind of configuration in BIOS but I did > not pay much attention to it as I don't have 4GB). No, that won't happen as the mfsroot is loaded into RAM, and RAM doesn't conflict with the PCI addreses. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 14 00:38:51 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 431E716A420 for ; Tue, 14 Feb 2006 00:38:51 +0000 (GMT) (envelope-from ajk@f2s.com) Received: from outmail.freedom2surf.net (outmail1.freedom2surf.net [194.106.33.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id B271543D4C for ; Tue, 14 Feb 2006 00:38:49 +0000 (GMT) (envelope-from ajk@f2s.com) Received: from inchview (cypress.spiders-lair.com [83.67.81.132]) by outmail.freedom2surf.net (8.12.10/8.12.10) with SMTP id k1E0cmVT002874 for ; Tue, 14 Feb 2006 00:38:48 GMT From: "Andy K" To: Date: Tue, 14 Feb 2006 00:38:48 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Subject: Poweredge 2850 keyboard problem 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: Tue, 14 Feb 2006 00:38:51 -0000 Hi all, Having "googled" for my problem, the only thread I can find is this one which doesn't appear to have a solution:- http://lists.freebsd.org/pipermail/freebsd-hackers/2005-April/011579.html I recently got two Dell Poweredge servers. A 1425 and a 2850. I installed 6.0-RELEASE onto both. With the 1425 I have no problem, but with the 2850 the keyboard fails to work at all. Some details; The keyboard is plugged into the standard "purple" kb input. It works fine when setting up bios options, perc4 controller set-up, etc. The keyboard works fine also if I boot into single user mode. However, if I do a normal boot into multi-user mode (the keyboard works fine when selecting a boot option) then when I get to the login prompt, no keyboard input at all. I tried a USB keyboard also. Same result, works ok for bios setting and single user mode but just doesn't work in multi-user mode. Oddly, the Dell USB kb I have also has a USB optical mouse connected to the keybd. When I plug in, I see the kernel messages popup on the console telling me a kb and mouse have been connected. The mouse works fine (pointer appears and can be moved and selection made) but the keyboard stubbornly refuses to do anything. Any ideas anyone? (I saw a thread somewhere that upgrading the kernel and world fixed it, however, I've cvsuped to 6-STABLE, new world and kernel and the problem still there. It's a dual processor system but same problem with GENERIC and a custom kernel. regards Andy From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 14 01:57:41 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 55FB116A420 for ; Tue, 14 Feb 2006 01:57:41 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBD5E43D46 for ; Tue, 14 Feb 2006 01:57:40 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by xproxy.gmail.com with SMTP id t5so717991wxc for ; Mon, 13 Feb 2006 17:57:40 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZHtEIOw7hlZk/PrRIk9MLwxNWUx8YIDVlbYNf/HeZYgaZ2qHQrcByIFJFiIXtVsuUbEHvsrcDHH+X3IK5fpqPWrHbjBJsi4zEi8KBcMG8xVL+XZ0K8YFD4zcTJ4lSDcMqGIE+XRK62VMBzOA6dn6u1VJ2gN8oWUAlfbrE55dsOs= Received: by 10.70.129.10 with SMTP id b10mr1447156wxd; Mon, 13 Feb 2006 17:57:40 -0800 (PST) Received: by 10.70.116.10 with HTTP; Mon, 13 Feb 2006 17:57:40 -0800 (PST) Message-ID: <84dead720602131757m64de1ee4yf182d24cdfec2f8b@mail.gmail.com> Date: Tue, 14 Feb 2006 07:27:40 +0530 From: Joseph Koshy To: Andy K In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Cc: freebsd-hackers@freebsd.org Subject: Re: Poweredge 2850 keyboard problem 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: Tue, 14 Feb 2006 01:57:41 -0000 ak> options, perc4 controller set-up, etc. The keyboard works ak> fine also if I boot into single user mode. However, if ak> I do a normal boot into multi-user mode (the keyboard ak> works fine when selecting a boot option) then when I ak> get to the login prompt, no keyboard input at all. I worked around the problem by turning off USB. -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 14 02:30:29 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 0E96816A422 for ; Tue, 14 Feb 2006 02:30:29 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91D6043D46 for ; Tue, 14 Feb 2006 02:30:28 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [192.168.42.21] (andersonbox1.centtech.com [192.168.42.21]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k1E2UOrf037087; Mon, 13 Feb 2006 20:30:25 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <43F140BB.1090708@centtech.com> Date: Mon, 13 Feb 2006 20:30:19 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: Andy K References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1287/Mon Feb 13 15:29:18 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: Poweredge 2850 keyboard problem 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: Tue, 14 Feb 2006 02:30:29 -0000 Andy K wrote: > Hi all, > > Having "googled" for my problem, the only thread I > can find is this one which doesn't appear to have a > solution:- > > http://lists.freebsd.org/pipermail/freebsd-hackers/2005-April/011579.html > > I recently got two Dell Poweredge servers. A 1425 and > a 2850. I installed 6.0-RELEASE onto both. With the > 1425 I have no problem, but with the 2850 the keyboard > fails to work at all. > > Some details; The keyboard is plugged into the standard > "purple" kb input. It works fine when setting up bios > options, perc4 controller set-up, etc. The keyboard works > fine also if I boot into single user mode. However, if > I do a normal boot into multi-user mode (the keyboard > works fine when selecting a boot option) then when I > get to the login prompt, no keyboard input at all. > > I tried a USB keyboard also. Same result, works ok for > bios setting and single user mode but just doesn't work > in multi-user mode. Oddly, the Dell USB kb I have also > has a USB optical mouse connected to the keybd. When I > plug in, I see the kernel messages popup on the console > telling me a kb and mouse have been connected. The mouse > works fine (pointer appears and can be moved and selection > made) but the keyboard stubbornly refuses to do anything. > > Any ideas anyone? (I saw a thread somewhere that upgrading > the kernel and world fixed it, however, I've cvsuped to > 6-STABLE, new world and kernel and the problem still there. > > It's a dual processor system but same problem with GENERIC > and a custom kernel. > > Sounds like you have a DRAC installed. The DRAC takes over the usb keyboard and mouse I think. Try this 'patch': --- ./devd.conf-orig Mon Feb 13 20:28:48 2006 +++ ./devd.conf Mon Feb 13 20:29:19 2006 @@ -99,11 +99,11 @@ # When a USB keyboard arrives, attach it as the console keyboard. attach 100 { device-name "ukbd0"; - action "kbdcontrol -k /dev/ukbd0 < /dev/console && /etc/rc.d/syscons restart"; + #action "kbdcontrol -k /dev/ukbd0 < /dev/console && /etc/rc.d/syscons restart"; }; detach 100 { device-name "ukbd0"; - action "kbdcontrol -k /dev/kbd0 < /dev/console"; + #action "kbdcontrol -k /dev/kbd0 < /dev/console"; }; # The entry below starts moused when a mouse is plugged in. Moused Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 14 08:38:18 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 4658716A420 for ; Tue, 14 Feb 2006 08:38:18 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from pd5mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1F5C43D45 for ; Tue, 14 Feb 2006 08:38:16 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from pd4mr2so.prod.shaw.ca (pd4mr2so-qfe3.prod.shaw.ca [10.0.141.213]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUO00H455BR10B0@l-daemon> for freebsd-hackers@FreeBSD.org; Tue, 14 Feb 2006 01:38:15 -0700 (MST) Received: from pn2ml7so.prod.shaw.ca ([10.0.121.151]) by pd4mr2so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUO00LK45BRCML0@pd4mr2so.prod.shaw.ca> for freebsd-hackers@FreeBSD.org; Tue, 14 Feb 2006 01:38:15 -0700 (MST) Received: from soralx.cydem.org ([24.85.63.128]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUO001LJ5BRAK70@l-daemon> for freebsd-hackers@FreeBSD.org; Tue, 14 Feb 2006 01:38:15 -0700 (MST) From: soralx@cydem.org In-reply-to: <20060214010337.6e4e4a5a.ariff@FreeBSD.org> To: freebsd-hackers@FreeBSD.org Message-id: <200302240026.11989.soralx@cydem.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit Content-disposition: inline References: <20060213121101.47A5AA98F@m-kg282p.ocn.ne.jp> <43F07C73.6040502@deepcore.dk> <20060214010337.6e4e4a5a.ariff@FreeBSD.org> User-Agent: KMail/1.5.4 Cc: Subject: Re: kern/60163 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: , Date: Tue, 14 Feb 2006 08:38:18 -0000 X-Original-Date: Mon, 24 Feb 2003 00:26:11 -0800 X-List-Received-Date: Tue, 14 Feb 2006 08:38:18 -0000 > > Hmm, could it be that the data track is always the last track ? > Yes. so that CD players would be able to play the disks? or does not matter? Timestamp: 0x3E59D6A9 [SorAlx] http://cydem.org.ua/ ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 14 11:27:31 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 10D4C16A422; Tue, 14 Feb 2006 11:27:31 +0000 (GMT) (envelope-from ariff@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD2BA43D46; Tue, 14 Feb 2006 11:27:30 +0000 (GMT) (envelope-from ariff@FreeBSD.org) Received: from misaki (root@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with SMTP id k1EBRP1l073899; Tue, 14 Feb 2006 11:27:28 GMT (envelope-from ariff@FreeBSD.org) Date: Tue, 14 Feb 2006 19:26:48 +0800 From: Ariff Abdullah To: soralx@cydem.org Message-Id: <20060214192648.1e7a5277.ariff@FreeBSD.org> In-Reply-To: <200302240026.11989.soralx@cydem.org> References: <20060213121101.47A5AA98F@m-kg282p.ocn.ne.jp> <43F07C73.6040502@deepcore.dk> <20060214010337.6e4e4a5a.ariff@FreeBSD.org> <200302240026.11989.soralx@cydem.org> Organization: FreeBSD X-Mailer: /usr/local/lib/ruby/1.8/net/smtp.rb Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Tue__14_Feb_2006_19_26_48_+0800_R3C3cwKyNFgwbPo3" Cc: chi@bd.mbn.or.jp, freebsd-hackers@FreeBSD.org, nork@FreeBSD.org, sos@FreeBSD.org Subject: Re: kern/60163 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: Tue, 14 Feb 2006 11:27:31 -0000 --Signature=_Tue__14_Feb_2006_19_26_48_+0800_R3C3cwKyNFgwbPo3 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 24 Feb 2003 00:26:11 -0800 soralx@cydem.org wrote: >=20 > > > Hmm, could it be that the data track is always the last track ? > > Yes. >=20 > so that CD players would be able to play the disks? or does not > matter? >=20 Correct. Most hardware cd player are designed to play only the first session on multisession disc, where in this case (CDEXTRA), the data track will be ignored. Unlike mixed-mode cd, the data track (on first track/session) usually result in silence playback. In case somebody might interested, I have a patch for (unfortunately) RELENG_5 for atapicd multiblock access. Among other things, it also fix multisession/dao writing of burncd(8). With this, you can have conccurent access with varying blocksize on atapicd. http://people.freebsd.org/~ariff/misc/releng5_ata.diff It's a bit ugly. Somebody with deeper knowledge on ata/GEOM probably will have better solution for this. -- Ariff Abdullah FreeBSD --Signature=_Tue__14_Feb_2006_19_26_48_+0800_R3C3cwKyNFgwbPo3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD8b5/lr+deMUwTNoRAsayAKDCAhwzbcInxE4Pxyw3cSnr0TNV+wCeJa8G uAuZN1nK3nZf8HsDWMd/+sA= =bdkM -----END PGP SIGNATURE----- --Signature=_Tue__14_Feb_2006_19_26_48_+0800_R3C3cwKyNFgwbPo3-- From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 14 12:17:53 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 2ABEF16A420; Tue, 14 Feb 2006 12:17:53 +0000 (GMT) (envelope-from sos@deepcore.dk) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C98743D4C; Tue, 14 Feb 2006 12:17:52 +0000 (GMT) (envelope-from sos@deepcore.dk) Received: from [194.192.25.142] (spider.deepcore.dk [194.192.25.142]) by spider.deepcore.dk (8.13.4/8.13.4) with ESMTP id k1ECHWGJ029406; Tue, 14 Feb 2006 13:17:33 +0100 (CET) (envelope-from sos@deepcore.dk) Message-ID: <43F1CA5C.9060303@deepcore.dk> Date: Tue, 14 Feb 2006 13:17:32 +0100 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Thunderbird 1.5 (X11/20060130) MIME-Version: 1.0 To: Ariff Abdullah References: <20060213121101.47A5AA98F@m-kg282p.ocn.ne.jp> <43F07C73.6040502@deepcore.dk> <20060214010337.6e4e4a5a.ariff@FreeBSD.org> <200302240026.11989.soralx@cydem.org> <20060214192648.1e7a5277.ariff@FreeBSD.org> In-Reply-To: <20060214192648.1e7a5277.ariff@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-mail-scanned: by DeepCore Virus & Spam killer v1.16 Cc: chi@bd.mbn.or.jp, freebsd-hackers@FreeBSD.ORG, nork@FreeBSD.ORG, sos@FreeBSD.ORG Subject: Re: kern/60163 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: Tue, 14 Feb 2006 12:17:53 -0000 Ariff Abdullah wrote: > On Mon, 24 Feb 2003 00:26:11 -0800 > soralx@cydem.org wrote: >>>> Hmm, could it be that the data track is always the last track ? >>> Yes. >> so that CD players would be able to play the disks? or does not >> matter? >> > Correct. Most hardware cd player are designed to play only the first > session on multisession disc, where in this case (CDEXTRA), the data > track will be ignored. Unlike mixed-mode cd, the data track (on > first track/session) usually result in silence playback. > > In case somebody might interested, I have a patch for (unfortunately) > RELENG_5 for atapicd multiblock access. Among other things, it > also fix multisession/dao writing of burncd(8). With this, you can > have conccurent access with varying blocksize on atapicd. > > http://people.freebsd.org/~ariff/misc/releng5_ata.diff > > It's a bit ugly. Somebody with deeper knowledge on ata/GEOM probably > will have better solution for this. Thats closer to a real solution. The problem is that for a CD EXTRA the offsets embedded in the iso is absolute to the start of media, if we address those directly as a track the offsets are off. This cannot coexist with CD containing multiple tracks with relative to the track start iso's on each track. We need a solution to this that does the right thing but its certainly not trivial, the above does contain some of the solution (from an eyeball review of the code), but more needs to be done.. I'll look into this when more important issues has been dealt with for the 6.1 release, possibly together with a burncd replacement I'm working on when time permits... -Søren From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 14 21:25:16 2006 Return-Path: X-Original-To: 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 09F0D16A420 for ; Tue, 14 Feb 2006 21:25:16 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61C4B43D60 for ; Tue, 14 Feb 2006 21:25:07 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from virusscan.mail (amavis2.rz.uni-wuerzburg.de [132.187.3.47]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 3A045146F1D for ; Tue, 14 Feb 2006 22:25:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id 2C4DD6BA4 for ; Tue, 14 Feb 2006 22:25:06 +0100 (CET) Received: from frodo.galgenberg.net (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 05457146F1D for ; Tue, 14 Feb 2006 22:25:06 +0100 (CET) Received: from coyote.q.local (gb-21-237.galgenberg.net [172.16.21.237]) by frodo.galgenberg.net (8.13.1/8.13.1) with ESMTP id k1ELP5xF052873 for ; Tue, 14 Feb 2006 22:25:05 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (roadrunner.q.local [192.168.0.148]) by coyote.q.local (8.13.4/8.13.4) with ESMTP id k1ELP4pa013245 for ; Tue, 14 Feb 2006 22:25:05 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.4/8.13.4) with ESMTP id k1ELP4mG012543 for ; Tue, 14 Feb 2006 22:25:04 +0100 (CET) (envelope-from q@galgenberg.net) Received: (from q@localhost) by roadrunner.q.local (8.13.4/8.13.4/Submit) id k1ELP4o4012542 for hackers@freebsd.org; Tue, 14 Feb 2006 22:25:04 +0100 (CET) (envelope-from q@galgenberg.net) Date: Tue, 14 Feb 2006 22:25:03 +0100 From: Ulrich Spoerlein To: hackers@freebsd.org Message-ID: <20060214212503.GE1107@galgenberg.net> Mail-Followup-To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EDJsL2R9iCFAt7IV" Content-Disposition: inline X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Cc: Subject: Naive implementation of strverscmp(3) 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: Tue, 14 Feb 2006 21:25:16 -0000 --EDJsL2R9iCFAt7IV Content-Type: multipart/mixed; boundary="kbCYTQG2MZjuOjyn" Content-Disposition: inline --kbCYTQG2MZjuOjyn Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Hackers, this is probably not the right list, but I'd like to collect reviews of=20 a strverscmp(3) function I wrote. It is used by the graphics/gqview port=20 (if present in libc) and since I want/need that functionality I whipped=20 up a somewhat working version. It tries to sort strings like "jan1", "jan2", "jan10", etc. into the=20 "natural" order. Is there a chance this might get included into libc? Or is it considered=20 bloat? The GNU version can be found here http://refspecs.freestandards.org/LSB_2.0.1/LSB-generic/LSB-generic/baselib= -strverscmp.html Quite frankly, I don't understand their integral/fraction distinction,=20 and my version differs in that regard. See the return values of the=20 attached sample code. Ulrich Spoerlein --=20 PGP Key ID: 20FEE9DD Encrypted mail welcome! Fingerprint: AEC9 AF5E 01AC 4EE1 8F70 6CBD E76E 2227 20FE E9DD Which is worse: ignorance or apathy? Don't know. Don't care. --kbCYTQG2MZjuOjyn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="strverscmp.c" Content-Transfer-Encoding: quoted-printable #include #include #include #include #ifdef __FreeBSD__ int strverscmp(const char *s1, const char *s2); int strverscmp(const char *s1, const char *s2) { static const char *digits =3D "0123456789"; int ret; long n1, n2; size_t p1, p2; do { p1 =3D strcspn(s1, digits); p2 =3D strcspn(s2, digits); =20 /* Different prefix */ if ((ret =3D strncmp(s1, s2, p1)) !=3D 0) return ret; s1 +=3D p1; s2 +=3D p2; n1 =3D strtol(s1, NULL, 10); n2 =3D strtol(s2, NULL, 10); =20 if (n1 < n2) return -1; else if (n1 > n2) return 1; /* Numbers are equal or not present, try with next ones. */ p1 =3D strspn(s1, digits); p2 =3D strspn(s2, digits); s1 +=3D p1; s2 +=3D p2; } while (p1 =3D=3D p2 && p1 !=3D 0 && p1 !=3D 0); =20 return strcmp(s1, s2); } #endif int main(int argc, char **argv) { char **array, *temp; int i, j, n =3D 10; array =3D (char **) calloc(n, sizeof(char *)); array[0] =3D strdup("jan2"); array[1] =3D strdup("jan10"); array[2] =3D strdup("jan"); array[3] =3D strdup("jan0a"); array[4] =3D strdup("jan17b"); array[5] =3D strdup("jan17a"); array[6] =3D strdup("jan17x1234"); array[7] =3D strdup("jan17x123"); array[8] =3D strdup("jan17x123a"); array[9] =3D strdup("jan9"); /* Bubble sort */ for (i=3D0; i 0) { temp =3D array[j]; array[j] =3D array[i]; array[i] =3D temp; } } } for (i=3D0; i 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 929C416A420 for ; Wed, 15 Feb 2006 02:18:33 +0000 (GMT) (envelope-from pranavpeshwe@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 290ED43D46 for ; Wed, 15 Feb 2006 02:18:33 +0000 (GMT) (envelope-from pranavpeshwe@gmail.com) Received: by wproxy.gmail.com with SMTP id i32so1202714wra for ; Tue, 14 Feb 2006 18:18:32 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=OKQ8vzZ5HINoU/h+93Wa5+YSyghxJOlwN2/kqGGqZUVhstIEzs75lbFPrE6ymTOSD6h5995VRHPJ2oBJ9E8H1eS8C42gNxoXivjZWWrjoVyNTt1+Wk6MFbGHr/3hCYpihEFllOYYWijw5AZa/r+gr9eWwisxKmG7c/Y4/H1B8+s= Received: by 10.54.96.9 with SMTP id t9mr3546549wrb; Tue, 14 Feb 2006 18:18:31 -0800 (PST) Received: by 10.54.96.15 with HTTP; Tue, 14 Feb 2006 18:18:30 -0800 (PST) Message-ID: Date: Wed, 15 Feb 2006 02:18:30 +0000 From: Pranav Peshwe To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Userland version of struct vnode ? 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: Wed, 15 Feb 2006 02:18:33 -0000 Hello, Why is the 'Userland version' struct vnode created i.e struct xvnode (in vnode.h) ? The comment says that it is 'for sysctl'.There are also userland versions of struct file and struct tty.Can anybody please explain about their use ? TIA. Regards, Pranav --------------------------------------------------------------------------- Branches occur about every six instructions. From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 15 02:54:00 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 279D616A420 for ; Wed, 15 Feb 2006 02:54:00 +0000 (GMT) (envelope-from mux@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0F8443D45 for ; Wed, 15 Feb 2006 02:53:59 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 931401A3C23; Tue, 14 Feb 2006 18:53:59 -0800 (PST) Date: Wed, 15 Feb 2006 03:53:59 +0100 From: Maxime Henrion To: Pranav Peshwe Message-ID: <20060215025359.GG55746@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: Userland version of struct vnode ? 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: Wed, 15 Feb 2006 02:54:00 -0000 Pranav Peshwe wrote: > Hello, > Why is the 'Userland version' struct vnode created i.e struct > xvnode (in vnode.h) ? The comment says that it is 'for sysctl'.There are > also userland versions of struct file and struct tty.Can anybody please > explain about their use ? Those structures exist so that changing the size of the kernel struct vnode has no impact for the userland tools. If the sysctls were giving a struct vnode instead of a struct xvnode, every change in the layout or size of struct vnode would break the ABI and require a rebuild of all the userland tools gathering vnodes from the sysctl. It also allows the sysctl code to only give the meaningful fields back to userland, reducing the amount of memory that needs to be copied. Cheers, Maxime From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 15 08:05:35 2006 Return-Path: X-Original-To: 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 9262D16A420 for ; Wed, 15 Feb 2006 08:05:35 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB72343D45 for ; Wed, 15 Feb 2006 08:05:34 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail10.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k1F85XPM016433 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 15 Feb 2006 19:05:33 +1100 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.4/8.13.4) with ESMTP id k1F85WcO001150 for ; Wed, 15 Feb 2006 19:05:32 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.4/8.13.4/Submit) id k1F85WWG001149 for hackers@freebsd.org; Wed, 15 Feb 2006 19:05:32 +1100 (EST) (envelope-from peter) Date: Wed, 15 Feb 2006 19:05:32 +1100 From: Peter Jeremy To: hackers@freebsd.org Message-ID: <20060215080532.GB684@turion.vk2pj.dyndns.org> References: <20060214212503.GE1107@galgenberg.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline In-Reply-To: <20060214212503.GE1107@galgenberg.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: Subject: Re: Naive implementation of strverscmp(3) 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: Wed, 15 Feb 2006 08:05:35 -0000 --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 2006-Feb-14 22:25:03 +0100, Ulrich Spoerlein wrote: >this is probably not the right list, but I'd like to collect reviews of=20 >a strverscmp(3) function I wrote. It is used by the graphics/gqview port= =20 =2E.. >Is there a chance this might get included into libc? Or is it considered= =20 >bloat? I don't think it belongs in libc. Maybe libutil. >The GNU version can be found here >http://refspecs.freestandards.org/LSB_2.0.1/LSB-generic/LSB-generic/baseli= b-strverscmp.html >Quite frankly, I don't understand their integral/fraction distinction,=20 I don't think their description makes sense - it's not clear what the point is or where it would be used. If '.' was also a magic character then (IMHO) it would make more sense. >int >strverscmp(const char *s1, const char *s2) >{ > static const char *digits =3D "0123456789"; > int ret; > long n1, n2; > size_t p1, p2; > > do { > p1 =3D strcspn(s1, digits); > p2 =3D strcspn(s2, digits); > + if (p1 !=3D p2) break; + =20 > /* Different prefix */ > if ((ret =3D strncmp(s1, s2, p1)) !=3D 0) > return ret; =2E.. > /* Numbers are equal or not present, try with next ones. */ > p1 =3D strspn(s1, digits); > p2 =3D strspn(s2, digits); You can avoid these strspn() calls [which are not cheap] by saving the endptr values from the strtol() calls above. > s1 +=3D p1; > s2 +=3D p2; - } while (p1 =3D=3D p2 && p1 !=3D 0 && p1 !=3D 0); + } while (p1 =3D=3D p2 && p1 !=3D 0); For the first point, consider strverscmp("jan25", "janx25"); --=20 Peter Jeremy --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD8uDK/opHv/APuIcRAhugAJ4ibgn65igh77GBpMI1IVeYci6p1wCeLEXp +iAYRxDwLLK1thDEgoCHbco= =bgEQ -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV-- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 15 10:08:00 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 4CAEE16A420 for ; Wed, 15 Feb 2006 10:08:00 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id A76E543D5E for ; Wed, 15 Feb 2006 10:07:55 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: by wproxy.gmail.com with SMTP id 57so1262830wri for ; Wed, 15 Feb 2006 02:07:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=BOHRu6rb7w/AIxKfzWsyqwXkC1MTpKx7PYz1ZVOiJOGMLP4S9CfHc7JMrITN2LI6K4G4gQ5wKJEyipeYZcHsHSR27tsO6vk0QEHOckbCTUUlcXmy4lkhu+4P0RvPsAYXmk4U2QQFlC3eGNswjMtsQCKyGFiN5X5ZEA4tlZzVm7I= Received: by 10.65.213.15 with SMTP id p15mr2428964qbq; Wed, 15 Feb 2006 02:07:54 -0800 (PST) Received: by 10.64.203.11 with HTTP; Wed, 15 Feb 2006 02:07:54 -0800 (PST) Message-ID: <9f9993160602150207m474d0eb3uceb4f47deef0280d@mail.gmail.com> Date: Wed, 15 Feb 2006 15:37:54 +0530 From: rashmi ns To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: using kernel profiling for loadable modules 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: Wed, 15 Feb 2006 10:08:00 -0000 hello list , Can anybody tell me how we can use "gprof" for loadable kernel modules Regards, Freebsd user From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 15 12:59:11 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 CBB7E16A420; Wed, 15 Feb 2006 12:59:11 +0000 (GMT) (envelope-from chi@bd.mbn.or.jp) Received: from smtp.fancy.ocn.ne.jp (fancy.ocn.ne.jp [210.190.142.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4010443D55; Wed, 15 Feb 2006 12:59:10 +0000 (GMT) (envelope-from chi@bd.mbn.or.jp) Received: from chino.localhost (p7027-ipad08okidate.aomori.ocn.ne.jp [58.88.78.27]) by smtp.fancy.ocn.ne.jp (Postfix) with ESMTP id 55F09B3FA; Wed, 15 Feb 2006 21:59:09 +0900 (JST) Posted-Date: Wed, 15 Feb 2006 21:21:15 JST To: ariff@FreeBSD.org In-Reply-To: <20060214010337.6e4e4a5a.ariff@FreeBSD.org> From: chi@bd.mbn.or.jp (Chiharu Shibata) X-Mailer: mnews [version 1.22] 1999-12/19(Sun) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20060215125909.55F09B3FA@m-kg282p.ocn.ne.jp> Date: Wed, 15 Feb 2006 21:59:09 +0900 (JST) Cc: re@FreeBSD.org, freebsd-hackers@FreeBSD.org, core@FreeBSD.org, nork@FreeBSD.org, sos@deepcore.dk, sos@FreeBSD.org Subject: Re: kern/60163 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: Wed, 15 Feb 2006 12:59:12 -0000 (During server maintainance, it seems that my mail wasn't send outgoing...) At Tue, 14 Feb 2006 01:03:37 JST, you wrote... ># mount -t cd9660 /dev/acd0 /cdrom >mount_cd9660: /dev/acd0: Invalid argument > >As suggested by you: ># mount -t cd9660 /dev/acd0t02 /cdrom >mount_cd9660: /dev/acd0t02: Input/output error I've got reports from 2 testers(6.0-RELEASE-p4 and 5.4-Stable), and same result as this. PS. [http://people.freebsd.org/~ariff/misc/releng5_ata.diff] | --- usr.sbin/cdcontrol/cdcontrol.c.orig Wed Feb 16 02:29:43 2005 | +++ usr.sbin/cdcontrol/cdcontrol.c Wed Feb 16 02:33:13 2005 | @@ -73,6 +73,7 @@ | #define STATUS_AUDIO 0x1 | #define STATUS_MEDIA 0x2 | #define STATUS_VOLUME 0x4 | +#define SESSION_SECTORS (152*75) | | struct cmdtab { | int command; | @@ -1004,6 +1005,12 @@ | e[1].addr.msf.frame); | else | next = ntohl(e[1].addr.lba); | + if (e[1].track < 100) { | + if (!(e->control & 4) && (e[1].control & 4)) | + next -= SESSION_SECTORS; | + else if ((e->control & 4) != (e[1].control & 4)) | + next -= 150; | + } | len = next - block; | /* Take into account a start offset time. */ | lba2msf (len - 150, &m, &s, &f); My another patch contains this process(shortend length of last audio track) on kernel level. If interested, please refer to the following. (this is very *old* patch, but enough to read essence) -- Chiharu Shibata chi@bd.mbn.or.jp From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 15 15:02:44 2006 Return-Path: X-Original-To: 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 440D716A423 for ; Wed, 15 Feb 2006 15:02:44 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id C225543D49 for ; Wed, 15 Feb 2006 15:02:40 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from virusscan.mail (amavis1.rz.uni-wuerzburg.de [132.187.3.48]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 62BA8146939; Wed, 15 Feb 2006 16:02:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id 5355EA0E; Wed, 15 Feb 2006 16:02:39 +0100 (CET) Received: from frodo.galgenberg.net (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 2A0E7146939; Wed, 15 Feb 2006 16:02:39 +0100 (CET) Received: from coyote.q.local (gb-21-237.galgenberg.net [172.16.21.237]) by frodo.galgenberg.net (8.13.1/8.13.1) with ESMTP id k1FF2cuo042240; Wed, 15 Feb 2006 16:02:38 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (roadrunner.q.local [192.168.0.148]) by coyote.q.local (8.13.4/8.13.4) with ESMTP id k1FF2cOT021841; Wed, 15 Feb 2006 16:02:38 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.4/8.13.4) with ESMTP id k1FF2c8S002978; Wed, 15 Feb 2006 16:02:38 +0100 (CET) (envelope-from q@galgenberg.net) Received: (from q@localhost) by roadrunner.q.local (8.13.4/8.13.4/Submit) id k1FF2bdE002977; Wed, 15 Feb 2006 16:02:37 +0100 (CET) (envelope-from q@galgenberg.net) Date: Wed, 15 Feb 2006 16:02:37 +0100 From: Ulrich Spoerlein To: Peter Jeremy Message-ID: <20060215150237.GA1123@galgenberg.net> Mail-Followup-To: Peter Jeremy , hackers@freebsd.org References: <20060214212503.GE1107@galgenberg.net> <20060215080532.GB684@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="A6N2fC+uXW/VQSAv" Content-Disposition: inline In-Reply-To: <20060215080532.GB684@turion.vk2pj.dyndns.org> X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Cc: hackers@freebsd.org Subject: Re: Naive implementation of strverscmp(3) 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: Wed, 15 Feb 2006 15:02:44 -0000 --A6N2fC+uXW/VQSAv Content-Type: multipart/mixed; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Peter Jeremy wrote: > >Is there a chance this might get included into libc? Or is it considered= =20 > >bloat? >I don't think it belongs in libc. Maybe libutil. This would require patching the gqview configure script, but I can live=20 with that. >For the first point, consider > strverscmp("jan25", "janx25"); This fell victim to a rearranging of the while loop. Thanks for pointing=20 that out! Attached is an updated version, which now also takes leading zeros into=20 account. It still differs from the GNU version, because strverscmp("foo.009", "foo.0") > 0 In my book, '009' is just greater than zero, no matter what. If someone=20 could explain to me, why the GNU folks do it the other way round, I=20 could try implementing that too. Also, what do people think about the commented out while construct? It=20 saves a call to strcspn(s2) if s1 has no digits, but it's rather ugly. Ulrich Spoerlein --=20 PGP Key ID: 20FEE9DD Encrypted mail welcome! Fingerprint: AEC9 AF5E 01AC 4EE1 8F70 6CBD E76E 2227 20FE E9DD Which is worse: ignorance or apathy? Don't know. Don't care. --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="strverscmp.c" Content-Transfer-Encoding: quoted-printable #include #include #include #include #ifdef __FreeBSD__ int strverscmp(const char *s1, const char *s2); int strverscmp(const char *s1, const char *s2) { static const char *digits =3D "0123456789"; char *t1, *t2; int ret; long n1, n2; size_t p1, p2; p1 =3D strcspn(s1, digits); p2 =3D strcspn(s2, digits); //while ((p1=3Dstrcspn(s1, digits)) !=3D 0 && p1 =3D=3D (p2=3Dstrcspn(s2,= digits))) { while (p1 =3D=3D p2 && p1 !=3D 0) { =20 /* Different prefix */ if ((ret =3D strncmp(s1, s2, p1)) !=3D 0) return ret; s1 +=3D p1; s2 +=3D p2; n1 =3D strtol(s1, &t1, 10); n2 =3D strtol(s2, &t2, 10); =20 if (n1 < n2) return -1; else if (n1 > n2) return 1; /* One number is "shorter", e.g., "07" vs "007" */ if (t1-s1 < t2-s2) return 1; else if (t1-s1 > t2-s2) return -1; /* Numbers are equal or not present, try with next ones. */ s1 =3D t1; s2 =3D t2; p1 =3D strcspn(s1, digits); p2 =3D strcspn(s2, digits); } =20 return strcmp(s1, s2); } #endif int main(int argc, char **argv) { char **array, *temp; int i, j, n =3D 10; array =3D (char **) calloc(n, sizeof(char *)); array[0] =3D strdup("jan009"); array[1] =3D strdup("jan10"); array[2] =3D strdup("jan09"); array[3] =3D strdup("jan0a"); array[4] =3D strdup("jan17b"); array[5] =3D strdup("jan17a"); array[6] =3D strdup("janx25"); array[7] =3D strdup("jan25"); array[8] =3D strdup("jan17x"); array[9] =3D strdup("jan9"); /* Bubble sort */ for (i=3D0; i 0) { temp =3D array[j]; array[j] =3D array[i]; array[i] =3D temp; } } } for (i=3D0; i 0\n", strverscmp("alpha1", "alpha001")); printf("%d > 0\n", strverscmp("part1_f012", "part1_f01")); printf("%d < 0\n", strverscmp("foo.009", "foo.0")); printf("%d\n", strcmp("jan25", "janx25")); printf("%d\n", strverscmp("jan25", "janx25")); return 0; } --r5Pyd7+fXNt84Ff3-- --A6N2fC+uXW/VQSAv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD80KN524iJyD+6d0RAtNRAKCE8oRGCVNDlIryk4PQXloTCeKPCACff7mZ WW7inlp+3GrRoOzGKG7WjIc= =bGHa -----END PGP SIGNATURE----- --A6N2fC+uXW/VQSAv-- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 15 16:05:26 2006 Return-Path: X-Original-To: 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 7C5EE16A420 for ; Wed, 15 Feb 2006 16:05:26 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4E8C43D49 for ; Wed, 15 Feb 2006 16:05:25 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id k1FG5OGw044343; Wed, 15 Feb 2006 10:05:24 -0600 (CST) (envelope-from dan) Date: Wed, 15 Feb 2006 10:05:24 -0600 From: Dan Nelson To: Peter Jeremy , hackers@freebsd.org Message-ID: <20060215160524.GA70956@dan.emsphone.com> References: <20060214212503.GE1107@galgenberg.net> <20060215080532.GB684@turion.vk2pj.dyndns.org> <20060215150237.GA1123@galgenberg.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060215150237.GA1123@galgenberg.net> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: Subject: Re: Naive implementation of strverscmp(3) 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: Wed, 15 Feb 2006 16:05:26 -0000 In the last episode (Feb 15), Ulrich Spoerlein said: > Peter Jeremy wrote: > >>Is there a chance this might get included into libc? Or is it > >>considered bloat? > >I don't think it belongs in libc. Maybe libutil. > > This would require patching the gqview configure script, but I can live > with that. > > >For the first point, consider > > strverscmp("jan25", "janx25"); > > This fell victim to a rearranging of the while loop. Thanks for > pointing that out! > > Attached is an updated version, which now also takes leading zeros > into account. It still differs from the GNU version, because > strverscmp("foo.009", "foo.0") > 0 In my book, '009' is just greater > than zero, no matter what. If someone could explain to me, why the > GNU folks do it the other way round, I could try implementing that > too. This looks a lot like strnatcmp, which is "natural sort" or "do what I mean" sort :) http://sourcefrog.net/projects/natsort/ Your function is simpler than the C implementation on that site, but falls over when a run of numbers exceeds 2^31 (raise it to 2^64 if you use strtoull, but that's as high as you can yet). -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 15 17:09:23 2006 Return-Path: X-Original-To: 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 3FDF616A420 for ; Wed, 15 Feb 2006 17:09:23 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C19643D49 for ; Wed, 15 Feb 2006 17:09:21 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from virusscan.mail (amavis1.rz.uni-wuerzburg.de [132.187.3.48]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 0C7F5D84FD; Wed, 15 Feb 2006 18:09:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id F17BE10EF; Wed, 15 Feb 2006 18:09:20 +0100 (CET) Received: from frodo.galgenberg.net (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 82456D84FD; Wed, 15 Feb 2006 18:09:20 +0100 (CET) Received: from coyote.q.local (gb-21-237.galgenberg.net [172.16.21.237]) by frodo.galgenberg.net (8.13.1/8.13.1) with ESMTP id k1FH9Kag089897; Wed, 15 Feb 2006 18:09:20 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (roadrunner.q.local [192.168.0.148]) by coyote.q.local (8.13.4/8.13.4) with ESMTP id k1FH9KhQ022352; Wed, 15 Feb 2006 18:09:20 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.4/8.13.4) with ESMTP id k1FH9KB5006823; Wed, 15 Feb 2006 18:09:20 +0100 (CET) (envelope-from q@galgenberg.net) Received: (from q@localhost) by roadrunner.q.local (8.13.4/8.13.4/Submit) id k1FH9JX2006775; Wed, 15 Feb 2006 18:09:19 +0100 (CET) (envelope-from q@galgenberg.net) Date: Wed, 15 Feb 2006 18:09:19 +0100 From: Ulrich Spoerlein To: Dan Nelson Message-ID: <20060215170919.GB1123@galgenberg.net> Mail-Followup-To: Dan Nelson , hackers@freebsd.org References: <20060214212503.GE1107@galgenberg.net> <20060215080532.GB684@turion.vk2pj.dyndns.org> <20060215150237.GA1123@galgenberg.net> <20060215160524.GA70956@dan.emsphone.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ycz6tD7Th1CMF4v7" Content-Disposition: inline In-Reply-To: <20060215160524.GA70956@dan.emsphone.com> X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Cc: hackers@freebsd.org Subject: Re: Naive implementation of strverscmp(3) 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: Wed, 15 Feb 2006 17:09:23 -0000 --Ycz6tD7Th1CMF4v7 Content-Type: multipart/mixed; boundary="4ZLFUWh1odzi/v6L" Content-Disposition: inline --4ZLFUWh1odzi/v6L Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Dan Nelson wrote: >This looks a lot like strnatcmp, which is "natural sort" or "do what I >mean" sort :) > >http://sourcefrog.net/projects/natsort/ Heh, I didn't know about that one, but since gqview uses strverscmp I=20 only google for that one. >Your function is simpler than the C implementation on that site, but >falls over when a run of numbers exceeds 2^31 (raise it to 2^64 if you >use strtoull, but that's as high as you can yet). That's true, I didn't think of that. It's funny how a simple function=20 like comparing alphanumerical strings can cause that much trouble. Anyway, attached is a last version, which now also functions for strings=20 starting with numbers and which I'll probably try getting committed to=20 the gqview port. You may do with the code whatever you want. :) Ulrich Spoerlein --=20 PGP Key ID: 20FEE9DD Encrypted mail welcome! Fingerprint: AEC9 AF5E 01AC 4EE1 8F70 6CBD E76E 2227 20FE E9DD Which is worse: ignorance or apathy? Don't know. Don't care. --4ZLFUWh1odzi/v6L Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="strverscmp.c" Content-Transfer-Encoding: quoted-printable #include #include #include #include #ifdef __FreeBSD__ int strverscmp(const char *s1, const char *s2); int strverscmp(const char *s1, const char *s2) { static const char *digits =3D "0123456789"; char *t1, *t2; int ret; long n1, n2; size_t p1, p2; p1 =3D strcspn(s1, digits); p2 =3D strcspn(s2, digits); while (p1 =3D=3D p2 && s1[p1] !=3D '\0' && s2[p2] !=3D '\0') { /* Different prefix */ if ((ret =3D strncmp(s1, s2, p1)) !=3D 0) return ret; s1 +=3D p1; s2 +=3D p2; n1 =3D strtol(s1, &t1, 10); n2 =3D strtol(s2, &t2, 10); =20 if (n1 < n2) return -1; else if (n1 > n2) return 1; /* One number is "shorter", e.g., "07" vs "007" */ if (t1-s1 < t2-s2) return 1; else if (t1-s1 > t2-s2) return -1; /* Numbers are equal or not present, try with next ones. */ s1 =3D t1; s2 =3D t2; p1 =3D strcspn(s1, digits); p2 =3D strcspn(s2, digits); } =20 return strcmp(s1, s2); } #endif int main(int argc, char **argv) { char **array, *temp; int i, j, n =3D 10; array =3D (char **) calloc(n, sizeof(char *)); array[0] =3D strdup("10.jpg"); array[1] =3D strdup("2.jpg"); array[2] =3D strdup("1.jpg"); array[3] =3D strdup("09.jpg"); array[4] =3D strdup("a01b2"); array[5] =3D strdup("a1b1"); array[6] =3D strdup("a"); array[7] =3D strdup("1.001"); array[8] =3D strdup("1.1"); array[9] =3D strdup("1.01"); /* Bubble sort */ for (i=3D0; i 0) { temp =3D array[j]; array[j] =3D array[i]; array[i] =3D temp; } } } for (i=3D0; i 0\n", strverscmp("alpha1", "alpha001")); printf("%d > 0\n", strverscmp("part1_f012", "part1_f01")); printf("%d < 0\n", strverscmp("foo.009", "foo.0")); return 0; } --4ZLFUWh1odzi/v6L-- --Ycz6tD7Th1CMF4v7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD82A/524iJyD+6d0RAraQAKCUDQ73nYHAsNOzzRxWxHFV7pNJmwCdGd4J zHCLxsexnK2PMzL61wt4ALQ= =maYq -----END PGP SIGNATURE----- --Ycz6tD7Th1CMF4v7-- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 15 18:27:33 2006 Return-Path: X-Original-To: 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 218BF16A420 for ; Wed, 15 Feb 2006 18:27:33 +0000 (GMT) (envelope-from jilles@stack.nl) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6D0F43D55 for ; Wed, 15 Feb 2006 18:27:31 +0000 (GMT) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailhost.stack.nl (Postfix) with ESMTP id F2ACBA300F; Wed, 15 Feb 2006 19:27:30 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id DCDDA228B3; Wed, 15 Feb 2006 19:27:30 +0100 (CET) Date: Wed, 15 Feb 2006 19:27:30 +0100 From: Jilles Tjoelker To: Dan Nelson Message-ID: <20060215182730.GB20355@stack.nl> References: <20060214212503.GE1107@galgenberg.net> <20060215080532.GB684@turion.vk2pj.dyndns.org> <20060215150237.GA1123@galgenberg.net> <20060215160524.GA70956@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060215160524.GA70956@dan.emsphone.com> X-Operating-System: FreeBSD 5.4-RELEASE i386 User-Agent: Mutt/1.5.11 Cc: hackers@freebsd.org Subject: Re: Naive implementation of strverscmp(3) 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: Wed, 15 Feb 2006 18:27:33 -0000 On Wed, Feb 15, 2006 at 10:05:24AM -0600, Dan Nelson wrote: > Your function is simpler than the C implementation on that site, but > falls over when a run of numbers exceeds 2^31 (raise it to 2^64 if you > use strtoull, but that's as high as you can yet). That problem can be avoided fairly easily. First skip the leading zeroes on both sides, then strspn for digits; the longest run of digits is greater, otherwise strncmp it. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 17 11:06:33 2006 Return-Path: X-Original-To: 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 D489316A422 for ; Fri, 17 Feb 2006 11:06:33 +0000 (GMT) (envelope-from slackwarewolf@comcast.net) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [216.148.227.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AC0343D64 for ; Fri, 17 Feb 2006 11:06:31 +0000 (GMT) (envelope-from slackwarewolf@comcast.net) Received: from [192.168.0.100] (c-69-246-87-201.hsd1.mi.comcast.net[69.246.87.201]) by comcast.net (rwcrmhc11) with ESMTP id <20060217110631m1100pka25e>; Fri, 17 Feb 2006 11:06:31 +0000 From: Allen To: hackers@freebsd.org Date: Fri, 17 Feb 2006 06:07:10 -0500 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602170607.11056.slackwarewolf@comcast.net> Cc: Subject: Dual booting Free BSD 6 and Slackware 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: Fri, 17 Feb 2006 11:06:34 -0000 Hallo all: So a few days ago I kind of went nuts and spent 2,000 dollars. FreeBsdmall and BSDmall.... And of course store.slackware.com Needless to say they love it. Well, after spending more than 400 dollars alone on Free BSD stuff I decided to set up a box with slackware and Free BSD. Here is a question which may or may not be simple: /boot/vmlinuz Is the boot file you add to lilo What is the equiv of this in Free BSD? /boot/kernel doesn't seem to work on lilo and I'd really like to use it for booting and I've done it before, that and Free BSD didn't want to boot Linux at first (Was my fault) so does anyone know... Actually I'm assuming you do know because that's why I asked here instead, but anyway, I've been reading through the books I bought, and it doesn't mention anything like "Ok, in Linux it's /boot/vmlinuz, in Free BSD it's...." Any help is appreciated, or a link that explains what to add. -Allen From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 17 11:16:00 2006 Return-Path: X-Original-To: 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 7D2C016A423 for ; Fri, 17 Feb 2006 11:16:00 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF3D143D93 for ; Fri, 17 Feb 2006 11:15:41 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by xproxy.gmail.com with SMTP id i30so250669wxd for ; Fri, 17 Feb 2006 03:15:41 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HxNsgcjEysNbPY+NrcIDUoT8T75xs7XXFPp+hg903RSzXx0WG15M9fjiU5UYAssDzhG3SMQF9Rx88Bhi7oJAaX7og6kgz1/9hwjIaNoTZR7VrmFNojMXiom4GcvHph7hVdFABuc00UljLVw5RAk7PR1Uz/0qtTWG+dE9G46Pxlo= Received: by 10.70.60.18 with SMTP id i18mr872043wxa; Fri, 17 Feb 2006 03:15:40 -0800 (PST) Received: by 10.70.116.10 with HTTP; Fri, 17 Feb 2006 03:15:40 -0800 (PST) Message-ID: <84dead720602170315g315b7d6dicfe038e19d7be2ad@mail.gmail.com> Date: Fri, 17 Feb 2006 16:45:40 +0530 From: Joseph Koshy To: Allen In-Reply-To: <200602170607.11056.slackwarewolf@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200602170607.11056.slackwarewolf@comcast.net> Cc: hackers@freebsd.org Subject: Re: Dual booting Free BSD 6 and Slackware 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: Fri, 17 Feb 2006 11:16:00 -0000 > What is the equiv of this in Free BSD? /boot/kernel doesn't seem to work = on > lilo and I'd really like to use it for booting and I've done it before, t= hat > and Free BSD didn't want to boot Linux at first (Was my fault) so does an= yone > know... Actually I'm assuming you do know because that's why I asked here > instead, but anyway, I've been reading through the books I bought, and it > doesn't mention anything like "Ok, in Linux it's /boot/vmlinuz, in Free B= SD > it's...." Try "/boot/loader" -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 17 11:16:17 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 71F6F16A426 for ; Fri, 17 Feb 2006 11:16:17 +0000 (GMT) (envelope-from root@solink.ru) Received: from ns.itam.nsc.ru (ns.itam.nsc.ru [194.226.179.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0CCA43D77 for ; Fri, 17 Feb 2006 11:16:02 +0000 (GMT) (envelope-from root@solink.ru) Received: from site.lan (itut.itam.nsc.ru [194.226.179.2]) by ns.itam.nsc.ru (8.13.1/8.13.1) with ESMTP id k1HBFxkf002880 for ; Fri, 17 Feb 2006 17:15:59 +0600 Received: from bocha.solink.office ([192.168.66.166]) (authenticated bits=0) by site.lan (8.12.11/8.12.11) with ESMTP id k1HBFsGG019971 for ; Fri, 17 Feb 2006 17:15:54 +0600 From: Bachilo Dmitry Organization: SoLink To: freebsd-hackers@freebsd.org Date: Fri, 17 Feb 2006 17:15:54 +0600 User-Agent: KMail/1.8 References: <200602170607.11056.slackwarewolf@comcast.net> In-Reply-To: <200602170607.11056.slackwarewolf@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200602171715.54580.root@solink.ru> Subject: Re: Dual booting Free BSD 6 and Slackware 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: Fri, 17 Feb 2006 11:16:17 -0000 =F7 =D3=CF=CF=C2=DD=C5=CE=C9=C9 =CF=D4 =F0=D1=D4=CE=C9=C3=C1 17 =E6=C5=D7= =D2=C1=CC=D8 2006 17:07 Allen =CE=C1=D0=C9=D3=C1=CC(a): > /boot/vmlinuz > > Is the boot file you add to lilo > > What is the equiv of this in Free BSD? /boot/kernel doesn't seem to work = on > lilo and I'd really like to use it for booting and I've done it before, > that and Free BSD didn't want to boot Linux at first (Was my fault) so do= es > anyone know...=20 it's /boot/boot0 But FreeBSD, if is installed after linux, sees linux and if you choose to=20 install boot manager in sysinstall, you will have the ability to choose an = OS=20 during PC startup. Thats for shure. From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 17 11:21:41 2006 Return-Path: X-Original-To: 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 06F8316A420 for ; Fri, 17 Feb 2006 11:21:41 +0000 (GMT) (envelope-from sico@loquefaltaba.com) Received: from mail.loquefaltaba.com (78.Red-213-96-97.staticIP.rima-tde.net [213.96.97.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58B9043D46 for ; Fri, 17 Feb 2006 11:21:39 +0000 (GMT) (envelope-from sico@loquefaltaba.com) Received: from localhost (localhost.loquefaltaba.com [127.0.0.1]) by mail.loquefaltaba.com (Postfix) with ESMTP id 15D56C120; Fri, 17 Feb 2006 12:21:38 +0100 (CET) Received: from mail.loquefaltaba.com ([127.0.0.1]) by localhost (sico.loquefaltaba.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24703-08; Fri, 17 Feb 2006 12:21:31 +0100 (CET) Received: from webmail.loquefaltaba.com (localhost.loquefaltaba.com [127.0.0.1]) by mail.loquefaltaba.com (Postfix) with ESMTP id E6712C11E; Fri, 17 Feb 2006 12:21:30 +0100 (CET) Received: from 194.179.68.110 (SquirrelMail authenticated user sico) by webmail.loquefaltaba.com with HTTP; Fri, 17 Feb 2006 12:21:30 +0100 (CET) Message-ID: <61094.194.179.68.110.1140175290.squirrel@webmail.loquefaltaba.com> In-Reply-To: <200602170607.11056.slackwarewolf@comcast.net> References: <200602170607.11056.slackwarewolf@comcast.net> Date: Fri, 17 Feb 2006 12:21:30 +0100 (CET) From: "David Barbero" To: "Allen" User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: amavisd-new at loquefaltaba.com Cc: hackers@freebsd.org Subject: Re: Dual booting Free BSD 6 and Slackware 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: Fri, 17 Feb 2006 11:21:41 -0000 Hi. Allen wrote: > Hallo all: > > Here is a question which may or may not be simple: > > /boot/vmlinuz > > Is the boot file you add to lilo > > What is the equiv of this in Free BSD? /boot/kernel doesn't seem to work > on > lilo and I'd really like to use it for booting and I've done it before, > that > and Free BSD didn't want to boot Linux at first (Was my fault) so does > anyone > know... Actually I'm assuming you do know because that's why I asked here > instead, but anyway, I've been reading through the books I bought, and it > doesn't mention anything like "Ok, in Linux it's /boot/vmlinuz, in Free > BSD > it's...." > > Any help is appreciated, or a link that explains what to add. If i remember this. You can add next in lilo.conf to boot FreeBSD other=/dev/hdaX label=FreeBSD Change hdaX for your partition number. reinstall lilo and test it. Regards > -Allen -- "Linux is for people who hate Windows, BSD is for people who love UNIX" "Social Engineer -> Because there is no patch for human stupidity" From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 17 12:36:14 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 09A7716A423 for ; Fri, 17 Feb 2006 12:36:14 +0000 (GMT) (envelope-from slackwarewolf@comcast.net) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.192.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E26A43D48 for ; Fri, 17 Feb 2006 12:36:13 +0000 (GMT) (envelope-from slackwarewolf@comcast.net) Received: from [192.168.0.100] (c-69-246-87-201.hsd1.mi.comcast.net[69.246.87.201]) by comcast.net (rwcrmhc11) with ESMTP id <20060217123612m1100pn7tje>; Fri, 17 Feb 2006 12:36:12 +0000 From: Allen To: freebsd-hackers@freebsd.org Date: Fri, 17 Feb 2006 07:36:51 -0500 User-Agent: KMail/1.8 References: <200602170607.11056.slackwarewolf@comcast.net> <61094.194.179.68.110.1140175290.squirrel@webmail.loquefaltaba.com> In-Reply-To: <61094.194.179.68.110.1140175290.squirrel@webmail.loquefaltaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602170736.52167.slackwarewolf@comcast.net> Subject: Re: Dual booting Free BSD 6 and Slackware 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: Fri, 17 Feb 2006 12:36:14 -0000 Hey all, Thanks a lot for all your help. It's Appreciated. I played with it a bit.... Decided that since the installs were new might as well reinstall. This way I can just use the Free BSD boot loader. Thanks again! And if anyone wants a REALLY nice mouse pad, go to the Freebsdmall.com and grab one of Free BSD, VERY nice smooth pad. ;) -Allen From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 17 13:55:00 2006 Return-Path: X-Original-To: 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 5295B16A420 for ; Fri, 17 Feb 2006 13:55:00 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5891843D46 for ; Fri, 17 Feb 2006 13:54:58 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from virusscan.mail (amavis1.rz.uni-wuerzburg.de [132.187.3.48]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 47000146996; Fri, 17 Feb 2006 14:54:57 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id 3A917A4B; Fri, 17 Feb 2006 14:54:57 +0100 (CET) Received: from frodo.galgenberg.net (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 038E8146996; Fri, 17 Feb 2006 14:54:57 +0100 (CET) Received: from coyote.q.local (gb-21-237.galgenberg.net [172.16.21.237]) by frodo.galgenberg.net (8.13.1/8.13.1) with ESMTP id k1HDsuHn083286; Fri, 17 Feb 2006 14:54:56 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (roadrunner.q.local [192.168.0.148]) by coyote.q.local (8.13.4/8.13.4) with ESMTP id k1HDsuub024733; Fri, 17 Feb 2006 14:54:56 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.4/8.13.4) with ESMTP id k1HDsuQJ003976; Fri, 17 Feb 2006 14:54:56 +0100 (CET) (envelope-from q@galgenberg.net) Received: (from q@localhost) by roadrunner.q.local (8.13.4/8.13.4/Submit) id k1HDstou003975; Fri, 17 Feb 2006 14:54:55 +0100 (CET) (envelope-from q@galgenberg.net) Date: Fri, 17 Feb 2006 14:54:55 +0100 From: Ulrich Spoerlein To: Jilles Tjoelker Message-ID: <20060217135455.GB1136@galgenberg.net> Mail-Followup-To: Jilles Tjoelker , Dan Nelson , hackers@freebsd.org References: <20060214212503.GE1107@galgenberg.net> <20060215080532.GB684@turion.vk2pj.dyndns.org> <20060215150237.GA1123@galgenberg.net> <20060215160524.GA70956@dan.emsphone.com> <20060215182730.GB20355@stack.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="v9Ux+11Zm5mwPlX6" Content-Disposition: inline In-Reply-To: <20060215182730.GB20355@stack.nl> X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Cc: hackers@freebsd.org, Dan Nelson Subject: Re: Naive implementation of strverscmp(3) 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: Fri, 17 Feb 2006 13:55:00 -0000 --v9Ux+11Zm5mwPlX6 Content-Type: multipart/mixed; boundary="a8Wt8u1KmwUX3Y2C" Content-Disposition: inline --a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jilles Tjoelker wrote: >On Wed, Feb 15, 2006 at 10:05:24AM -0600, Dan Nelson wrote: > > Your function is simpler than the C implementation on that site, but > > falls over when a run of numbers exceeds 2^31 (raise it to 2^64 if you > > use strtoull, but that's as high as you can yet). > >That problem can be avoided fairly easily. First skip the leading zeroes >on both sides, then strspn for digits; the longest run of digits is >greater, otherwise strncmp it. Yes, the trouble begins, when you really want to be compatible with the=20 GNU version. Attached is an new, ugly version of strverscmp(3) that behaves exactly=20 as the glibc version (at least for a limit amount of testing). Ulrich Spoerlein --=20 PGP Key ID: 20FEE9DD Encrypted mail welcome! Fingerprint: AEC9 AF5E 01AC 4EE1 8F70 6CBD E76E 2227 20FE E9DD Which is worse: ignorance or apathy? Don't know. Don't care. --a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="strverscmp.c" Content-Transfer-Encoding: quoted-printable #include #include #include #include #ifdef __FreeBSD__ int strverscmp(const char *s1, const char *s2); int strverscmp(const char *s1, const char *s2) { static const char *digits =3D "0123456789"; int ret, lz1, lz2; size_t p1, p2; p1 =3D strcspn(s1, digits); p2 =3D strcspn(s2, digits); while (p1 =3D=3D p2 && s1[p1] !=3D '\0' && s2[p2] !=3D '\0') { /* Different prefix */ if ((ret =3D strncmp(s1, s2, p1)) !=3D 0) return ret; s1 +=3D p1; s2 +=3D p2; lz1 =3D lz2 =3D 0; if (*s1 =3D=3D '0') lz1 =3D 1; if (*s2 =3D=3D '0') lz2 =3D 1; =20 if (lz1 > lz2) return -1; else if (lz1 < lz2) return 1; else if (lz1 =3D=3D 1) { /* * If the common prefix for s1 and s2 consists only of zeros, then the * "longer" number has to compare less. Otherwise the comparison needs * to be numerical (just fallthrough). See * http://refspecs.freestandards.org/LSB_2.0.1/LSB-generic/ * LSB-generic/baselib-strverscmp.html */ while (*s1 =3D=3D '0' && *s2 =3D=3D '0') { ++s1; ++s2; } p1 =3D strspn(s1, digits); p2 =3D strspn(s2, digits); /* Catch empty strings */ if (p1 =3D=3D 0 && p2 > 0) return 1; else if (p2 =3D=3D 0 && p1 > 0) return -1; /* Prefixes are not same */ if (*s1 !=3D *s2 && *s1 !=3D '0' && *s2 !=3D '0') { if (p1 < p2) return 1; else if (p1 > p2) return -1; } else { if (p1 < p2) ret =3D strncmp(s1, s2, p1); else if (p1 > p2) ret =3D strncmp(s1, s2, p2); if (ret !=3D 0) return ret; } } =20 p1 =3D strspn(s1, digits); p2 =3D strspn(s2, digits); =20 if (p1 < p2) return -1; else if (p1 > p2) return 1; else if ((ret =3D strncmp(s1, s2, p1)) !=3D 0) return ret; /* Numbers are equal or not present, try with next ones. */ s1 +=3D p1; s2 +=3D p2; p1 =3D strcspn(s1, digits); p2 =3D strcspn(s2, digits); } =20 return strcmp(s1, s2); } #endif int main(int argc, char **argv) { char **array, *temp; int i, j, n =3D 18; array =3D (char **) calloc(n, sizeof(char *)); array[0] =3D strdup("10.jpg"); array[1] =3D strdup("2.jpg"); array[2] =3D strdup("1.jpg"); array[3] =3D strdup("09.jpg"); array[4] =3D strdup("1.012"); array[5] =3D strdup("0010.jpg"); array[6] =3D strdup("1.002"); array[7] =3D strdup("1.01"); array[8] =3D strdup("1.10"); array[9] =3D strdup("1.01000"); array[10] =3D strdup("00000009999999999999999999999999999999999999999999"= ); array[11] =3D strdup("00000010000000000000000000000000000000000000000000"= ); array[12] =3D strdup("9999999999999999999999999999999999999999999"); array[13] =3D strdup("10000000000000000000000000000000000000000000"); array[14] =3D strdup("1.010000"); array[15] =3D strdup("1.09"); array[17] =3D strdup("1.01020"); array[16] =3D strdup("1.0102"); /* Bubble sort */ #if 1 for (i=3D0; i 0) { temp =3D array[j]; array[j] =3D array[i]; array[i] =3D temp; } } printf("%s\n", array[i]); } printf("%2d =3D 0\n", strverscmp("a", "a")); printf("%2d > 0\n", strverscmp("alpha1", "alpha001")); printf("%2d > 0\n", strverscmp("part1_f012", "part1_f01")); printf("%2d < 0\n", strverscmp("item#99", "item#100")); printf("%2d < 0\n", strverscmp("foo.009", "foo.0")); printf("%2d < 0\n", strverscmp("0009", "09")); #endif printf("%2d < 0\n", strverscmp("1.002", "1.01000")); printf("%2d < 0\n", strverscmp("1.01000", "1.0102")); printf("%2d < 0\n", strverscmp("1.002", "1.01")); printf("%2d < 0\n", strverscmp("1.012", "1.09")); printf("%2d < 0\n", strverscmp("1.01", "1.012")); return 0; } --a8Wt8u1KmwUX3Y2C-- --v9Ux+11Zm5mwPlX6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD9dWv524iJyD+6d0RArHEAJ9pPWCt1uc1eaTquIQMqH5Vrl3uawCfb8gm 516Q/pYcDvwYTYEHyA5LAbQ= =9LOD -----END PGP SIGNATURE----- --v9Ux+11Zm5mwPlX6-- From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 17:17:24 2006 Return-Path: X-Original-To: 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 9028116A420 for ; Sat, 18 Feb 2006 17:17:24 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF6FD43D4C for ; Sat, 18 Feb 2006 17:17:23 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.4/8.13.3) with ESMTP id k1IHHIt2073214 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 18 Feb 2006 18:17:19 +0100 (CET) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.4/8.13.3/Submit) id k1IHHIfF073213; Sat, 18 Feb 2006 18:17:18 +0100 (CET) Date: Sat, 18 Feb 2006 18:17:18 +0100 From: Divacky Roman To: hackers@freebsd.org Message-ID: <20060218171718.GA73133@stud.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.49 on 147.229.10.14 Cc: Subject: different behaviour on fbsd and linux 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: Sat, 18 Feb 2006 17:17:24 -0000 hi this simple program #include #include #include main() { pid_t pid; pid = fork(); if (pid == 0) execl("/bin/ls", NULL); } works differently on fbsd and on linux. on fbsd it basically ls each record in ENV on linux it executes ls listing all files in cwd. can someone explain me why? thnx roman From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 17:21:40 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 377D616A420; Sat, 18 Feb 2006 17:21:40 +0000 (GMT) (envelope-from flag@longino.wired.org) Received: from mail.oltrelinux.com (krisma.oltrelinux.com [194.242.226.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9C3143D45; Sat, 18 Feb 2006 17:21:39 +0000 (GMT) (envelope-from flag@longino.wired.org) Received: from longino.wired.org (ip-114-46.sn1.eutelia.it [62.94.114.46]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.oltrelinux.com (Postfix) with ESMTP id 89FB611AE93; Sat, 18 Feb 2006 18:21:39 +0100 (CET) Received: from longino.wired.org (localhost [127.0.0.1]) by longino.wired.org (8.13.4/8.13.4) with ESMTP id k1IHLY6X004195; Sat, 18 Feb 2006 18:21:34 +0100 (CET) (envelope-from flag@longino.wired.org) Received: (from flag@localhost) by longino.wired.org (8.13.4/8.13.4/Submit) id k1IHLY1F004194; Sat, 18 Feb 2006 18:21:34 +0100 (CET) (envelope-from flag) Date: Sat, 18 Feb 2006 18:21:34 +0100 From: Paolo Pisati To: FreeBSD_Hackers , FreeBSD_Net Message-ID: <20060218172134.GA4146@tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at krisma.oltrelinux.com Cc: Subject: [patch] Redirect and LSNAT support in ipfw 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: Sat, 18 Feb 2006 17:21:40 -0000 Hi, as a continuation of my Summer of Code project "Improve libalias" i just decided to release a new version with: 1) dinamyc address support via interface name (ipfw nat 111 config if tun0) 2) redirect and LSNAT support in ipfw following closely the natd syntax. The only difference with natd is that i changed the syntax from redirect_[addr|port|proto] to redir_[addr|port|proto]. See natd man page for details about redirect and LSNAT. 3) patches for ppp and natd to use libalias modules (see libalias/patch/) 4) many bugfixes and improvements here and there as always, it supports 4.x, 5.x, 6.x and 7.x Everything was tested on 6.x, but it compiles fine on 4.x and 7.x too. I don't have any 5.x box, so i just made the diffs for it. Project wiki page: http://wikitest.freebsd.org/moin.cgi/PaoloPisati Download link: http://ubi8.imc.pi.cnr.it/~flag/libalias/libalias.tgz There's a detailed readme.txt inside the archive that explains pretty much all you want to know: from installtion process to internals, so read it. Enjoy. -- Paolo From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 17:22:01 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 AC1CD16A423; Sat, 18 Feb 2006 17:22:01 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2755E43D5D; Sat, 18 Feb 2006 17:22:01 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.252.72]) by hydra.bec.de (Postfix) with ESMTP id 2EE6E35707; Sat, 18 Feb 2006 18:21:59 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 01A286CF4F; Sat, 18 Feb 2006 18:21:52 +0100 (CET) Date: Sat, 18 Feb 2006 18:21:52 +0100 From: joerg@britannica.bec.de To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20060218172152.GB11874@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org, hackers@freebsd.org References: <20060218171718.GA73133@stud.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060218171718.GA73133@stud.fit.vutbr.cz> User-Agent: Mutt/1.5.11 Cc: Subject: Re: different behaviour on fbsd and linux 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: Sat, 18 Feb 2006 17:22:01 -0000 On Sat, Feb 18, 2006 at 06:17:18PM +0100, Divacky Roman wrote: > execl("/bin/ls", NULL); This is wrong. You must specify arg0 != NULL (POSIX says so) and you must NULL-terminate the *following* list. E.g.: execl("/bin/ls", "/bin/ls", NULL); is what you want to do. Joerg From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 17:22:01 2006 Return-Path: X-Original-To: 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 AC1CD16A423; Sat, 18 Feb 2006 17:22:01 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2755E43D5D; Sat, 18 Feb 2006 17:22:01 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.252.72]) by hydra.bec.de (Postfix) with ESMTP id 2EE6E35707; Sat, 18 Feb 2006 18:21:59 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 01A286CF4F; Sat, 18 Feb 2006 18:21:52 +0100 (CET) Date: Sat, 18 Feb 2006 18:21:52 +0100 From: joerg@britannica.bec.de To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20060218172152.GB11874@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org, hackers@freebsd.org References: <20060218171718.GA73133@stud.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060218171718.GA73133@stud.fit.vutbr.cz> User-Agent: Mutt/1.5.11 Cc: Subject: Re: different behaviour on fbsd and linux 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: Sat, 18 Feb 2006 17:22:01 -0000 On Sat, Feb 18, 2006 at 06:17:18PM +0100, Divacky Roman wrote: > execl("/bin/ls", NULL); This is wrong. You must specify arg0 != NULL (POSIX says so) and you must NULL-terminate the *following* list. E.g.: execl("/bin/ls", "/bin/ls", NULL); is what you want to do. Joerg From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 17:22:42 2006 Return-Path: X-Original-To: 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 AB41D16A420 for ; Sat, 18 Feb 2006 17:22:42 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FCBD43D75 for ; Sat, 18 Feb 2006 17:22:37 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k1IHLR5W053530 for ; Sat, 18 Feb 2006 10:21:27 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 18 Feb 2006 10:21:45 -0700 (MST) Message-Id: <20060218.102145.26324437.imp@bsdimp.com> To: hackers@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 18 Feb 2006 10:21:27 -0700 (MST) Cc: Subject: Bad block -> file mapping 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: Sat, 18 Feb 2006 17:22:42 -0000 I have a hard disk that's been in service a long time. I recently installed the SMART monitoring tools. On occasion, I get reports of LBAs it can't read. I'd like to map the LBA to an actual file in the file system, if possible. Does anybody have any tools that can help me with this? I know I need to get a new disk. In the mean time, I need to cope with these errors in a sane manner... Warner P.S. Here's a sample report: Num Test_Description Status LifeTime(hours) LBA_of_first_error # 1 Extended offline Completed: read failure 8949 65818210 # 2 Short offline Completed without error 8948 - From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 17:35:33 2006 Return-Path: X-Original-To: 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 502AE16A422 for ; Sat, 18 Feb 2006 17:35:33 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from gate.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E0D243D46 for ; Sat, 18 Feb 2006 17:35:32 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost [127.0.0.1]) by gate.bitblocks.com (8.13.4/8.13.1) with ESMTP id k1IHZOuj040864; Sat, 18 Feb 2006 09:35:25 -0800 (PST) (envelope-from bakul@bitblocks.com) Message-Id: <200602181735.k1IHZOuj040864@gate.bitblocks.com> To: "M. Warner Losh" In-reply-to: Your message of "Sat, 18 Feb 2006 10:21:45 MST." <20060218.102145.26324437.imp@bsdimp.com> Date: Sat, 18 Feb 2006 09:35:24 -0800 From: Bakul Shah Cc: hackers@freebsd.org Subject: Re: Bad block -> file mapping 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: Sat, 18 Feb 2006 17:35:33 -0000 > I have a hard disk that's been in service a long time. I recently > installed the SMART monitoring tools. On occasion, I get reports of > LBAs it can't read. I'd like to map the LBA to an actual file in the > file system, if possible. Does anybody have any tools that can help > me with this? > > I know I need to get a new disk. In the mean time, I need to cope > with these errors in a sane manner... > > Warner > > P.S. Here's a sample report: > > Num Test_Description Status LifeTime(hours) LBA_of_first_error > # 1 Extended offline Completed: read failure 8949 65818210 > # 2 Short offline Completed without error 8948 - Wouldn't bad block forwarding by the disk take care of this? Generally you want the read of a bad block to return an error but if you write the block the disk will automatically remap this block to one of the spare blocks. What exactly are you trying to do by mapping a bad block to a file? Nevertheless may be fsdb will help? You still need to map LBA to the slice/partition offset. From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 17:39:16 2006 Return-Path: X-Original-To: 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 98C5D16A422 for ; Sat, 18 Feb 2006 17:39:16 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AE6643D6D for ; Sat, 18 Feb 2006 17:39:12 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.4/8.13.3) with ESMTP id k1IHd8te073935 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 18 Feb 2006 18:39:08 +0100 (CET) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.4/8.13.3/Submit) id k1IHd89E073934 for hackers@freebsd.org; Sat, 18 Feb 2006 18:39:08 +0100 (CET) Date: Sat, 18 Feb 2006 18:39:08 +0100 From: Divacky Roman To: hackers@freebsd.org Message-ID: <20060218173908.GA73913@stud.fit.vutbr.cz> References: <20060218171718.GA73133@stud.fit.vutbr.cz> <20060218172152.GB11874@britannica.bec.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060218172152.GB11874@britannica.bec.de> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.49 on 147.229.10.14 Cc: Subject: Re: different behaviour on fbsd and linux 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: Sat, 18 Feb 2006 17:39:16 -0000 On Sat, Feb 18, 2006 at 06:21:52PM +0100, joerg@britannica.bec.de wrote: > On Sat, Feb 18, 2006 at 06:17:18PM +0100, Divacky Roman wrote: > > execl("/bin/ls", NULL); > > This is wrong. You must specify arg0 != NULL (POSIX says so) and you > must NULL-terminate the *following* list. > > E.g.: > execl("/bin/ls", "/bin/ls", NULL); > is what you want to do. ah.. thnx.. the man page should be updated with "he first argument, by convention, should point to the file name associated with the file being executed." s/should/must then roman From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 17:42:27 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 34C2E16A420 for ; Sat, 18 Feb 2006 17:42:27 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep20-int.chello.at (viefep12-int.chello.at [213.46.255.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3909743D62 for ; Sat, 18 Feb 2006 17:42:22 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep20-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20060218174220.QMLT24926.viefep20-int.chello.at@wombat.fafoe.narf.at>; Sat, 18 Feb 2006 18:42:20 +0100 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id D6DFABE7A; Sat, 18 Feb 2006 18:42:19 +0100 (CET) Date: Sat, 18 Feb 2006 18:42:19 +0100 From: Stefan Farfeleder To: joerg@britannica.bec.de Message-ID: <20060218174216.GC578@wombat.fafoe.narf.at> Mail-Followup-To: joerg@britannica.bec.de, freebsd-hackers@freebsd.org References: <20060218171718.GA73133@stud.fit.vutbr.cz> <20060218172152.GB11874@britannica.bec.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060218172152.GB11874@britannica.bec.de> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: different behaviour on fbsd and linux 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: Sat, 18 Feb 2006 17:42:27 -0000 On Sat, Feb 18, 2006 at 06:21:52PM +0100, joerg@britannica.bec.de wrote: > On Sat, Feb 18, 2006 at 06:17:18PM +0100, Divacky Roman wrote: > > execl("/bin/ls", NULL); > > This is wrong. You must specify arg0 != NULL (POSIX says so) and you > must NULL-terminate the *following* list. > > E.g.: > execl("/bin/ls", "/bin/ls", NULL); > is what you want to do. execl("/bin/ls", "/bin/ls", (char *)NULL); as NULL might expand to an integer 0. Stefan From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 17:49:40 2006 Return-Path: X-Original-To: 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 4F58116A449 for ; Sat, 18 Feb 2006 17:49:40 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87A8543D45 for ; Sat, 18 Feb 2006 17:49:39 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k1IHlW9G075979; Sat, 18 Feb 2006 10:47:32 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 18 Feb 2006 10:47:49 -0700 (MST) Message-Id: <20060218.104749.104696960.imp@bsdimp.com> To: bakul@bitblocks.com From: "M. Warner Losh" In-Reply-To: <200602181735.k1IHZOuj040864@gate.bitblocks.com> References: <20060218.102145.26324437.imp@bsdimp.com> <200602181735.k1IHZOuj040864@gate.bitblocks.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 18 Feb 2006 10:47:32 -0700 (MST) Cc: hackers@freebsd.org Subject: Re: Bad block -> file mapping 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: Sat, 18 Feb 2006 17:49:40 -0000 In message: <200602181735.k1IHZOuj040864@gate.bitblocks.com> Bakul Shah writes: : > I have a hard disk that's been in service a long time. I recently : > installed the SMART monitoring tools. On occasion, I get reports of : > LBAs it can't read. I'd like to map the LBA to an actual file in the : > file system, if possible. Does anybody have any tools that can help : > me with this? : > : > I know I need to get a new disk. In the mean time, I need to cope : > with these errors in a sane manner... : > : > Warner : > : > P.S. Here's a sample report: : > : > Num Test_Description Status LifeTime(hours) LBA_of_first_error : > # 1 Extended offline Completed: read failure 8949 65818210 : > # 2 Short offline Completed without error 8948 - : : Wouldn't bad block forwarding by the disk take care of this? : Generally you want the read of a bad block to return an error : but if you write the block the disk will automatically remap : this block to one of the spare blocks. Correct. That's exactly what I'm trying to do. : What exactly are you trying to do by mapping a bad block to a : file? Nevertheless may be fsdb will help? You still need to : map LBA to the slice/partition offset. Right, I've mapped the lba to a partition, and used badsect to request that at the next fsck the file that contains the bad block be removed and replaced with the file in BAD. However, I'd kinda like to know which file that is. If it is a boring file (foo.o, say), I'd dd the bad block with 0's and then remove it. If it is a non-boring file, I'd try to recover it a couple of times, etc. Once I have the file in BAD, I'd planned on overwriting it with 0's and then removing it if I could read the block again. Maybe there's a better way to cope, maybe not. I don't know. Hence my question :-). This is with an ata disk, btw. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 18:01:17 2006 Return-Path: X-Original-To: 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 A96A916A420 for ; Sat, 18 Feb 2006 18:01:17 +0000 (GMT) (envelope-from markus@trippelsdorf.de) Received: from blue-ld-032.synserver.de (blue-ld-032.synserver.de [217.119.50.235]) by mx1.FreeBSD.org (Postfix) with SMTP id D4D7C43D45 for ; Sat, 18 Feb 2006 18:01:16 +0000 (GMT) (envelope-from markus@trippelsdorf.de) Received: (qmail 21166 invoked by uid 0); 18 Feb 2006 18:01:07 -0000 X-SynServer-RemoteDnsName: port-212-202-36-170.dynamic.qsc.de X-SynServer-AuthUser: markus@trippelsdorf.de Received: from port-212-202-36-170.dynamic.qsc.de (HELO bsd.trippelsdorf.de) (212.202.36.170) by mx-04.synserver.de with SMTP; 18 Feb 2006 18:01:06 -0000 Date: Sat, 18 Feb 2006 19:01:12 +0100 From: Markus Trippelsdorf To: "M. Warner Losh" Message-ID: <20060218180112.GA765@bsd.trippelsdorf.de> References: <20060218.102145.26324437.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060218.102145.26324437.imp@bsdimp.com> Cc: hackers@freebsd.org Subject: Re: Bad block -> file mapping 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: Sat, 18 Feb 2006 18:01:17 -0000 On Sat, Feb 18, 2006 at 10:21:45AM -0700, M. Warner Losh wrote: > I have a hard disk that's been in service a long time. I recently > installed the SMART monitoring tools. On occasion, I get reports of > LBAs it can't read. I'd like to map the LBA to an actual file in the > file system, if possible. Does anybody have any tools that can help > me with this? http://smartmontools.sourceforge.net/BadBlockHowTo.txt might be helpful. (of course you have to adapt the (Linux-)instructions to FreeBSD) -- Markus From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 18:01:20 2006 Return-Path: X-Original-To: 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 8B57F16A420 for ; Sat, 18 Feb 2006 18:01:20 +0000 (GMT) (envelope-from wb@freebie.xs4all.nl) Received: from smtp-vbr15.xs4all.nl (smtp-vbr15.xs4all.nl [194.109.24.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFD3643D48 for ; Sat, 18 Feb 2006 18:01:19 +0000 (GMT) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253]) by smtp-vbr15.xs4all.nl (8.13.3/8.13.3) with ESMTP id k1II0umB097452; Sat, 18 Feb 2006 19:00:56 +0100 (CET) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.13.4/8.13.3) with ESMTP id k1II0tMZ063082; Sat, 18 Feb 2006 19:00:55 +0100 (CET) (envelope-from wb@freebie.xs4all.nl) Received: (from wb@localhost) by freebie.xs4all.nl (8.13.4/8.13.1/Submit) id k1II0t0N063081; Sat, 18 Feb 2006 19:00:55 +0100 (CET) (envelope-from wb) Date: Sat, 18 Feb 2006 19:00:55 +0100 From: Wilko Bulte To: "M. Warner Losh" Message-ID: <20060218180055.GA63046@freebie.xs4all.nl> References: <20060218.102145.26324437.imp@bsdimp.com> <200602181735.k1IHZOuj040864@gate.bitblocks.com> <20060218.104749.104696960.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060218.104749.104696960.imp@bsdimp.com> X-OS: FreeBSD 6.1-PRERELEASE User-Agent: Mutt/1.5.11 X-Virus-Scanned: by XS4ALL Virus Scanner Cc: hackers@freebsd.org Subject: Re: Bad block -> file mapping 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: Sat, 18 Feb 2006 18:01:20 -0000 On Sat, Feb 18, 2006 at 10:47:49AM -0700, M. Warner Losh wrote.. > In message: <200602181735.k1IHZOuj040864@gate.bitblocks.com> > Bakul Shah writes: > : > I have a hard disk that's been in service a long time. I recently > : > installed the SMART monitoring tools. On occasion, I get reports of > : > LBAs it can't read. I'd like to map the LBA to an actual file in the > : > file system, if possible. Does anybody have any tools that can help > : > me with this? > : > > : > I know I need to get a new disk. In the mean time, I need to cope > : > with these errors in a sane manner... > : > > : > Warner > : > > : > P.S. Here's a sample report: > : > > : > Num Test_Description Status LifeTime(hours) LBA_of_first_error > : > # 1 Extended offline Completed: read failure 8949 65818210 > : > # 2 Short offline Completed without error 8948 - > : > : Wouldn't bad block forwarding by the disk take care of this? > : Generally you want the read of a bad block to return an error > : but if you write the block the disk will automatically remap > : this block to one of the spare blocks. > > Correct. That's exactly what I'm trying to do. > > : What exactly are you trying to do by mapping a bad block to a > : file? Nevertheless may be fsdb will help? You still need to > : map LBA to the slice/partition offset. > > Right, I've mapped the lba to a partition, and used badsect to request > that at the next fsck the file that contains the bad block be removed > and replaced with the file in BAD. However, I'd kinda like to know > which file that is. If it is a boring file (foo.o, say), I'd dd the > bad block with 0's and then remove it. If it is a non-boring file, > I'd try to recover it a couple of times, etc. > > Once I have the file in BAD, I'd planned on overwriting it with 0's > and then removing it if I could read the block again. > > Maybe there's a better way to cope, maybe not. I don't know. Hence > my question :-). > > This is with an ata disk, btw. Obviously. But for intents and purposes it could have been an RK05 :-P So much for progress -- Wilko Bulte wilko@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 19:02:09 2006 Return-Path: X-Original-To: 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 E5B6116A420 for ; Sat, 18 Feb 2006 19:02:09 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from gate.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id A900243D45 for ; Sat, 18 Feb 2006 19:02:09 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost [127.0.0.1]) by gate.bitblocks.com (8.13.4/8.13.1) with ESMTP id k1IJ243D041278; Sat, 18 Feb 2006 11:02:04 -0800 (PST) (envelope-from bakul@bitblocks.com) Message-Id: <200602181902.k1IJ243D041278@gate.bitblocks.com> To: "M. Warner Losh" In-reply-to: Your message of "Sat, 18 Feb 2006 10:47:49 MST." <20060218.104749.104696960.imp@bsdimp.com> Date: Sat, 18 Feb 2006 11:02:04 -0800 From: Bakul Shah Cc: hackers@freebsd.org Subject: Re: Bad block -> file mapping 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: Sat, 18 Feb 2006 19:02:10 -0000 > However, I'd kinda like to know > which file that is. If it is a boring file (foo.o, say), I'd dd the > bad block with 0's and then remove it. If it is a non-boring file, > I'd try to recover it a couple of times, etc. So you want a function that does this? LBA -> slice/partition/offset -> fs/inode -> list of file names Logic for the second step should be in fsck. I haven't kept uptodate on disk stds so likely I am talking through my hat but in ST506 there used to be a diagnostic read function that returned the bad block and its CRC. That allows at least a chance of a manual correction. > Once I have the file in BAD, I'd planned on overwriting it with 0's > and then removing it if I could read the block again. Why do you care? > Maybe there's a better way to cope, maybe not. I don't know. Hence > my question :-). > > This is with an ata disk, btw. My sympathies. From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 19:10:41 2006 Return-Path: X-Original-To: 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 2FB5D16A420 for ; Sat, 18 Feb 2006 19:10:41 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3C9F43D46 for ; Sat, 18 Feb 2006 19:10:40 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k1IJ7oqc071110; Sat, 18 Feb 2006 12:07:50 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 18 Feb 2006 12:08:08 -0700 (MST) Message-Id: <20060218.120808.73002804.imp@bsdimp.com> To: bakul@bitblocks.com From: "M. Warner Losh" In-Reply-To: <200602181902.k1IJ243D041278@gate.bitblocks.com> References: <20060218.104749.104696960.imp@bsdimp.com> <200602181902.k1IJ243D041278@gate.bitblocks.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 18 Feb 2006 12:07:50 -0700 (MST) Cc: hackers@freebsd.org Subject: Re: Bad block -> file mapping 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: Sat, 18 Feb 2006 19:10:41 -0000 In message: <200602181902.k1IJ243D041278@gate.bitblocks.com> Bakul Shah writes: : > However, I'd kinda like to know : > which file that is. If it is a boring file (foo.o, say), I'd dd the : > bad block with 0's and then remove it. If it is a non-boring file, : > I'd try to recover it a couple of times, etc. : : So you want a function that does this? : : LBA -> slice/partition/offset -> fs/inode -> list of file names : : Logic for the second step should be in fsck. Yea. I was kinda hoping to find a tool that would do that given the LBA of the disk... I can do the math by hand, but if I don't have to... : I haven't kept uptodate on disk stds so likely I am talking : through my hat but in ST506 there used to be a diagnostic : read function that returned the bad block and its CRC. That : allows at least a chance of a manual correction. : : > Once I have the file in BAD, I'd planned on overwriting it with 0's : > and then removing it if I could read the block again. : : Why do you care? I want to know what file I'm trashing, explicitly. I could just do the dd trick to the raw block, but then I'd have a divot left in the file that I have no clue is there... Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 19:56:41 2006 Return-Path: X-Original-To: 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 A031716A420 for ; Sat, 18 Feb 2006 19:56:41 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9DDA43D48 for ; Sat, 18 Feb 2006 19:56:40 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.13.3/8.13.3) with ESMTP id k1IJuJEX058554; Sat, 18 Feb 2006 22:56:19 +0300 (MSK) (envelope-from maxim@macomnet.ru) Date: Sat, 18 Feb 2006 22:56:19 +0300 (MSK) From: Maxim Konovalov To: "M. Warner Losh" In-Reply-To: <20060218.102145.26324437.imp@bsdimp.com> Message-ID: <20060218225139.V58463@mp2.macomnet.net> References: <20060218.102145.26324437.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: hackers@freebsd.org Subject: Re: Bad block -> file mapping 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: Sat, 18 Feb 2006 19:56:41 -0000 On Sat, 18 Feb 2006, 10:21-0700, M. Warner Losh wrote: > I have a hard disk that's been in service a long time. I recently > installed the SMART monitoring tools. On occasion, I get reports of > LBAs it can't read. I'd like to map the LBA to an actual file in the > file system, if possible. Does anybody have any tools that can help > me with this? > > I know I need to get a new disk. In the mean time, I need to cope > with these errors in a sane manner... May http://tinyurl.com/c7dr4 help? -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 21:14:02 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 1543116A420 for ; Sat, 18 Feb 2006 21:14:02 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6B9243D48 for ; Sat, 18 Feb 2006 21:14:01 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k1ILCuu8050524; Sat, 18 Feb 2006 14:12:56 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 18 Feb 2006 14:13:15 -0700 (MST) Message-Id: <20060218.141315.100064292.imp@bsdimp.com> To: stefan@fafoe.narf.at From: "M. Warner Losh" In-Reply-To: <20060218174216.GC578@wombat.fafoe.narf.at> References: <20060218171718.GA73133@stud.fit.vutbr.cz> <20060218172152.GB11874@britannica.bec.de> <20060218174216.GC578@wombat.fafoe.narf.at> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 18 Feb 2006 14:13:01 -0700 (MST) Cc: freebsd-hackers@freebsd.org, joerg@britannica.bec.de Subject: Re: different behaviour on fbsd and linux 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: Sat, 18 Feb 2006 21:14:02 -0000 In message: <20060218174216.GC578@wombat.fafoe.narf.at> Stefan Farfeleder writes: : On Sat, Feb 18, 2006 at 06:21:52PM +0100, joerg@britannica.bec.de wrote: : > On Sat, Feb 18, 2006 at 06:17:18PM +0100, Divacky Roman wrote: : > > execl("/bin/ls", NULL); : > : > This is wrong. You must specify arg0 != NULL (POSIX says so) and you : > must NULL-terminate the *following* list. : > : > E.g.: : > execl("/bin/ls", "/bin/ls", NULL); : > is what you want to do. : : execl("/bin/ls", "/bin/ls", (char *)NULL); as NULL might expand to an : integer 0. This is one of the times that the difference is important, since this function is a varadic one, and you must always cast when passing through varadic args. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 21:43:34 2006 Return-Path: X-Original-To: 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 6F2A216A420 for ; Sat, 18 Feb 2006 21:43:34 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA29343D46 for ; Sat, 18 Feb 2006 21:43:33 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (dk0omz7jk8xldi5s@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.3/8.13.3) with ESMTP id k1ILhWn1037450; Sat, 18 Feb 2006 13:43:32 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.3/8.13.3/Submit) id k1ILhUNu037449; Sat, 18 Feb 2006 13:43:30 -0800 (PST) (envelope-from jmg) Date: Sat, 18 Feb 2006 13:43:30 -0800 From: John-Mark Gurney To: Divacky Roman Message-ID: <20060218214329.GF69162@funkthat.com> Mail-Followup-To: Divacky Roman , hackers@freebsd.org References: <20060218171718.GA73133@stud.fit.vutbr.cz> <20060218172152.GB11874@britannica.bec.de> <20060218173908.GA73913@stud.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060218173908.GA73913@stud.fit.vutbr.cz> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: hackers@freebsd.org Subject: Re: different behaviour on fbsd and linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2006 21:43:34 -0000 Divacky Roman wrote this message on Sat, Feb 18, 2006 at 18:39 +0100: > On Sat, Feb 18, 2006 at 06:21:52PM +0100, joerg@britannica.bec.de wrote: > > On Sat, Feb 18, 2006 at 06:17:18PM +0100, Divacky Roman wrote: > > > execl("/bin/ls", NULL); > > > > This is wrong. You must specify arg0 != NULL (POSIX says so) and you > > must NULL-terminate the *following* list. > > > > E.g.: > > execl("/bin/ls", "/bin/ls", NULL); > > is what you want to do. > > > ah.. thnx.. the man page should be updated with "he > first argument, by convention, should point to the file name associated > with the file being executed." > > s/should/must then Nope.. it need not be the same.. in cases like this: execl("/usr/bin/gzip", "gunzip", NULL); will give you gunzip behavior because the gzip binary looks at argv[0] and changes it's behavior based upon what it finds.. look at crunchgen for the ability to combine different programs into one binary... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 21:48:53 2006 Return-Path: X-Original-To: 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 8474F16A420 for ; Sat, 18 Feb 2006 21:48:53 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 059AB43D72 for ; Sat, 18 Feb 2006 21:48:52 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (ujngihhm2ph5tgcn@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.3/8.13.3) with ESMTP id k1ILmhHc037630; Sat, 18 Feb 2006 13:48:43 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.3/8.13.3/Submit) id k1ILmgJs037629; Sat, 18 Feb 2006 13:48:42 -0800 (PST) (envelope-from jmg) Date: Sat, 18 Feb 2006 13:48:42 -0800 From: John-Mark Gurney To: "M. Warner Losh" Message-ID: <20060218214842.GG69162@funkthat.com> Mail-Followup-To: "M. Warner Losh" , hackers@freebsd.org References: <20060218.102145.26324437.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060218.102145.26324437.imp@bsdimp.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: hackers@freebsd.org Subject: Re: Bad block -> file mapping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2006 21:48:53 -0000 Warner Losh wrote this message on Sat, Feb 18, 2006 at 10:21 -0700: > I have a hard disk that's been in service a long time. I recently > installed the SMART monitoring tools. On occasion, I get reports of > LBAs it can't read. I'd like to map the LBA to an actual file in the > file system, if possible. Does anybody have any tools that can help > me with this? > > I know I need to get a new disk. In the mean time, I need to cope > with these errors in a sane manner... ffsrecov will do this for UFS1... I did make ffsrecov compile on 5.x, but w/ the complications of making it support UFS2, I abandoned it.. With a bit of work, ffsrecov.py can be taught this and handle both ufs1 and ufs2... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."