by Mijzelf » Wed Feb 20, 2013 4:03 pm
$this->bbcode_second_pass_quote('ejblom', 'T')he first comment is interesting since I made a folder..... but it still works.. is that even possible?
When you had asked me that
before telling it actually works, I would have said no.
I looked at the implementation of mount in busybox, and the device filename is passed unchanged to mount() in libc. I suppose this busybox binary is linked against uClibc, and that implementation is very short, just a syscall:$this->bbcode_second_pass_code('', '/*
* mount() for uClibc
*
* Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include <sys/syscall.h>
#include <sys/mount.h>
_syscall5(int, mount, const char *, specialfile, const char *, dir,
const char *, filesystemtype, unsigned long, rwflag,
const void *, data)')So it's up to the kernel to decide what to mount.
The kernel *does* contain code to parse a device name to it's major and minor id. (Of course, the commandline specifies /dev/sda1 as rootfs, but there is no /dev yet, so the kernel is on it's own.) And now it turns out that the kernel uses this also as fall-back when the userland provides an invalid device file.