Fixed passing of usefulldev

master
xSmurf 10 years ago
parent 380757451c
commit 2a10500049

@ -514,7 +514,7 @@ func (st *initState) setupFilesystem(extra []oz.WhitelistItem) error {
fs := fs.NewFilesystem(st.config, st.log)
if err := setupRootfs(fs); err != nil {
if err := setupRootfs(fs, st.config.UseFullDev); err != nil {
return err
}

@ -72,7 +72,7 @@ func _makedev(x, y int) int {
return (((x) << 8) | (y))
}
func setupRootfs(fsys *fs.Filesystem) error {
func setupRootfs(fsys *fs.Filesystem, useFullDev bool) error {
if err := os.MkdirAll(fsys.Root(), 0755); err != nil {
return fmt.Errorf("could not create rootfs path '%s': %v", fsys.Root(), err)
}
@ -107,11 +107,13 @@ func setupRootfs(fsys *fs.Filesystem) error {
return err
}
if (!useFullDev) {
for _, d := range basicDevices {
if err := fsys.CreateDevice(d.path, d.dev, d.mode); err != nil {
return err
}
}
}
for _, sl := range append(basicSymlinks, deviceSymlinks...) {
if err := fsys.CreateSymlink(sl[0], sl[1]); err != nil {

Loading…
Cancel
Save