]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: Add DT_* and MADV_* constants on Linux.
authorAlbert Strasheim <fullung@gmail.com>
Wed, 6 Apr 2011 20:19:22 +0000 (16:19 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 6 Apr 2011 20:19:22 +0000 (16:19 -0400)
R=rsc, agl1
CC=golang-dev
https://golang.org/cl/4370041

src/pkg/syscall/mkerrors.sh
src/pkg/syscall/zerrors_linux_386.go
src/pkg/syscall/zerrors_linux_amd64.go
src/pkg/syscall/zsysnum_linux_386.go
src/pkg/syscall/zsysnum_linux_amd64.go

index 2f1c7512fe9bc15f83a0380973dbe17738338cf9..9bb359fc0ca19f104043319a0dcf1e090cdb3d38 100755 (executable)
@@ -119,7 +119,7 @@ done
                $2 ~ /^E[A-Z0-9_]+$/ ||
                $2 ~ /^SIG[^_]/ ||
                $2 ~ /^IN_/ ||
-               $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|EVFILT|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL)_/ ||
+               $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|EVFILT|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV)_/ ||
                $2 == "SOMAXCONN" ||
                $2 == "NAME_MAX" ||
                $2 == "IFNAMSIZ" ||
index a0e14b2a37d58eaebba1bd8c36c4ac64d8916fb3..3fc7cc73832a828d3271b1b4afec9daf6b2d49b4 100644 (file)
@@ -48,6 +48,15 @@ const (
        AF_UNSPEC                        = 0
        AF_WANPIPE                       = 0x19
        AF_X25                           = 0x9
+       DT_BLK                           = 0x6
+       DT_CHR                           = 0x2
+       DT_DIR                           = 0x4
+       DT_FIFO                          = 0x1
+       DT_LNK                           = 0xa
+       DT_REG                           = 0x8
+       DT_SOCK                          = 0xc
+       DT_UNKNOWN                       = 0
+       DT_WHT                           = 0xe
        E2BIG                            = 0x7
        EACCES                           = 0xd
        EADDRINUSE                       = 0x62
@@ -418,6 +427,17 @@ const (
        LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
        LINUX_REBOOT_MAGIC1              = 0xfee1dead
        LINUX_REBOOT_MAGIC2              = 0x28121969
+       MADV_DOFORK                      = 0xb
+       MADV_DONTFORK                    = 0xa
+       MADV_DONTNEED                    = 0x4
+       MADV_HWPOISON                    = 0x64
+       MADV_MERGEABLE                   = 0xc
+       MADV_NORMAL                      = 0
+       MADV_RANDOM                      = 0x1
+       MADV_REMOVE                      = 0x9
+       MADV_SEQUENTIAL                  = 0x2
+       MADV_UNMERGEABLE                 = 0xd
+       MADV_WILLNEED                    = 0x3
        MAP_32BIT                        = 0x40
        MAP_ANON                         = 0x20
        MAP_ANONYMOUS                    = 0x20
index 122ac8b79c6d6c05f6bd6386dcdee5af24f5289e..d5efdf55d6290f9d51e60e97910a3daf6f351350 100644 (file)
@@ -48,6 +48,15 @@ const (
        AF_UNSPEC                        = 0
        AF_WANPIPE                       = 0x19
        AF_X25                           = 0x9
+       DT_BLK                           = 0x6
+       DT_CHR                           = 0x2
+       DT_DIR                           = 0x4
+       DT_FIFO                          = 0x1
+       DT_LNK                           = 0xa
+       DT_REG                           = 0x8
+       DT_SOCK                          = 0xc
+       DT_UNKNOWN                       = 0
+       DT_WHT                           = 0xe
        E2BIG                            = 0x7
        EACCES                           = 0xd
        EADDRINUSE                       = 0x62
@@ -418,6 +427,17 @@ const (
        LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
        LINUX_REBOOT_MAGIC1              = 0xfee1dead
        LINUX_REBOOT_MAGIC2              = 0x28121969
+       MADV_DOFORK                      = 0xb
+       MADV_DONTFORK                    = 0xa
+       MADV_DONTNEED                    = 0x4
+       MADV_HWPOISON                    = 0x64
+       MADV_MERGEABLE                   = 0xc
+       MADV_NORMAL                      = 0
+       MADV_RANDOM                      = 0x1
+       MADV_REMOVE                      = 0x9
+       MADV_SEQUENTIAL                  = 0x2
+       MADV_UNMERGEABLE                 = 0xd
+       MADV_WILLNEED                    = 0x3
        MAP_32BIT                        = 0x40
        MAP_ANON                         = 0x20
        MAP_ANONYMOUS                    = 0x20
index 55529adaa71e97e46aad6e6184cc6f3f24d3b806..71e21c7a582376d96396ca732cb57e89e091d548 100644 (file)
@@ -1,4 +1,4 @@
-// mksysnum_linux.sh /usr/include/asm/unistd_32.h
+// mksysnum_linux.pl /usr/include/asm/unistd_32.h
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
 package syscall
index 2621999c758ea9f785feba53add4e90ca31cfe03..77d4eea9e705d41463d5265939bd9dd2eb1d8b0f 100644 (file)
@@ -1,4 +1,4 @@
-// mksysnum_linux.sh /usr/include/asm/unistd_64.h
+// mksysnum_linux.pl /usr/include/asm/unistd_64.h
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
 package syscall