Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
[yaffs2.git] / direct / python / yaffs_python_helper.c
1 /*
2  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
3  *
4  * Copyright (C) 2002-2010 Aleph One Ltd.
5  *   for Toby Churchill Ltd and Brightstar Engineering
6  *
7  * Created by Charles Manning <charles@aleph1.co.uk>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 2 as
11  * published by the Free Software Foundation.
12  *
13  */
14
15 /*
16  * These are some dangly bits that need to be built to wrap up the rest of the yaffs test harness.
17  *
18  *
19  * This is also the place where extra debugging stuff might end up.
20  *
21  */
22  
23 #include "yaffsfs.h"
24 #include "yaffs_trace.h"
25 #include "yaffs_error_converter.h"
26
27 int simulate_power_failure;
28 int random_seed;
29
30 const char * yaffs_error_to_str(int err);       /*this is not part of yaffs. it is a specialy built file for converting error codes to text*/
31
32 int yaffs_print_constants(void)
33 {
34         printf( "O_CREAT........%d\n",O_CREAT);
35         printf( "O_RDONLY.......%d\n",O_RDONLY);
36         printf( "O_WRONLY.......%d\n",O_WRONLY);
37         printf( "O_RDWR.........%d\n",O_RDWR);
38         printf( "O_TRUNC........%d\n",O_TRUNC);
39
40         printf( "sizeof(off_t)..%d\n",sizeof(off_t)); 
41         return 0;
42 }
43
44 int yaffs_O_CREAT(void) { return O_CREAT;}
45 int yaffs_O_RDONLY(void) { return O_RDONLY;}
46 int yaffs_O_WRONLY(void) { return O_WRONLY;}
47 int yaffs_O_RDWR(void) { return O_RDWR;}
48 int yaffs_O_TRUNC(void) { return O_TRUNC;}
49
50
51 int yaffs_S_IFMT(void){return S_IFMT;}
52 int yaffs_S_IFLNK(void){return S_IFLNK;}
53 int yaffs_S_IFDIR(void){return S_IFDIR;}
54 int yaffs_S_IFREG(void){return S_IFREG;}
55 int yaffs_S_IREAD(void){return S_IREAD;}
56 int yaffs_S_IWRITE(void){return S_IWRITE;}
57 int yaffs_S_IEXEC(void){return S_IEXEC;}
58 int yaffs_XATTR_CREATE(void){return XATTR_CREATE;}
59 int yaffs_XATTR_REPLACE(void){return XATTR_REPLACE;}