Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Non-standard ENOATTR

  • Loading branch information...
commit 38f6660801d1dda61f449ce4236f7c818cf9942f 1 parent d9bfd3d
Dave Vasilevsky authored April 02, 2012
2  Makefile.am
@@ -6,7 +6,7 @@ endif
6 6
 bin_PROGRAMS = squashfuse
7 7
 squashfuse_SOURCES = swap.c cache.c table.c dir.c file.c fs.c ll.c squashfuse.c \
8 8
 	decompress.c xattr.c \
9  
-	nonstd-pread.c nonstd-makedev.c nonstd-stat.c nonstd-daemon.c \
  9
+	nonstd-pread.c nonstd-makedev.c nonstd-stat.c nonstd-daemon.c nonstd-enoattr.c \
10 10
 	squashfs_fs.h common.h nonstd-internal.h nonstd.h swap.h cache.h table.h \
11 11
 	dir.h file.h decompress.h xattr.h squashfuse.h ll.h
12 12
 
6  configure.ac
@@ -11,7 +11,7 @@ AC_DEFINE([FUSE_USE_VERSION], [26], [Version of FUSE API to use])
11 11
 
12 12
 ##### Non-POSIX declarations #####
13 13
 
14  
-# SQ_NONSTD_DEFINE(NAME,PROLOG,SOURCE)
  14
+# SQ_NONSTD_DEFINE(NAME, PROLOG, SOURCE, [IF_NOT_FOUND])
15 15
 # Check what #define we need for non-POSIX declarations
16 16
 AC_DEFUN([SQ_NONSTD_DEFINE],[
17 17
 	AH_TEMPLATE(AS_TR_CPP([NONSTD_]$1[_DEF]),
@@ -43,7 +43,7 @@ AC_DEFUN([SQ_NONSTD_DEFINE],[
43 43
 		done
44 44
 	])
45 45
 	AS_VAR_IF([sq_cache],[no],
46  
-		[AC_MSG_FAILURE([can't figure out how to use $1])],
  46
+		m4_default($4,[AC_MSG_FAILURE([can't figure out how to use $1])]),
47 47
 		[AS_VAR_IF([sq_cache],[none],[],[
48 48
 			AC_DEFINE_UNQUOTED(AS_TR_CPP([NONSTD_$1_DEF]),[CHANGE$def],[])
49 49
 		])]
@@ -54,7 +54,7 @@ AC_DEFUN([SQ_NONSTD_DEFINE],[
54 54
 SQ_NONSTD_DEFINE(makedev,[#include <sys/types.h>],[makedev(0,0)])
55 55
 SQ_NONSTD_DEFINE(pread,[#include <unistd.h>],[(void)pread;])
56 56
 SQ_NONSTD_DEFINE(S_IFDIR,[#include <sys/stat.h>],[mode_t m = S_IFDIR;])
57  
-
  57
+SQ_NONSTD_DEFINE(ENOATTR,[#include <errno.h>],[int e = ENOATTR;],[:])
58 58
 
59 59
 ##### Compression #####
60 60
 
1  fs.c
@@ -361,7 +361,6 @@ sqfs_err sqfs_inode_get(sqfs *fs, sqfs_inode *inode, sqfs_inode_id id) {
361 361
 		
362 362
 		default: return SQFS_ERR;
363 363
 	}
364  
-	// FIXME: xattr
365 364
 	
366 365
 	return SQFS_OK;
367 366
 }
2  nonstd.h
@@ -31,4 +31,6 @@ dev_t sqfs_makedev(int maj, int min);
31 31
 
32 32
 ssize_t sqfs_pread(int fd, void *buf, size_t count, off_t off);
33 33
 
  34
+int sqfs_enoattr();
  35
+
34 36
 #endif
3  squashfuse.c
@@ -36,6 +36,7 @@
36 36
 
37 37
 #include "ll.h"
38 38
 #include "squashfuse.h"
  39
+#include "nonstd.h"
39 40
 
40 41
 static const double SQFS_TIMEOUT = DBL_MAX;
41 42
 
@@ -313,7 +314,7 @@ static void sqfs_ll_op_getxattr(fuse_req_t req, fuse_ino_t ino,
313 314
 	} else if (sqfs_xattr_find(&x, name, &found)) {
314 315
 		fuse_reply_err(req, EIO);
315 316
 	} else if (!found) {
316  
-		fuse_reply_err(req, EIO); // FIXME: ENOATTR
  317
+		fuse_reply_err(req, sqfs_enoattr());
317 318
 	} else if (sqfs_xattr_value_size(&x, &vsize)) {
318 319
 		fuse_reply_err(req, EIO);
319 320
 	} else if (!size) {

0 notes on commit 38f6660

Please sign in to comment.
Something went wrong with that request. Please try again.