]> arthur.barton.de Git - netatalk.git/commitdiff
Back out previous commit. There is still a point of contention on what the
authorjmarcus <jmarcus>
Sat, 19 Jan 2002 00:22:23 +0000 (00:22 +0000)
committerjmarcus <jmarcus>
Sat, 19 Jan 2002 00:22:23 +0000 (00:22 +0000)
correct way to handle quotas.

etc/afpd/quota.c

index 0946573bbbad2d9ab13ab6cf5e1d4acafd1a6f72..9eaf63eaba124d40ac51064668ccf07421f7b5c9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: quota.c,v 1.16 2002-01-18 22:42:24 jmarcus Exp $
+ * $Id: quota.c,v 1.17 2002-01-19 00:22:23 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -414,7 +414,9 @@ const u_int32_t bsize;
         *btotal = *bfree = ~((VolSpace) 0);
     } else if ( overquota( &dqblk )) {
         *btotal = tobytes( dqblk.dqb_bhardlimit, bsize );
-               *bfree = 0; /* Report 0 bytes left when over soft quota. */
+               *bfree = tobytes( dqblk.dqb_bhardlimit, bsize ) -
+                        tobytes( dqblk.dqb_curblocks, bsize );
+
     } else {
         *btotal = tobytes( dqblk.dqb_bsoftlimit, bsize );
         *bfree = tobytes( dqblk.dqb_bsoftlimit, bsize  ) -