From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs@oss.sgi.com
Subject: Re: [ANNOUNCE, DISCUSS] xfsprogs: libxfs-4.1-update branch created
Date: Thu, 14 May 2015 11:04:02 +1000 [thread overview]
Message-ID: <20150514010402.GE4316@dastard> (raw)
In-Reply-To: <5553CCD2.1010906@sandeen.net>
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@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-05-14 1:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 0:05 [ANNOUNCE, DISCUSS] xfsprogs: libxfs-4.1-update branch created Dave Chinner
2015-05-11 5:37 ` Christoph Hellwig
2015-05-11 12:39 ` Brian Foster
2015-05-11 13:20 ` Dave Chinner
2015-05-11 14:14 ` Brian Foster
2015-05-11 14:50 ` Eric Sandeen
2015-05-11 14:48 ` Eric Sandeen
2015-05-11 21:28 ` Dave Chinner
2015-05-11 23:47 ` Eric Sandeen
2015-05-13 22:14 ` Eric Sandeen
2015-05-13 22:25 ` Eric Sandeen
2015-05-13 22:42 ` Eric Sandeen
2015-05-14 1:04 ` Dave Chinner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150514010402.GE4316@dastard \
--to=david@fromorbit.com \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox