On Wed, May 13, 2015 at 05:14:42PM -0500, Eric Sandeen wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > One interesting problem that arises from this is in xfs_format.h: > > /* On-disk XFS extended attribute names */ > #define SGI_ACL_FILE (char *)"SGI_ACL_FILE" > #define SGI_ACL_DEFAULT (char *)"SGI_ACL_DEFAULT" > #define SGI_ACL_FILE_SIZE (sizeof(SGI_ACL_FILE)-1) > #define SGI_ACL_DEFAULT_SIZE (sizeof(SGI_ACL_DEFAULT)-1) > > (aside: why is it unsigned in the kernel but not here?) Because otherwise xfsprogs throws compile warnings all over the place about pasing unsigned char * to strn*() functions. And, IIRC, if we make the char * in the kernel, then they throw compile warnings for passing char * to const unsigned char * function parameters.... The kernel fs code (all of it, not just XFS) is an utter mess of unsigned/signed char used for names and strings - don't ever try turning on warn-unsigned when you build the kernel.... > Anyway: that "sizeof" gives us 7, because it's getting the > size of the pointer, not the string literal. Cool eh! > Never mattered in the kernel, because the _SIZE macros aren't > used. Yeah, that's a bug ;) Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs