<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">
      <pre>on 2019/10/31 22:31, Petr Vorel wrote:</pre>
    </div>
    <blockquote type="cite" cite="mid:20191031143148.GA6781@dell5510">
      <pre class="moz-quote-pre" wrap="">Hi Xu,

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Q_GETNEXTQUOTA was introduced since linux 4.6, this operation is the
same as Q_GETQUOTA, but it returns quota information for the next ID
greater than or equal to id that has a quota set.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Signed-off-by: Yang Xu <a class="moz-txt-link-rfc2396E" href="mailto:xuyang2018.jy@cn.fujitsu.com"><xuyang2018.jy@cn.fujitsu.com></a>
---
 include/lapi/quotactl.h                       | 23 ++---
 m4/ltp-quota.m4                               | 36 +-------
 .../kernel/syscalls/quotactl/quotactl01.c     | 86 ++++++++++++-------
 3 files changed, 67 insertions(+), 78 deletions(-)
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">diff --git a/include/lapi/quotactl.h b/include/lapi/quotactl.h
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">...
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap=""> #ifndef LAPI_QUOTACTL_H__
 # define LAPI_QUOTACTL_H__
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">+#include <linux/quota.h>
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">I'd prefer to add autotools check for <linux/quota.h configure.ac
(I guess we ignore include/config.h.default atm).

But, more important, I'd prefer to include <sys/quota.h> here as well:

#ifdef HAVE_LINUX_QUOTA_H
# include <linux/quota.h>
#else
# include <sys/quota.h>
#endif</pre>
    </blockquote>
    <pre>Hi Petr

It still has problems that sys/quota.h has some struct defintion as struct dqblk ,struct dqinfo.
Also, now linux/quota.h doesn't have quotactl function declaration.

I think we can use HAVE_STRUCT_IF_NEXTDQBLK macro in lapi/quotactl.h to decide whether include <linux/quota.h> because
I add <linux/quota.h> for finding struct if_netxdqblk defintion.
<pre> </pre></pre>
    <pre>ps: In my ltp fork, it passed.</pre>
    <pre>[1]<a class="moz-txt-link-freetext" href="https://travis-ci.org/xuyang0410/ltp/builds/605963472?utm_medium=notification&utm_source=github_status">https://travis-ci.org/xuyang0410/ltp/builds/605963472?utm_medium=notification&utm_source=github_status</a>
</pre>
    <pre>Thanks
Yang Xu
</pre>
    <blockquote type="cite" cite="mid:20191031143148.GA6781@dell5510">
      <pre class="moz-quote-pre" wrap="">

=> move it from quotactl0*.c (there is not yet agreement to include headers in
lapi files, but later lapi files does it).

The reason is that old distros fail when both headers are included at the same
time (probably <linux/quota.h> got fixed later, maybe there is an workaround,
but the easiest way is to handle this in header anyway).

Kind regards,
Petr

[1] <a class="moz-txt-link-freetext" href="https://travis-ci.org/pevik/ltp/jobs/605507690">https://travis-ci.org/pevik/ltp/jobs/605507690</a>
[2] <a class="moz-txt-link-freetext" href="https://api.travis-ci.org/v3/job/605507690/log.txt">https://api.travis-ci.org/v3/job/605507690/log.txt</a>


</pre>
    </blockquote>
  </body>
</html>