Commit 85b9f357 authored by David Anderson's avatar David Anderson Committed by Brad Fitzpatrick

syscall: use uintptr for Mount flags.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5308044
parent 18b025d5
...@@ -784,8 +784,8 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, ...@@ -784,8 +784,8 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int,
return origlen - len(buf), count, names return origlen - len(buf), count, names
} }
//sys mount(source string, target string, fstype string, flags uint32, data *byte) (errno int) //sys mount(source string, target string, fstype string, flags uintptr, data *byte) (errno int)
func Mount(source string, target string, fstype string, flags uint32, data string) (errno int) { func Mount(source string, target string, fstype string, flags uintptr, data string) (errno int) {
// Certain file systems get rather angry and EINVAL if you give // Certain file systems get rather angry and EINVAL if you give
// them an empty string of data, rather than NULL. // them an empty string of data, rather than NULL.
if data == "" { if data == "" {
......
...@@ -89,7 +89,7 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (errno int) { ...@@ -89,7 +89,7 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mount(source string, target string, fstype string, flags uint32, data *byte) (errno int) { func mount(source string, target string, fstype string, flags uintptr, data *byte) (errno int) {
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(StringBytePtr(source))), uintptr(unsafe.Pointer(StringBytePtr(target))), uintptr(unsafe.Pointer(StringBytePtr(fstype))), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(StringBytePtr(source))), uintptr(unsafe.Pointer(StringBytePtr(target))), uintptr(unsafe.Pointer(StringBytePtr(fstype))), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
errno = int(e1) errno = int(e1)
return return
......
...@@ -89,7 +89,7 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (errno int) { ...@@ -89,7 +89,7 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mount(source string, target string, fstype string, flags uint32, data *byte) (errno int) { func mount(source string, target string, fstype string, flags uintptr, data *byte) (errno int) {
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(StringBytePtr(source))), uintptr(unsafe.Pointer(StringBytePtr(target))), uintptr(unsafe.Pointer(StringBytePtr(fstype))), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(StringBytePtr(source))), uintptr(unsafe.Pointer(StringBytePtr(target))), uintptr(unsafe.Pointer(StringBytePtr(fstype))), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
errno = int(e1) errno = int(e1)
return return
......
...@@ -89,7 +89,7 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (errno int) { ...@@ -89,7 +89,7 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mount(source string, target string, fstype string, flags uint32, data *byte) (errno int) { func mount(source string, target string, fstype string, flags uintptr, data *byte) (errno int) {
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(StringBytePtr(source))), uintptr(unsafe.Pointer(StringBytePtr(target))), uintptr(unsafe.Pointer(StringBytePtr(fstype))), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(StringBytePtr(source))), uintptr(unsafe.Pointer(StringBytePtr(target))), uintptr(unsafe.Pointer(StringBytePtr(fstype))), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
errno = int(e1) errno = int(e1)
return return
......
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