[PATCH] Base <sys/quota.h> on Linux kernel headers [BZ #20525]
Florian Weimer
fweimer@redhat.com
Wed Aug 31 07:48:00 GMT 2016
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.)
>> * 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.
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quota.patch
Type: text/x-patch
Size: 12003 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160831/58d75c36/attachment.bin>
More information about the Libc-alpha
mailing list