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