Commit 7252df71 authored by Daniel P. Berrange's avatar Daniel P. Berrange

Make use of devtmpfs configurable

Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
parent 960cb072
......@@ -32,7 +32,9 @@
#include <zlib.h>
#include <dirent.h>
// For raspbian kernels set these
//#define SKIP_INITRD
//#define USE_TMPFS
#define ATTR_UNUSED __attribute__((__unused__))
......@@ -144,6 +146,7 @@ main(int argc ATTR_UNUSED, char **argv)
mount_other("/sys", "sysfs", 0755);
mount_other("/proc", "proc", 0755);
#ifdef USE_TMPFS
mount_other("/dev", "tmpfs", 0755);
#define MKNOD(file, mode, dev) \
......@@ -180,6 +183,13 @@ main(int argc ATTR_UNUSED, char **argv)
MKNOD("/dev/rtc0", S_IFCHR |0700, makedev(254, 0));
MKNOD("/dev/ptmx", S_IFCHR |0777, makedev(5, 2));
MKNOD("/dev/video0", S_IFCHR |0700, makedev(81, 0));
MKNOD("/dev/mmcblk0", S_IFCHR |0700, makedev(179, 0));
MKNOD("/dev/mmcblk0p1", S_IFCHR |0700, makedev(179, 1));
MKNOD("/dev/mmcblk0p2", S_IFCHR |0700, makedev(179, 2));
#else
mount_other("/dev", "devtmpfs", 0755);
#endif
umask(0022);
if (symlink("/proc/self/fd", "/dev/fd") < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment