From owner-freebsd-stable@FreeBSD.ORG Wed Feb 29 08:02:17 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D85B106564A; Wed, 29 Feb 2012 08:02:17 +0000 (UTC) (envelope-from vermaden@interia.pl) Received: from smtpo.poczta.interia.pl (smtpo.poczta.interia.pl [217.74.65.207]) by mx1.freebsd.org (Postfix) with ESMTP id 752848FC17; Wed, 29 Feb 2012 08:02:16 +0000 (UTC) Date: Wed, 29 Feb 2012 09:02:15 +0100 From: vermaden To: Ian Smith X-Mailer: interia.pl/pf09 In-Reply-To: <20120229163223.L80360@sola.nimnet.asn.au> References: <4F3EE186.4020801@gmail.com> <201202181409.08859.hselasky@c2i.net> <20120226203949.H89643@sola.nimnet.asn.au> <20120228162636.Horde.JgORKJjmRSRPTPIsGKfo0uA@webmail.leidinger.net> <4F4D403E.2030703@FreeBSD.org> <4F4D510E.60206@FreeBSD.org> <20120229163223.L80360@sola.nimnet.asn.au> X-Originating-IP: 194.0.181.128 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; s=biztos; t=1330502535; bh=DMjgg9eSpFR7sbLDF4nof+LwwaTEf7+ta3lICwMIdPY=; h=Date:From:Subject:To:Cc:X-Mailer:In-Reply-To:References: X-Originating-IP:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding; b=TrASWBcJiQlIbx55ALrvhiVNUxdOFeLMgvNwUl5V59UOz6msHPfmqHg35tEVYLTSH 6qEe/wCQ/V64ChipK26BeQxpuDHZcvMkQtmjracQCATHzEOTyooc57TCxShEJt9lVz JAEv2s0GURUXIju38/hMJ3IzliDdJgUnNG/m2SSI= Cc: fidaj@ukr.net, freebsd-stable@FreeBSD.org, lars.engels@0x20.net, Andriy Gapon , Hans Petter Selasky , Alexander Leidinger Subject: Re: devd based AUTOMOUNTER X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Feb 2012 08:02:17 -0000 "Ian Smith" pisze: > On Tue, 28 Feb 2012, vermaden wrote: > > "Andriy Gapon" pisze: > > > on 29/02/2012 00:04 vermaden said the following: > > > > "Andriy Gapon" said: > > > >> on 28/02/2012 17:26 Alexander Leidinger said the following: > > > >>> The kernel does not poll for CD changes, and the people guarding= the relevant CD > > > >>> code where against something like this in the kernel everytime t= his came up in > > > >>> the past. So no devd event for this. > > > >> > > > >> My impression was that lately people were asking for it (and nobo= dy actually > > > >> "guarded" the code), but there is no good design on how to do it. > > > >=20 > > > > The mentioned earlier sysctl OID changes whenever CD is in the > > > > drive or not, something changes that ... so adding appreciate > > > > events like "MEDIA INSERTED" and "MEDIA REMOVED" to cd* class > > > > should be enought to handle them and mount/umount the > > > > medium with script like mine with appreciate devd(8) config. > > >=20 > > > I don't think that there is any kernel component that pro-actively c= hanges that > > > value. Most likely you have something like hald running or otherwis= e tried to > > > access the device before the change was noted. > >=20 > > I do not even have working CD drive in my laptop, so I cant tell ;) > >=20 > > Ivan Klymenko sent this earlier in that thread: > >=20 > > NO CD: > > > kern.geom.conftxt: 0 DISK cd0 0 2048 hd 0 sc 0 > >=20 > > CD IN: > > > kern.geom.conftxt: 0 DISK cd0 4700372992 2048 hd 0 sc 0 >=20 > That looks like a DVD, I only have a CDRW in this .. but inserting=20 > either a music or a data CD has no effect whatsoever on that sysctl=20 > here, on 8.2-RELEASE anyway, which still has /dev/acd0 as well. >=20 > Further, it's not so easy to parse: >=20 > t23# sysctl kern.geom.conftxt > t23# >=20 > ie nothing, but no 'unknown oid' either, huh? >=20 > t23# sysctl -d kern.geom.conftxt > kern.geom.conftxt: Dump the GEOM config in txt >=20 > Hmm, checking sysctl(8), only the -b switch seems to dump it: >=20 > t23# sysctl -b kern.geom.conftxt > 0 DISK cd0 534181888 2048 hd 0 sc 0 > 0 DISK ad0 120034123776 512 hd 16 sc 63 > 1 PART ad0s4 34143137280 512 i 4 o 85888373760 ty freebsd xs MBR xt 165 > [.. partitions on slices s4, s3, s2 and DOS slice s1 shown, omitted ..] >=20 > but: >=20 > t23# sysctl -b kern.geom.conftxt | grep cd0 > Binary file (standard input) matches >=20 > Note also that the above entry for cd0 does NOT change after inserting=20 > various different data CDs, all different sizes, nor after mounting one,=20 > so that 534181888 entry is from some time before, perhaps the first CD=20 > inserted after boot, not sure? Also the sizes are bytes, regardless of=20 > sector size (DVD above, while ad0s4 is a 32GiB slice on a 120GB disk). >=20 > Doesn't look like this one is going to fly. Ok, so at least we have a confirmation that its not currently possible, thank You for clarification. > (meanwhile other progress is looking good, maybe I'll get some time > next month to play with it, still behind due to aforesaid near-disaster := ) Sure, have fun! ;) Regards, vermaden ...