summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-02-20 23:56:58 -0500
committerMike Frysinger <vapier@gentoo.org>2012-03-12 11:03:42 -0400
commitd9165153caea9f342410ed3ac87cb68768ebec78 (patch)
tree9f43ac048461b4788fc15805802299bf3a88d998 /include
parent7b06b66cd7f9f4d33cfd3e68046c094a43024cda (diff)
downloadu-boot-imx-d9165153caea9f342410ed3ac87cb68768ebec78.zip
u-boot-imx-d9165153caea9f342410ed3ac87cb68768ebec78.tar.gz
u-boot-imx-d9165153caea9f342410ed3ac87cb68768ebec78.tar.bz2
sandbox: add flags for open() call
This provides a way for callers to create files for writing. The flags are translated at runtime, for the ones we support. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include')
-rw-r--r--include/os.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/os.h b/include/os.h
index f74766d..6b7ee47 100644
--- a/include/os.h
+++ b/include/os.h
@@ -1,4 +1,9 @@
/*
+ * Operating System Interface
+ *
+ * This provides access to useful OS routines for the sandbox architecture.
+ * They are kept in a separate file so we can include system headers.
+ *
* Copyright (c) 2011 The Chromium OS Authors.
* See file CREDITS for list of people who contributed to this
* project.
@@ -19,12 +24,6 @@
* MA 02111-1307 USA
*/
-/*
- * Operating System Interface
- *
- * This provides access to useful OS routines from the sandbox architecture
- */
-
#ifndef __OS_H__
#define __OS_H__
@@ -72,6 +71,12 @@ off_t os_lseek(int fd, off_t offset, int whence);
*/
int os_open(const char *pathname, int flags);
+#define OS_O_RDONLY 0
+#define OS_O_WRONLY 1
+#define OS_O_RDWR 2
+#define OS_O_MASK 3 /* Mask for read/write flags */
+#define OS_O_CREAT 0100
+
/**
* Access to the OS close() system call
*