Mercurial > yaffs-ecoscentric-gpl
annotate direct/python/yaffs_python_helper.c @ 434:69decb385a5c
yaffs: Add python test for O_EXCL
Check that OEXCL really works according to what's on the box.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
| author | Charles Manning <cdhmanning@gmail.com> |
|---|---|
| date | Wed, 19 May 2010 12:46:51 +1200 |
| parents | b5309c9b6d7f |
| children |
| rev | line source |
|---|---|
| 296 | 1 |
| 2 /* | |
| 3 * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. | |
| 4 * | |
|
409
b5309c9b6d7f
yaffs Some cleanups.
Charles Manning <cdhmanning@gmail.com>
parents:
342
diff
changeset
|
5 * Copyright (C) 2002-2010 Aleph One Ltd. |
| 296 | 6 * for Toby Churchill Ltd and Brightstar Engineering |
| 7 * | |
| 8 * Created by Charles Manning <charles@aleph1.co.uk> | |
| 9 * | |
| 10 * This program is free software; you can redistribute it and/or modify | |
| 11 * it under the terms of the GNU General Public License version 2 as | |
| 12 * published by the Free Software Foundation. | |
| 13 * | |
| 14 */ | |
| 15 | |
| 16 /* | |
| 17 * These are some dangly bits that need to be built to wrap up the rest of the yaffs test harness. | |
| 18 * | |
| 19 * | |
| 20 * This is also the place where extra debugging stuff might end up. | |
| 21 * | |
| 22 */ | |
| 23 | |
| 24 #include "yaffsfs.h" | |
| 342 | 25 #include "yaffs_trace.h" |
| 296 | 26 |
| 27 int simulate_power_failure; | |
| 28 int random_seed; | |
| 29 | |
| 30 int yaffs_print_constants(void) | |
| 31 { | |
| 32 printf( "O_CREAT........%d\n",O_CREAT); | |
| 33 printf( "O_RDONLY.......%d\n",O_RDONLY); | |
| 34 printf( "O_WRONLY.......%d\n",O_WRONLY); | |
| 35 printf( "O_RDWR.........%d\n",O_RDWR); | |
| 36 printf( "O_TRUNC........%d\n",O_TRUNC); | |
| 37 | |
| 297 | 38 printf( "sizeof(off_t)..%d\n",sizeof(off_t)); |
| 296 | 39 return 0; |
| 40 } | |
| 41 | |
| 42 int yaffs_O_CREAT(void) { return O_CREAT;} | |
| 43 int yaffs_O_RDONLY(void) { return O_RDONLY;} | |
| 44 int yaffs_O_WRONLY(void) { return O_WRONLY;} | |
| 45 int yaffs_O_RDWR(void) { return O_RDWR;} | |
| 46 int yaffs_O_TRUNC(void) { return O_TRUNC;} | |
| 47 | |
| 48 int yaffs_set_trace(unsigned int tm) { return yaffs_traceMask=tm; } | |
| 49 int yaffs_get_trace(void) { return yaffs_traceMask; } |
