Permalink
Browse files

Non-standard ENOATTR

  • Loading branch information...
1 parent d9bfd3d commit 38f6660801d1dda61f449ce4236f7c818cf9942f @vasi committed Apr 2, 2012
Showing with 8 additions and 6 deletions.
  1. +1 −1 Makefile.am
  2. +3 −3 configure.ac
  3. +0 −1 fs.c
  4. +2 −0 nonstd.h
  5. +2 −1 squashfuse.c
View
2 Makefile.am
@@ -6,7 +6,7 @@ endif
bin_PROGRAMS = squashfuse
squashfuse_SOURCES = swap.c cache.c table.c dir.c file.c fs.c ll.c squashfuse.c \
decompress.c xattr.c \
- nonstd-pread.c nonstd-makedev.c nonstd-stat.c nonstd-daemon.c \
+ nonstd-pread.c nonstd-makedev.c nonstd-stat.c nonstd-daemon.c nonstd-enoattr.c \
squashfs_fs.h common.h nonstd-internal.h nonstd.h swap.h cache.h table.h \
dir.h file.h decompress.h xattr.h squashfuse.h ll.h
View
6 configure.ac
@@ -11,7 +11,7 @@ AC_DEFINE([FUSE_USE_VERSION], [26], [Version of FUSE API to use])
##### Non-POSIX declarations #####
-# SQ_NONSTD_DEFINE(NAME,PROLOG,SOURCE)
+# SQ_NONSTD_DEFINE(NAME, PROLOG, SOURCE, [IF_NOT_FOUND])
# Check what #define we need for non-POSIX declarations
AC_DEFUN([SQ_NONSTD_DEFINE],[
AH_TEMPLATE(AS_TR_CPP([NONSTD_]$1[_DEF]),
@@ -43,7 +43,7 @@ AC_DEFUN([SQ_NONSTD_DEFINE],[
done
])
AS_VAR_IF([sq_cache],[no],
- [AC_MSG_FAILURE([can't figure out how to use $1])],
+ m4_default($4,[AC_MSG_FAILURE([can't figure out how to use $1])]),
[AS_VAR_IF([sq_cache],[none],[],[
AC_DEFINE_UNQUOTED(AS_TR_CPP([NONSTD_$1_DEF]),[CHANGE$def],[])
])]
@@ -54,7 +54,7 @@ AC_DEFUN([SQ_NONSTD_DEFINE],[
SQ_NONSTD_DEFINE(makedev,[#include <sys/types.h>],[makedev(0,0)])
SQ_NONSTD_DEFINE(pread,[#include <unistd.h>],[(void)pread;])
SQ_NONSTD_DEFINE(S_IFDIR,[#include <sys/stat.h>],[mode_t m = S_IFDIR;])
-
+SQ_NONSTD_DEFINE(ENOATTR,[#include <errno.h>],[int e = ENOATTR;],[:])
##### Compression #####
View
1 fs.c
@@ -361,7 +361,6 @@ sqfs_err sqfs_inode_get(sqfs *fs, sqfs_inode *inode, sqfs_inode_id id) {
default: return SQFS_ERR;
}
- // FIXME: xattr
return SQFS_OK;
}
View
2 nonstd.h
@@ -31,4 +31,6 @@ dev_t sqfs_makedev(int maj, int min);
ssize_t sqfs_pread(int fd, void *buf, size_t count, off_t off);
+int sqfs_enoattr();
+
#endif
View
3 squashfuse.c
@@ -36,6 +36,7 @@
#include "ll.h"
#include "squashfuse.h"
+#include "nonstd.h"
static const double SQFS_TIMEOUT = DBL_MAX;
@@ -313,7 +314,7 @@ static void sqfs_ll_op_getxattr(fuse_req_t req, fuse_ino_t ino,
} else if (sqfs_xattr_find(&x, name, &found)) {
fuse_reply_err(req, EIO);
} else if (!found) {
- fuse_reply_err(req, EIO); // FIXME: ENOATTR
+ fuse_reply_err(req, sqfs_enoattr());
} else if (sqfs_xattr_value_size(&x, &vsize)) {
fuse_reply_err(req, EIO);
} else if (!size) {

0 comments on commit 38f6660

Please sign in to comment.