From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Fri, 12 Mar 2021 11:28:41 +0100 Subject: [LTP] [PATCH 1/2] Add FS quota availability check functions In-Reply-To: <20210309171104.30821-1-mdoucha@suse.cz> References: <20210309171104.30821-1-mdoucha@suse.cz> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi Martin, > +int tst_check_quota_support(const char *device, int format, > + const char *quotafile) > +{ > + TEST(quotactl(QCMD(Q_QUOTAON, USRQUOTA), device, format, quotafile)); Actually, there is a warning: tst_supported_fs_types.c: In function ?tst_check_quota_support?: tst_supported_fs_types.c:117:59: warning: passing argument 4 of ?quotactl? discards ?const? qualifier from pointer target type [-Wdiscarded-qualifiers] 117 | TEST(quotactl(QCMD(Q_QUOTAON, USRQUOTA), device, format, quotafile)); Would you prefer to cast to char *, or just change function parameter to char *? Kind regards, Petr > + > + /* Not supported */ > + if (TST_RET == -1 && TST_ERR == ESRCH) > + return 0; > + > + /* Broken */ > + if (TST_RET) > + return -1; > + > + quotactl(QCMD(Q_QUOTAOFF, USRQUOTA), device, 0, 0); > + return 1; > +}