annotate devextras.h @ 235:85ea0cc0d313

Fix uninitialised variable
author charles
date Tue, 11 Nov 2008 01:47:46 +0000
parents 6dbe40ae9e54
children c8620405d086
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
1 /*
215
b08276bd7b2d Clean up some yaffs1 mode issues.
charles
parents: 211
diff changeset
2 * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
0
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
3 *
174
7d11ae6795e4 normalise licence headers and attributions
wookey
parents: 80
diff changeset
4 * Copyright (C) 2002-2007 Aleph One Ltd.
0
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
5 * for Toby Churchill Ltd and Brightstar Engineering
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
6 *
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
7 * Created by Charles Manning <charles@aleph1.co.uk>
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
8 *
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
10 * it under the terms of the GNU Lesser General Public License version 2.1 as
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
11 * published by the Free Software Foundation.
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
12 *
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
13 * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
14 */
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
15
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
16 /*
209
1e0024d127cf Change list macros
charles
parents: 205
diff changeset
17 * This file is just holds extra declarations of macros that would normally
1e0024d127cf Change list macros
charles
parents: 205
diff changeset
18 * be providesd in the Linux kernel. These macros have been written from
1e0024d127cf Change list macros
charles
parents: 205
diff changeset
19 * scratch but are functionally equivalent to the Linux ones.
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
20 *
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
21 */
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
22
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
23 #ifndef __EXTRAS_H__
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
24 #define __EXTRAS_H__
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
25
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
26
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
27 #if !(defined __KERNEL__)
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
28
209
1e0024d127cf Change list macros
charles
parents: 205
diff changeset
29 /* Definition of types */
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
30 typedef unsigned char __u8;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
31 typedef unsigned short __u16;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
32 typedef unsigned __u32;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
33
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
34 #endif
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
35
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
36 /*
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
37 * This is a simple doubly linked list implementation that matches the
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
38 * way the Linux kernel doubly linked list implementation works.
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
39 */
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
40
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
41 struct ylist_head {
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
42 struct ylist_head *next; /* next in chain */
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
43 struct ylist_head *prev; /* previous in chain */
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
44 };
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
45
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
46
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
47 /* Initialise a static list */
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
48 #define YLIST_HEAD(name) \
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
49 struct ylist_head name = { &(name),&(name)}
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
50
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
51
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
52
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
53 /* Initialise a list head to an empty list */
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
54 #define YINIT_LIST_HEAD(p) \
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
55 do { \
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
56 (p)->next = (p);\
210
15cda41fdfb6 Fix list init
charles
parents: 209
diff changeset
57 (p)->prev = (p); \
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
58 } while(0)
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
59
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
60
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
61 /* Add an element to a list */
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
62 static __inline__ void ylist_add(struct ylist_head *newEntry,
215
b08276bd7b2d Clean up some yaffs1 mode issues.
charles
parents: 211
diff changeset
63 struct ylist_head *list)
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
64 {
215
b08276bd7b2d Clean up some yaffs1 mode issues.
charles
parents: 211
diff changeset
65 struct ylist_head *listNext = list->next;
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
66
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
67 list->next = newEntry;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
68 newEntry->prev = list;
209
1e0024d127cf Change list macros
charles
parents: 205
diff changeset
69 newEntry->next = listNext;
1e0024d127cf Change list macros
charles
parents: 205
diff changeset
70 listNext->prev = newEntry;
1e0024d127cf Change list macros
charles
parents: 205
diff changeset
71
0
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
72 }
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
73
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
74 static __inline__ void ylist_add_tail(struct ylist_head *newEntry,
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
75 struct ylist_head *list)
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
76 {
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
77 struct ylist_head *listPrev = list->prev;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
78
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
79 list->prev = newEntry;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
80 newEntry->next = list;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
81 newEntry->prev = listPrev;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
82 listPrev->next = newEntry;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
83
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
84 }
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
85
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
86
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
87 /* Take an element out of its current list, with or without
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
88 * reinitialising the links.of the entry*/
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
89 static __inline__ void ylist_del(struct ylist_head *entry)
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
90 {
215
b08276bd7b2d Clean up some yaffs1 mode issues.
charles
parents: 211
diff changeset
91 struct ylist_head *listNext = entry->next;
b08276bd7b2d Clean up some yaffs1 mode issues.
charles
parents: 211
diff changeset
92 struct ylist_head *listPrev = entry->prev;
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
93
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
94 listNext->prev = listPrev;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
95 listPrev->next = listNext;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
96
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
97 }
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
98
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
99 static __inline__ void ylist_del_init(struct ylist_head *entry)
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
100 {
215
b08276bd7b2d Clean up some yaffs1 mode issues.
charles
parents: 211
diff changeset
101 ylist_del(entry);
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
102 entry->next = entry->prev = entry;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
103 }
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
104
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
105
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
106 /* Test if the list is empty */
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
107 static __inline__ int ylist_empty(struct ylist_head *entry)
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
108 {
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
109 return (entry->next == entry);
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
110 }
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
111
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
112
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
113 /* ylist_entry takes a pointer to a list entry and offsets it to that
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
114 * we can find a pointer to the object it is embedded in.
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
115 */
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
116
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
117
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
118 #define ylist_entry(entry, type, member) \
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
119 ((type *)((char *)(entry)-(unsigned long)(&((type *)NULL)->member)))
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
120
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
121
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
122 /* ylist_for_each and list_for_each_safe iterate over lists.
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
123 * ylist_for_each_safe uses temporary storage to make the list delete safe
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
124 */
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
125
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
126 #define ylist_for_each(itervar, list) \
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
127 for (itervar = (list)->next; itervar != (list); itervar = itervar->next )
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
128
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
129 #define ylist_for_each_safe(itervar,saveVar, list) \
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
130 for (itervar = (list)->next, saveVar = (list)->next->next; itervar != (list); \
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
131 itervar = saveVar, saveVar = saveVar->next)
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
132
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
133
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
134 #if !(defined __KERNEL__)
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
135
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
136
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
137 #ifndef WIN32
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
138 #include <sys/stat.h>
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
139 #endif
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
140
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
141
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
142 #ifdef CONFIG_YAFFS_PROVIDE_DEFS
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
143 /* File types */
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
144
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
145
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
146 #define DT_UNKNOWN 0
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
147 #define DT_FIFO 1
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
148 #define DT_CHR 2
0
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
149 #define DT_DIR 4
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
150 #define DT_BLK 6
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
151 #define DT_REG 8
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
152 #define DT_LNK 10
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
153 #define DT_SOCK 12
215
b08276bd7b2d Clean up some yaffs1 mode issues.
charles
parents: 211
diff changeset
154 #define DT_WHT 14
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
155
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
156
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
157 #ifndef WIN32
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
158 #include <sys/stat.h>
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
159 #endif
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
160
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
161 /*
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
162 * Attribute flags. These should be or-ed together to figure out what
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
163 * has been changed!
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
164 */
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
165 #define ATTR_MODE 1
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
166 #define ATTR_UID 2
0
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
167 #define ATTR_GID 4
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
168 #define ATTR_SIZE 8
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
169 #define ATTR_ATIME 16
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
170 #define ATTR_MTIME 32
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
171 #define ATTR_CTIME 64
209
1e0024d127cf Change list macros
charles
parents: 205
diff changeset
172
0
2e830ef1597a *** empty log message ***
charles
parents:
diff changeset
173 struct iattr {
80
910ded3009f9 lindent
marty
parents: 0
diff changeset
174 unsigned int ia_valid;
910ded3009f9 lindent
marty
parents: 0
diff changeset
175 unsigned ia_mode;
910ded3009f9 lindent
marty
parents: 0
diff changeset
176 unsigned ia_uid;
910ded3009f9 lindent
marty
parents: 0
diff changeset
177 unsigned ia_gid;
910ded3009f9 lindent
marty
parents: 0
diff changeset
178 unsigned ia_size;
910ded3009f9 lindent
marty
parents: 0
diff changeset
179 unsigned ia_atime;
910ded3009f9 lindent
marty
parents: 0
diff changeset
180 unsigned ia_mtime;
910ded3009f9 lindent
marty
parents: 0
diff changeset
181 unsigned ia_ctime;
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
182 unsigned int ia_attr_flags;
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
183 };
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
184
211
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
185 #endif
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
186
fad21fd1971d Check in inband tags, some extra yaffs direct functions and some other changes
charles
parents: 210
diff changeset
187
217
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
188 #define KERN_DEBUG
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
189
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
190 #else
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
191
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
192 #include <linux/types.h>
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
193 #include <linux/fs.h>
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
194 #include <linux/stat.h>
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
195
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
196 #endif
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
197
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
198
6dbe40ae9e54 Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
charles
parents: 215
diff changeset
199 #endif