[arch-releng] [PATCH 1/3] Use devtmpfs for /dev on the target
Thomas Hebb
tommyhebb at gmail.com
Sun May 20 22:07:06 EDT 2012
I made this change purely for consistency, as the other mount commands
use proc and sysfs, respectively. Feel free to ignore it if you like
though -- the other patches are the important ones.
On 05/20/2012 10:00 PM, Dave Reisner wrote:
> On Sun, May 20, 2012 at 09:57:37PM -0400, Thomas Hebb wrote:
>> Switch from using a bind mount to devtmpfs when mounting /dev on the
>> target system.
>>
>> Signed-off-by: Thomas Hebb <tommyhebb at gmail.com>
>> ---
>
> This is effectively a no-op. Within a given namespace, you can only have
> a single instance of devtmpfs. Additionally, a bind mount isn't doing
> anything special -- it's just syntactic sugar for the kernel.
>
>> src/core/libs/lib-blockdevices-filesystems.sh | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
>> index 4312143..70805c8 100644
>> --- a/src/core/libs/lib-blockdevices-filesystems.sh
>> +++ b/src/core/libs/lib-blockdevices-filesystems.sh
>> @@ -112,9 +112,9 @@ target_special_fs ()
>> ! [ -d $var_TARGET_DIR/sys ] && mkdir $var_TARGET_DIR/sys
>> ! [ -d $var_TARGET_DIR/dev ] && mkdir $var_TARGET_DIR/dev
>> #mount, if not mounted yet
>> - mount | grep -q "$var_TARGET_DIR/proc" || mount -t proc proc $var_TARGET_DIR/proc || die_error "Could not mount $var_TARGET_DIR/proc"
>> - mount | grep -q "$var_TARGET_DIR/sys" || mount -t sysfs sysfs $var_TARGET_DIR/sys || die_error "Could not mount $var_TARGET_DIR/sys"
>> - mount | grep -q "$var_TARGET_DIR/dev" || mount -o bind /dev $var_TARGET_DIR/dev || die_error "Could not mount $var_TARGET_DIR/dev"
>> + mount | grep -q "$var_TARGET_DIR/proc" || mount -t proc proc $var_TARGET_DIR/proc || die_error "Could not mount $var_TARGET_DIR/proc"
>> + mount | grep -q "$var_TARGET_DIR/sys" || mount -t sysfs sysfs $var_TARGET_DIR/sys || die_error "Could not mount $var_TARGET_DIR/sys"
>> + mount | grep -q "$var_TARGET_DIR/dev" || mount -t devtmpfs devtmpfs $var_TARGET_DIR/dev || die_error "Could not mount $var_TARGET_DIR/dev"
>> elif [ "$1" = off ]
>> then
>> umount $var_TARGET_DIR/proc || die_error "Could not umount $var_TARGET_DIR/proc"
>> --
>> 1.7.10.2
>>
More information about the arch-releng
mailing list