]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/os.h
sandbox: add lseek helper
[karo-tx-uboot.git] / include / os.h
index c17a8a52ab3266c348568fb583005bcca6636bac..f74766d16c61a422a5f21620f3d49a820478c637 100644 (file)
@@ -48,6 +48,21 @@ ssize_t os_read(int fd, void *buf, size_t count);
  */
 ssize_t os_write(int fd, const void *buf, size_t count);
 
+/**
+ * Access to the OS lseek() system call
+ *
+ * \param fd   File descriptor as returned by os_open()
+ * \param offset       File offset (based on whence)
+ * \param whence       Position offset is relative to (see below)
+ * \return new file offset
+ */
+off_t os_lseek(int fd, off_t offset, int whence);
+
+/* Defines for "whence" in os_lseek() */
+#define OS_SEEK_SET    0
+#define OS_SEEK_CUR    1
+#define OS_SEEK_END    2
+
 /**
  * Access to the OS open() system call
  *