[PATCH] Base <sys/quota.h> on Linux kernel headers [BZ #20525]
Dmitry V. Levin
ldv@altlinux.org
Thu Sep 1 09:09:00 GMT 2016
On Wed, Aug 31, 2016 at 09:48:01AM +0200, Florian Weimer wrote:
> On 08/31/2016 02:18 AM, Dmitry V. Levin wrote:
>
> >> (struct dqblock, struct dqinfo): Use __uint64_t and __uint32_t
> >> types.
> >
> >Can we just typedef dqblock and dqinfo to struct if_dqblk and
> >struct if_dqinfo, respectively?
>
> struct dqblock and struct dqinfo would still be invalid after that. I
> don't think you can alias struct tags in C or C++. (C++ could use
> inheritance, but it would work only in one direction.)
Fair enough.
> >> * sysdeps/unix/sysv/linux/tst-quota.c: New test.
> >
> >Could you add this new test to the patch, please?
>
> Oh, attached. It does not really test anything, only that the header
> compiles
>
> >[...]
> >>@@ -57,7 +67,7 @@
> >> * Convert count of filesystem blocks to diskquota blocks, meant
> >> * for filesystems where i_blksize != BLOCK_SIZE
> >> */
> >>-#define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / BLOCK_SIZE)
> >>+#define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / 1024)
> >
> >This change makes the cited comment somewhat out of context.
>
> I updated the comment.
LGTM
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160901/822c6ec5/attachment.sig>
More information about the Libc-alpha
mailing list