From: Eric Sandeen <sandeen@sandeen.net>
To: Dave Chinner <david@fromorbit.com>, xfs@oss.sgi.com
Subject: Re: [ANNOUNCE, DISCUSS] xfsprogs: libxfs-4.1-update branch created
Date: Wed, 13 May 2015 17:14:42 -0500 [thread overview]
Message-ID: <5553CCD2.1010906@sandeen.net> (raw)
In-Reply-To: <20150511000508.GD16689@dastard>
-----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?)
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.
I'm not actually sure what the cleanest way to fix this is;
casting string literals gets way past my comfort level with
C pedantry; technically if we want an array of unsigned chars,
we probably need:
unsigned char *SGI_ACL_FILE[] = "SGI_ACL_FILE";
unsigned char *SGI_ACL_DEFAULT[] = "SGI_ACL_DEFAULT";
but then it can't live in the format header; in kernelspace we need that
symbol in xfs_acl.c, in userspace we need it in repair/attr_repair.c
- -Eric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
iQIcBAEBAgAGBQJVU8zRAAoJECCuFpLhPd7gzmIQAJPuO9ZRCMEjswGNVssux0Jm
+++pRvgPVl3qhdplzgukWcPTnZeq9NzfrU2rzwNNiA5nolgyKdo+Iu5rsPm3ZYHR
d80WU3mmkFPjoKbtwHP70bp71mxfSw7gb/k+MBOks/8PdkKHhbzI81n9q5WKGWxv
RQ+tUSVDxy/n25j4nLNp5nUwLPCycglxk8BD+rA3m4yJ1oDXZVWq7hXV+rYPxrQR
RV+GrwN+2thETlFSRexnzyTPO7n3cysUVaDVWC1RvqcMY2Ku3yb4EiJJdiCgLLq9
sBX4OWiy/A6020fhbaSnNV3tX4OQ7DmZe8JQ82GmtfwlzHWiQtFogJFgH4kLaXNm
oRwIsgX8BCzwDIYdbu+kbY5krtMaO8I4Fi1hM7nxVZKodo+hbPzTQjWEt9dmx4up
ForoWXsX3eibKhVEei7kuM0GIXK8C0G40VH2eFFGhJBTOOHj5NglLiZxMx0pl/HE
tl/l/SXhYK025ADFxpiwOBGkIoEo/bZI8REJblPIpb1PZNVEc05jTT3aTXpGmx+p
1AAeDnI3/urseJjhtQdvD8O7q47NrQNC4MLStA9wxQkn3d+XAoeQAzSCbxGS2fHO
CClPrV8tmAjI6Q3XvtdauRMXcO9npNroIndXjK4fuiSn0jtcHDJJts0wjPJkAI/x
6dnAQ7VcMg4V/Cxrt5XK
=T5wD
-----END PGP SIGNATURE-----
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-05-13 22:14 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 [this message]
2015-05-13 22:25 ` Eric Sandeen
2015-05-13 22:42 ` Eric Sandeen
2015-05-14 1:04 ` Dave Chinner
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=5553CCD2.1010906@sandeen.net \
--to=sandeen@sandeen.net \
--cc=david@fromorbit.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.