yaffs some more updates to yaffs_importer.py
[yaffs2.git] / direct / python / yaffsfs.py
index 590da21b81da18d96501a9fbc138dde5205d8580..7347687cf9a1ff461e758ac82361e77253f9c22a 100644 (file)
@@ -2,6 +2,11 @@ from ctypes import *
 cdll.LoadLibrary("./libyaffsfs.so")
 ylib = CDLL("./libyaffsfs.so")
 
+#int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharingmode) ;
+yaffs_open_sharing = ylib.yaffs_open_sharing
+yaffs_open_sharing.argtypes = [ c_char_p, c_int, c_int, c_int]
+yaffs_open_sharing.restype = c_int
+
 #int yaffs_open(const YCHAR *path, int oflag, int mode) ;
 yaffs_open = ylib.yaffs_open
 yaffs_open.argtypes = [ c_char_p, c_int, c_int]
@@ -170,11 +175,26 @@ yaffs_mount = ylib.yaffs_mount
 yaffs_mount.argtypes = [c_char_p]
 yaffs_mount.restype = c_int
 
+#int yaffs_mount2(const YCHAR *path,int readOnly) ;
+yaffs_mount2 = ylib.yaffs_mount2
+yaffs_mount2.argtypes = [c_char_p, c_int]
+yaffs_mount2.restype = c_int
+
 #int yaffs_unmount(const YCHAR *path) ;
 yaffs_unmount = ylib.yaffs_unmount
 yaffs_unmount.argtypes = [c_char_p]
 yaffs_unmount.restype = c_int
 
+#int yaffs_unmount(const YCHAR *path, int force) ;
+yaffs_unmount2 = ylib.yaffs_unmount2
+yaffs_unmount2.argtypes = [c_char_p, c_int]
+yaffs_unmount2.restype = c_int
+
+#int yaffs_remount(const YCHAR *path, int force, int readOnly) ;
+yaffs_remount = ylib.yaffs_remount
+yaffs_remount.argtypes = [c_char_p, c_int, c_int]
+yaffs_remount.restype = c_int
+
 #int yaffs_sync(const YCHAR *path) ;
 yaffs_sync = ylib.yaffs_sync
 yaffs_sync.argtypes = [c_char_p]
@@ -215,8 +235,45 @@ yaffs_inodecount = ylib.yaffs_inodecount
 yaffs_inodecount.argtypes = [c_char_p]
 yaffs_inodecount.restype = c_int
 
+#int yaffs_n_handles(const YCHAR *path)
+yaffs_n_handles = ylib.yaffs_n_handles
+yaffs_n_handles.argtypes = [c_char_p]
+yaffs_n_handles.restype = c_int
+
 #int yaffs_StartUp(void)
 yaffs_StartUp = ylib.yaffs_StartUp
 yaffs_StartUp.argtypes = []
 yaffs_StartUp.restype = c_int
 
+#int yaffs_set_trace(unsigned int tm) { return yaffs_traceMask=tm; }
+yaffs_set_trace=ylib.yaffs_set_trace
+yaffs_set_trace.argtypes=[c_uint]
+yaffs_set_trace.restype=c_uint
+
+#int yaffs_get_trace(void) { return yaffs_traceMask; }
+yaffs_get_trace=ylib.yaffs_get_trace
+yaffs_get_trace.argtypes=[]
+yaffs_get_trace.restypes=c_uint
+
+#int yaffs_get_error(void)
+yaffs_get_error=ylib.yaffs_get_error
+yaffs_get_error.argtypes=[]
+yaffs_get_error.restypes=c_int
+
+yaffs_O_CREAT=ylib.yaffs_O_CREAT()
+yaffs_O_RDONLY=ylib.yaffs_O_RDONLY()
+yaffs_O_WRONLY=ylib.yaffs_O_WRONLY()
+yaffs_O_RDWR=ylib.yaffs_O_RDWR()
+yaffs_O_TRUNC=ylib.yaffs_O_TRUNC()
+
+
+yaffs_S_IFMT=ylib.yaffs_S_IFMT()
+yaffs_S_IFLNK= ylib.yaffs_S_IFLNK()
+yaffs_S_IFDIR =ylib.yaffs_S_IFDIR()
+yaffs_S_IFREG=ylib.yaffs_S_IFREG()
+yaffs_S_IREAD=ylib.yaffs_S_IREAD()
+yaffs_S_IWRITE=ylib.yaffs_S_IWRITE()
+yaffs_S_IEXEC=ylib.yaffs_S_IEXEC()  
+yaffs_XATTR_CREATE=ylib.yaffs_XATTR_CREATE()
+yaffs_XATTR_REPLACE=ylib.yaffs_XATTR_REPLACE()
+yaffs_S_IEXEC=ylib.yaffs_S_IEXEC()