X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fpython%2Fyaffsfs.py;h=1da25fd9702f6f9a8b26f8159d56176aabfefd42;hp=986f35892a741769f5aaf648a4e1ee09afcadde1;hb=86e364669f775e70f32204769217ecf035508c1d;hpb=b8cbfed7294153e2e709dd6d7608bbada3da50f0 diff --git a/direct/python/yaffsfs.py b/direct/python/yaffsfs.py index 986f358..1da25fd 100644 --- a/direct/python/yaffsfs.py +++ b/direct/python/yaffsfs.py @@ -1,7 +1,26 @@ +## +## 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") +#const char * yaffs_error_to_str(int err); +yaffs_error_to_str = ylib.yaffs_error_to_str +yaffs_error_to_str.argtypes=[c_int] +yaffs_error_to_str.restype=c_char_p + + #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] @@ -240,10 +259,10 @@ 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_start_up(void) +yaffs_start_up = ylib.yaffs_start_up +yaffs_start_up.argtypes = [] +yaffs_start_up.restype = c_int #int yaffs_set_trace(unsigned int tm) { return yaffs_traceMask=tm; } yaffs_set_trace=ylib.yaffs_set_trace @@ -255,6 +274,11 @@ 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()