X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fpython%2Fexamples.py;h=6b0c04572f4695b027355c77efdc960352901dfb;hp=11e5b8b209c3cd006a569c2991ac511dc61e6dde;hb=294ec3ddf9786bddb329646010b165768870ce42;hpb=b0173df3b2c8cc1f68d877a5a64e0f0ca93c0bd6 diff --git a/direct/python/examples.py b/direct/python/examples.py index 11e5b8b..6b0c045 100644 --- a/direct/python/examples.py +++ b/direct/python/examples.py @@ -58,6 +58,18 @@ def yaffs_link_test(dir): yaffs_ls(dir) yaffs_unlink(fnameb) +def yaffs_o_excl_test(dir): + fname = dir + '/aaa' + yaffs_unlink(fname) + fd = yaffs_open(fname, 66, 0666) + yaffs_close(fd) + print "Created ", fname, " result ", fd + fdx = yaffs_open(fname, 0301, 0666) + print "Attempt to create with O_EXCL existing file returned ", fdx + yaffs_unlink(fname) + fdx = yaffs_open(fname, 0301, 0666) + print "Attempt to create with O_EXCL non-existing file returned ", fdx + root = "/yaffs2"