[PATCH 04/14] xfsprogs: prefix XATTR_LIST_MAX with XFS_

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



WILL CHANGE THE COMMIT MESSAGE.

All right, I make the renaming with define - though I'm not sure
that with the ifdef for OS X and SIZE_MAX moved to a standalone patch
we need it - shouldn't be this change rather dropped?

Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx>
---
 include/xfs.h      | 2 ++
 libhandle/handle.c | 4 ++--
 libhandle/jdm.c    | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/xfs.h b/include/xfs.h
index bc94068..8ee0106 100644
--- a/include/xfs.h
+++ b/include/xfs.h
@@ -53,6 +53,8 @@
 # define ASSERT(EX)	((void) 0)
 #endif
 
+#define XFS_XATTR_LIST_MAX XATTR_LIST_MAX
+
 /*
  * sparse kernel source annotations
  */
diff --git a/libhandle/handle.c b/libhandle/handle.c
index b1c0c10..7207186 100644
--- a/libhandle/handle.c
+++ b/libhandle/handle.c
@@ -397,8 +397,8 @@ attr_list_by_handle(
 	alhreq.buffer = buf;
 	alhreq.buflen = bufsize;
 	/* prevent needless EINVAL from the kernel */
-	if (alhreq.buflen > XATTR_LIST_MAX)
-		alhreq.buflen = XATTR_LIST_MAX;
+	if (alhreq.buflen > XFS_XATTR_LIST_MAX)
+		alhreq.buflen = XFS_XATTR_LIST_MAX;
 
 	error = xfsctl(path, fd, XFS_IOC_ATTRLIST_BY_HANDLE, &alhreq);
 
diff --git a/libhandle/jdm.c b/libhandle/jdm.c
index d804423..e52f5d8 100644
--- a/libhandle/jdm.c
+++ b/libhandle/jdm.c
@@ -168,8 +168,8 @@ jdm_attr_list(	jdm_fshandle_t *fshp,
 	int rval;
 
 	/* prevent needless EINVAL from the kernel */
-	if (bufsz > XATTR_LIST_MAX)
-		bufsz = XATTR_LIST_MAX;
+	if (bufsz > XFS_XATTR_LIST_MAX)
+		bufsz = XFS_XATTR_LIST_MAX;
 
 	jdm_fill_filehandle( &filehandle, fshandlep, statp );
 	rval = attr_list_by_handle (( void * )&filehandle,
-- 
2.4.3

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux