This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Base <sys/quota.h> on Linux kernel headers [BZ #20525]


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

Attachment: pgp5vRYtGjckx.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]