Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Feb 2012 09:02:15 +0100
From:      vermaden <vermaden@interia.pl>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        fidaj@ukr.net, freebsd-stable@FreeBSD.org, lars.engels@0x20.net, Andriy Gapon <avg@FreeBSD.org>, Hans Petter Selasky <hselasky@c2i.net>, Alexander Leidinger <Alexander@Leidinger.net>
Subject:   Re: devd based AUTOMOUNTER
Message-ID:  <pdgggwagzubujzgigjfm@diij>
In-Reply-To: <20120229163223.L80360@sola.nimnet.asn.au>
References:  <hkubftdrahxmtuzcfqzh@ziad> <4F3EE186.4020801@gmail.com> <uhhupehcnrebtwjfedhg@xlkc> <201202181409.08859.hselasky@c2i.net> <evbvqmovseenzzafkvdy@cufm> <dusvifyxcdqegubftcgz@lvhf> <20120226203949.H89643@sola.nimnet.asn.au> <CAN6yY1uYMfWqkbXLHXuS-bTKes7T=YMS%2BfBX8_%2BXtx9-rBFmyw@mail.gmail.com> <ztlcngurasjmdlkymcau@dovo> <CAN6yY1sfFH%2B4pBmmSmREG5xO1nF8iCzPwXKuXAOG3rBrsO62bg@mail.gmail.com> <kovckjfzfftyzqjrypqv@khtj> <20120228162636.Horde.JgORKJjmRSRPTPIsGKfo0uA@webmail.leidinger.net> <4F4D403E.2030703@FreeBSD.org> <qdhsbowuuhzdjuvpiakq@eioe> <4F4D510E.60206@FreeBSD.org> <djdyclvoifckkqwlcaho@lbgx> <20120229163223.L80360@sola.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
"Ian Smith" <smithi@nimnet.asn.au> 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








































...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?pdgggwagzubujzgigjfm>