summaryrefslogtreecommitdiff
path: root/Source/Library/Userland/Binding
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-23 17:28:25 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-23 17:28:25 +0200
commitf0556ed7f051fb101dc68752526696365bf79a11 (patch)
tree61345fbadbf76c6f12b36b48a9dfadd744f6cbbd /Source/Library/Userland/Binding
parentdf179c18baab4b5d85a283924fb23dfee7ea7fdb (diff)
downloadMelon-f0556ed7f051fb101dc68752526696365bf79a11.tar.gz
Melon-f0556ed7f051fb101dc68752526696365bf79a11.zip
More work on syscalls and shell
Diffstat (limited to 'Source/Library/Userland/Binding')
-rw-r--r--Source/Library/Userland/Binding/FSNode.class.h12
-rw-r--r--Source/Library/Userland/Binding/Sys.ns.cpp15
-rw-r--r--Source/Library/Userland/Binding/Sys.ns.h9
3 files changed, 36 insertions, 0 deletions
diff --git a/Source/Library/Userland/Binding/FSNode.class.h b/Source/Library/Userland/Binding/FSNode.class.h
index eb25782..95802a4 100644
--- a/Source/Library/Userland/Binding/FSNode.class.h
+++ b/Source/Library/Userland/Binding/FSNode.class.h
@@ -20,4 +20,16 @@ class FSNode : public RessourceCaller {
u64int getLength() {
return *((u64int*)doCall(FNIF_GETLENGTH));
}
+ u32int getUid() {
+ return doCall(FNIF_GETUID);
+ }
+ u32int getGid() {
+ return doCall(FNIF_GETGID);
+ }
+ u32int getPerm() {
+ return doCall(FNIF_GETPERM);
+ }
+ String path() {
+ return String::unserialize(doCall(FNIF_GETPATH));
+ }
};
diff --git a/Source/Library/Userland/Binding/Sys.ns.cpp b/Source/Library/Userland/Binding/Sys.ns.cpp
new file mode 100644
index 0000000..7083e56
--- /dev/null
+++ b/Source/Library/Userland/Binding/Sys.ns.cpp
@@ -0,0 +1,15 @@
+#include <Sys.iface.h>
+#include "Sys.ns.h"
+#include <Syscall/RessourceCaller.class.h>
+
+namespace Sys {
+
+void halt() {
+ RessourceCaller::sCall(SYIF_IFID, SYIF_HALT);
+}
+
+void reboot() {
+ RessourceCaller::sCall(SYIF_IFID, SYIF_REBOOT);
+}
+
+}
diff --git a/Source/Library/Userland/Binding/Sys.ns.h b/Source/Library/Userland/Binding/Sys.ns.h
new file mode 100644
index 0000000..3a8426b
--- /dev/null
+++ b/Source/Library/Userland/Binding/Sys.ns.h
@@ -0,0 +1,9 @@
+#ifndef DEF_SYS_NS_H
+#define DEF_SYS_NS_H
+
+namespace Sys {
+ void halt();
+ void reboot();
+}
+
+#endif