projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs u-boot: Fix erase for inband tags.
[yaffs2.git]
/
direct
/
python
/
README.txt
diff --git
a/direct/python/README.txt
b/direct/python/README.txt
index a6706e1329ad3b780466ac657f9f0cec3853d708..4dc517170c21d3bbce5127bd7285554e9fe590f6 100644
(file)
--- a/
direct/python/README.txt
+++ b/
direct/python/README.txt
@@
-15,13
+15,10
@@
$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
->>> from ctypes import *
->>> cdll.LoadLibrary("./libyaffsfs.so")
-<CDLL './libyaffsfs.so', handle 9ed4178 at b7d418ac>
->>> y = CDLL("./libyaffsfs.so")
->>> y.yaffs_StartUp()
+>>> from yaffsfs import *
+>>> yaffs_StartUp()
0
0
->>> y
.y
affs_mount("/yaffs2")
+>>> yaffs_mount("/yaffs2")
yaffs: Mounting /yaffs2
yaffs: yaffs_GutsInitialise()
yaffs_ScanBackwards starts intstartblk 1 intendblk 256...
yaffs: Mounting /yaffs2
yaffs: yaffs_GutsInitialise()
yaffs_ScanBackwards starts intstartblk 1 intendblk 256...
@@
-45,18
+42,16
@@
Dead 0 blocks
yaffs: yaffs_GutsInitialise() done.
0
yaffs: yaffs_GutsInitialise() done.
0
->>> y
.y
affs_open("/yaffs2/xx",66,0666)
+>>> yaffs_open("/yaffs2/xx",66,0666)
yaffs: Tnodes added
Allocated block 1, seq 4097, 255 left
0
yaffs: Tnodes added
Allocated block 1, seq 4097, 255 left
0
->>> y.yaffs_write(0,"abc",3)
-3
->>> y.yaffs_lseek(0,0,0)
-0
+>>> yaffs_write(0,"abcdefg",5)
+5
>>> b = create_string_buffer("",100)
>>> b = create_string_buffer("",100)
->>> y
.yaffs_read(0,b,10
0)
-3
->>>
b.value
-'abc'
->>>
-
+>>> y
affs_lseek(0,0,
0)
+0
+>>>
yaffs_read(0,b,100)
+5
+>>>
print b.value
+abcde