]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
linux: add reboot(2) and assorted commands
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>
Mon, 19 Apr 2010 17:20:15 +0000 (19:20 +0200)
committerJürg Billeter <j@bitron.ch>
Wed, 21 Apr 2010 12:40:07 +0000 (14:40 +0200)
vapi/linux.vapi

index 9a1bd92175258c379f2a27ba0f23a56e4f32114b..168ea2c9e07483368e9490a964692a1d73187011 100644 (file)
@@ -772,6 +772,18 @@ namespace Linux {
                         Posix.termios? termp,
                         winsize? winp);
 
+    [CCode (cprefix = "RB_", cheader_filename = "unistd.h,sys/reboot.h")]
+    public enum RebootCommands {
+         AUTOBOOT,
+         HALT_SYSTEM,
+         ENABLE_CAD,
+         DISABLE_CAD,
+         POWER_OFF
+    }
+
+    [CCode (cheader_filename = "unistd.h,sys/reboot.h")]
+    public int reboot (RebootCommands cmd);
+
     [CCode (cprefix = "CLONE_", cheader_filename = "sched.h")]
     public enum CloneFlags {
         FILES,