From owner-freebsd-current@FreeBSD.ORG Mon Jul 2 05:05:28 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FB1C16A41F for ; Mon, 2 Jul 2007 05:05:28 +0000 (UTC) (envelope-from nate@root.org) Received: from root.org (root.org [67.118.192.226]) by mx1.freebsd.org (Postfix) with ESMTP id E443C13C447 for ; Mon, 2 Jul 2007 05:05:27 +0000 (UTC) (envelope-from nate@root.org) Received: (qmail 49877 invoked from network); 2 Jul 2007 05:05:29 -0000 Received: from ppp-71-139-42-13.dsl.snfc21.pacbell.net (HELO ?10.0.5.18?) (nate-mail@71.139.42.13) by root.org with ESMTPA; 2 Jul 2007 05:05:29 -0000 Message-ID: <4688878F.20406@root.org> Date: Sun, 01 Jul 2007 22:05:19 -0700 From: Nate Lawson User-Agent: Thunderbird 2.0.0.4 (X11/20070617) MIME-Version: 1.0 To: Poul-Henning Kamp References: <54253.1183351841@critter.freebsd.dk> In-Reply-To: <54253.1183351841@critter.freebsd.dk> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: marck@rinet.ru, "M. Warner Losh" , current@freebsd.org Subject: Re: GEOM weirdness with SD flash reader? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2007 05:05:28 -0000 Poul-Henning Kamp wrote: > In message <4688830C.6050701@root.org>, Nate Lawson writes: > >> camcontrol tur (test unit ready) will return an error or success if the >> medium is now present. Kicking off a process to do that when a >> removable media da(4) device appears seems like a good idea. It could >> also be a thread in devd. > > I would call that "The Linux Solution" :-) > > The right place to poll is from scsi_da. I disagree. Once scsi_da found the media, it would then somehow need to notify devd (i.e. to automount). If both functions are in devd, the loop becomes: while (1) { camcontrol tur mydev; if (found) notify_automount; break; sleep 3; } -- Nate