From: Charles Manning Date: Mon, 14 Jun 2010 08:38:28 +0000 (+1200) Subject: yaffs: Fix up xattrib flag names X-Git-Tag: pre-name-change~52 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=cecf21a0d48396e8290c016d164c75a32f026627 yaffs: Fix up xattrib flag names Signed-off-by: Charles Manning --- diff --git a/direct/yaffsfs.h b/direct/yaffsfs.h index 0c62145..db983f1 100644 --- a/direct/yaffsfs.h +++ b/direct/yaffsfs.h @@ -165,6 +165,14 @@ #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 diff --git a/yaffs_nameval.c b/yaffs_nameval.c index b098600..e15b647 100644 --- a/yaffs_nameval.c +++ b/yaffs_nameval.c @@ -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); diff --git a/yaffs_nameval.h b/yaffs_nameval.h index ad81005..102c1c0 100644 --- a/yaffs_nameval.h +++ b/yaffs_nameval.h @@ -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); diff --git a/yportenv.h b/yportenv.h index 13cc1eb..687f5e6 100644 --- a/yportenv.h +++ b/yportenv.h @@ -47,6 +47,7 @@ #include #include #include +#include #define YCHAR char #define YUCHAR unsigned char