ref: bba14d471c3c15ed98726df5e05f9621aec110fc
parent: 0d2e2caf7147e0f360a4b49c485953a7b84eeb3c
author: ngkaho1234 <[email protected]>
date: Sun Oct 11 12:48:19 EDT 2015
Tune CMakeFile default preprocessor macros on PC. Remove ENOATTR, use ENODATA instead
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,10 @@
else()
#Generic example target
set(BLOCKDEV_TYPE linux)
+ add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=0)
+ add_definitions(-DCONFIG_HAVE_OWN_ERRNO=0)
+ add_definitions(-DCONFIG_HAVE_OWN_ASSERT=0)
+ add_definitions(-DCONFIG_BLOCK_DEV_CACHE_SIZE=16)
add_subdirectory(fs_test)
add_subdirectory(demos/generic)
endif()
--- a/lwext4/ext4_errno.h
+++ b/lwext4/ext4_errno.h
@@ -77,7 +77,6 @@
#define ERANGE 34 /* Math result not representable */
#define ENOTEMPTY 39 /* Directory not empty */
#define ENODATA 61 /* No data available */
-#define ENOATTR ENODATA /* No attribute available */
#define ENOTSUP 95 /* Not supported */
#endif
--- a/lwext4/ext4_xattr.c
+++ b/lwext4/ext4_xattr.c
@@ -699,7 +699,7 @@
ext4_xattr_lookup_item(ref, name_index, name, name_len);
if (replace) {
if (!item) {
- ret = ENOATTR;
+ ret = ENODATA;
goto Finish;
}
if (item->data_size != data_size)
@@ -739,7 +739,7 @@
ext4_xattr_lookup_item(ref, name_index, name, name_len);
if (!item) {
- ret = ENOATTR;
+ ret = ENODATA;
goto Finish;
}
item_size = item->data_size;