#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
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);
#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);
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
+#include <linux/xattr.h>
#define YCHAR char
#define YUCHAR unsigned char