]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/os.h
lcd: Provide an API to access LCD parameters
[karo-tx-uboot.git] / include / os.h
index 6b7ee474f04ddee319694d03e1c73eca47460f6c..699682a4089beed0869c88fbf5974243aa647221 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef __OS_H__
 #define __OS_H__
 
+struct sandbox_state;
+
 /**
  * Access to the OS read() system call
  *
@@ -93,7 +95,7 @@ int os_close(int fd);
  *
  * @param exit_code    exit code for U-Boot
  */
-void os_exit(int exit_code);
+void os_exit(int exit_code) __attribute__((noreturn));
 
 /**
  * Put tty into raw mode to mimic serial console better
@@ -122,4 +124,16 @@ void os_usleep(unsigned long usec);
  */
 u64 os_get_nsec(void);
 
+/**
+ * Parse arguments and update sandbox state.
+ *
+ * @param state                Sandbox state to update
+ * @param argc         Argument count
+ * @param argv         Argument vector
+ * @return 0 if ok, and program should continue;
+ *     1 if ok, but program should stop;
+ *     -1 on error: program should terminate.
+ */
+int os_parse_args(struct sandbox_state *state, int argc, char *argv[]);
+
 #endif