MCPcopy Create free account
hub / github.com/F-Stack/f-stack / quota_read

Function quota_read

tools/libutil/quotafile.c:338–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338int
339quota_read(struct quotafile *qf, struct dqblk *dqb, int id)
340{
341 int qcmd;
342
343 if (qf->fd == -1) {
344 qcmd = QCMD(Q_GETQUOTA, qf->quotatype);
345 return (quotactl(qf->fsname, qcmd, id, dqb));
346 }
347 switch (qf->wordsize) {
348 case 32:
349 return (quota_read32(qf, dqb, id));
350 case 64:
351 return (quota_read64(qf, dqb, id));
352 default:
353 errno = EINVAL;
354 return (-1);
355 }
356 /* not reached */
357}
358
359#define CLIP32(u64) ((u64) > UINT32_MAX ? UINT32_MAX : (uint32_t)(u64))
360

Callers 3

quota_write_usageFunction · 0.85
quota_write_limitsFunction · 0.85
quota_convertFunction · 0.85

Calls 2

quota_read32Function · 0.85
quota_read64Function · 0.85

Tested by

no test coverage detected