X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=direct%2Fpython%2Fyaffsfs.py;h=2b52466bec2711eec48ffb487172ec827bbb0ac3;hb=refs%2Fheads%2Faleph1-release-branch;hp=590da21b81da18d96501a9fbc138dde5205d8580;hpb=1e40cf15e2e588fc4dc1af3493d822715e9bdfa7;p=yaffs2.git diff --git a/direct/python/yaffsfs.py b/direct/python/yaffsfs.py index 590da21..2b52466 100644 --- a/direct/python/yaffsfs.py +++ b/direct/python/yaffsfs.py @@ -1,7 +1,25 @@ +## +## YAFFS: Yet Another Flash File System. A NAND-flash specific file system. +## +## Copyright (C) 2002-2010 Aleph One Ltd. +## for Toby Churchill Ltd and Brightstar Engineering +## +## Created by Charles Manning +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License version 2 as +## published by the Free Software Foundation. +## + 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 +188,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,6 +248,11 @@ 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 = []