From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tokarev Subject: Re: [PATCH] driver-core: devtmpfs - driver core maintained /dev tmpfs Date: Sun, 03 May 2009 11:29:20 +0400 Message-ID: <49FD47D0.2070802@msgid.tls.msk.ru> References: <1241097822.2516.3.camel@poy> <20090502071636.GA9487@infradead.org> <9b2b86520905021322l31845d2dubad98d78380aa1d5@mail.gmail.com> <9b2b86520905021504r3d32045ke1c14ffff1ffc898@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from isrv.corpit.ru ([81.13.33.159]:46737 "EHLO isrv.corpit.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751693AbZECH3W (ORCPT ); Sun, 3 May 2009 03:29:22 -0400 In-Reply-To: <9b2b86520905021504r3d32045ke1c14ffff1ffc898@mail.gmail.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Alan Jenkins Cc: Kay Sievers , Christoph Hellwig , linux-kernel , Greg KH , Jan Blunck , linux-arch@vger.kernel.org, viro@zeniv.linux.org.uk, torvalds@osdl.org, akpm@osdl.org, adam@yggdrasil.com Alan Jenkins wrote: > On 5/2/09, Kay Sievers wrote: [] >>> And it >>> gives a nice clean way for new initramfs' to test for this feature - >>> when they try to mount it, it fails. It would seem to make for a >>> rather smoother migration path. >> I think that is all covered just fine. > > Oh, I see. > > grep "/dev" /proc/mounts > /dev/null Oh no. This one will match all your /dev/sda1 etc too :) What yo want to do is either grep -w /dev /proc/mount or awk '$2 == "/dev" { exit 0; } END { exit 1; }' /proc/mounts or something similar. To distinguish between the following two cases: /dev/sda1 / ext3 rw,noatime,data=ordered 0 0 devfs /dev tmpfs rw,nosuid,size=512k,mode=755 0 0 /mjt