yaffs: Fix up xattrib flag names
authorCharles Manning <cdhmanning@gmail.com>
Mon, 14 Jun 2010 08:38:28 +0000 (20:38 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Mon, 14 Jun 2010 08:38:28 +0000 (20:38 +1200)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/yaffsfs.h
yaffs_nameval.c
yaffs_nameval.h
yportenv.h

index 0c62145d014b80ff9412255e93ca689ea867d8d8..db983f1e4a2176e709fd54202930504f36806a40 100644 (file)
 #define        S_IEXEC 0000100
 #endif
 
+#ifndef XATTR_CREATE
+#define XATTR_CREATE 1
+#endif
+
+#ifndef XATTR_REPLACE
+#define XATTR_REPLACE 2
+#endif
+
 #ifndef R_OK
 #define R_OK   4
 #define W_OK   2
index b098600980b1ca24e46a8e94b9b1eac7bebc23ed..e15b647196eb316994a46e83fc8bee7501c446eb 100644 (file)
@@ -94,9 +94,9 @@ int nval_set(char *xb, int xb_size, const char *name, const char *buf, int bsize
 
        pos = nval_find(xb,xb_size,name, &size_exist);
 
-       if(flags & NVAL_CREATE && pos >= 0)
+       if(flags & XATTR_CREATE && pos >= 0)
                return -EEXIST;
-       if(flags & NVAL_REPLACE && pos < 0)
+       if(flags & XATTR_REPLACE && pos < 0)
                return -ENOENT;
 
        start = nval_used(xb,xb_size);
index ad81005a22c4bcf49dbf7b12082957cb0a469a20..102c1c06998999746293f3b0e329694bd681510f 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef __NAMEVAL_H__
 #define __NAMEVAL_H__
 
-#define NVAL_CREATE    0x01
-#define NVAL_REPLACE   0x02
-
 int nval_del(char *xb, int xb_size, const char *name);
 int nval_set(char *xb, int xb_size, const char *name, const char *buf, int bsize, int flags);
 int nval_get(const char *xb, int xb_size, const char *name, char *buf, int bsize);
index 13cc1eb621783ebbfd7c860509593194dbf97d25..687f5e69bf1a0217bb3e1ad353824f6d735dc05d 100644 (file)
@@ -47,6 +47,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
+#include <linux/xattr.h>
 
 #define YCHAR char
 #define YUCHAR unsigned char