2007-08-06 17:44

If you try to use quotactl on Linux...

Always remember to do this:

#define _LINUX_QUOTA_VERSION 2

Or else, your code will break in misterious ways.

That's because sys/quota.h has this:

/*
 * Select between different incompatible quota versions.
 * Default to the version used by Linux kernel version 2.4.21
 * or earlier (in RHEL version 1 is AS2.1, version 2 is RHEL3 and later).  */
#ifndef _LINUX_QUOTA_VERSION
# define _LINUX_QUOTA_VERSION 1
#endif

Why? I have no idea. But this is true at least on Centos4, I have no clue of this is also true for your distro, but it is sooooo wrong :-(

Comments

Comments powered by Disqus

Contents © 2000-2018 Roberto Alsina