Commits

Anonymous committed abf5678

get rid of our own version of unmount. It's now in syscall.

Comments (0)

Files changed (8)

 	bproc_$(GOOS)_$(GOARCH).go\
 	common.go\
 	info.go\
-	forth.go\
 	mexec.go\
 	main.go\
 	master.go\
 package main
 
 import (
-	"syscall"
-	"unsafe"
 	"log"
 )
 
 	return 0, 0, 0
 }
 
-func unmount(path string) int {
-	path8 := []byte(path)
-	_, _, e1 := syscall.Syscall(syscall.SYS_UNMOUNT, uintptr(unsafe.Pointer(&path8[0])), 0, 0)
-	return int(e1)
-}

bproc_linux_386.go

 	return creds[0], creds[1], creds[2]
 }
 
-func unmount(path string) int {
-	path8 := []byte(path)
-	_, _, e1 := syscall.Syscall(syscall.SYS_UMOUNT, uintptr(unsafe.Pointer(&path8[0])), 0, 0)
-	return int(e1)
-}
-
-func getIfc() int {
-	return 0
-}

bproc_linux_amd64.go

 	return creds[0], creds[1], creds[2]
 }
 
-func unmount(path string) int {
-	path8 := []byte(path)
-	_, _, e1 := syscall.Syscall( /* barf! syscall.SYS_UMOUNT */ 166, uintptr(unsafe.Pointer(&path8[0])), 0, 0)
-	return int(e1)
-}
-
-func getIfc() int {
-	return 0
-}

bproc_linux_arm.go

 	return creds[0], creds[1], creds[2]
 }
 
-func unmount(path string) int {
-	path8 := []byte(path)
-	_, _, e1 := syscall.Syscall(syscall.SYS_UMOUNT, uintptr(unsafe.Pointer(&path8[0])), 0, 0)
-	return int(e1)
-}
-
-func getIfc() int {
-	return 0
-}
 
 func doPrivateMount(pathbase string) {
 	unshare()
-	_ = unmount(*binRoot)
+	_ = syscall.Unmount(*binRoot, 0)
 	syscallerr := privatemount(*binRoot)
 	if syscallerr != 0 {
 		log.Print("Mount failed ", syscallerr)
 	"strconv"
 	"flag"
 	"gob"
+	"bitbucket.org/rminnich/forth"
 )
 
 func usage() {
  * is used for strongbox, where there is a single root, 49 level 1s defined by name %7 == 0, and 
  */ 
 func main() {
+	var err os.Error
 	flag.Usage = usage
 	flag.Parse()
-	*myId = forth(*myId)
-	*myAddress = forth(*myAddress)
-	*parent = forth(*parent)
+	interp := forth.New()
+	*myId, err = forth.Eval(interp, *myId)
+	if err != nil {
+		log.Fatal(err)
+	}
+	*myAddress, err = forth.Eval(interp, *myAddress)
+	if err != nil {
+		log.Fatal(err)
+	}
+	*parent, err = forth.Eval(interp, *parent)
+	if err != nil {
+		log.Fatal(err)
+	}
 	fmt.Printf("My id is %v; parent %v; address %v\n", *myId, *parent, *myAddress)
 	myListenAddress = *myAddress + ":" + *cmdPort
 	log.SetPrefix("newgproc " + *prefix + ": ")
 	"log"
 	"os"
 	"strings"
-	"bitbucket.org/floren/ldd"
+	"bitbucket.org/rminnich/ldd"
 	"path"
 	"path/filepath"
 	"fmt"