Quota-Backend-Cleanup/Logging remove tmpfs and create quota if not exist Part three
All checks were successful
Source release / source-package (push) Successful in 39s

This commit is contained in:
Mario Fetka
2026-05-26 00:24:20 +02:00
parent b6d5266e2d
commit e80b67a490

View File

@@ -938,9 +938,14 @@ const char *find_device_file(const char *path)
/* Modern glibc declares quotactl() in <sys/quota.h>. The old _syscall4()
* wrapper no longer builds on current systems, so do not provide a private
* syscall stub here.
*
* Prefer Q_SETQUOTA when available. Q_SETQLIM can fail with ESRCH when no
* dquot record exists yet; Q_SETQUOTA is the modern "write this dqblk" API.
*/
# if !defined(Q_SETQLIM) && defined(Q_SETQUOTA)
# define Q_SETQLIM Q_SETQUOTA
# if defined(Q_SETQUOTA)
# define MARS_Q_SETQUOTA Q_SETQUOTA
# elif defined(Q_SETQLIM)
# define MARS_Q_SETQUOTA Q_SETQLIM
# endif
#endif /* LINUX */
@@ -1019,7 +1024,7 @@ int nw_set_vol_restrictions(uint8 volnr, int uid, uint32 quota)
dqblk.dqb_ihardlimit,
dqblk.dqb_curinodes));
res=su_quotactl(QCMD(Q_SETQLIM, USRQUOTA), device, uid, (caddr_t) &dqblk);
res=su_quotactl(QCMD(MARS_Q_SETQUOTA, USRQUOTA), device, uid, (caddr_t) &dqblk);
if (res != 0) {
XDPRINTF((2,0, "Set quota failed device=%s uid=%d quota=%dK errno=%d",
device, uid, quota, errno));