3 * Copyright (c) 1990,1993 Regents of The University of Michigan.
4 * All Rights Reserved. See COPYRIGHT.
9 #endif /* HAVE_CONFIG_H */
11 #ifndef NO_QUOTA_SUPPORT
16 #include <sys/types.h>
20 #include <sys/param.h>
24 #include <atalk/logger.h>
25 #include <atalk/afp.h>
26 #include <atalk/compat.h>
27 #include <atalk/unix.h>
28 #include <atalk/util.h>
35 #include <quota/quota.h>
38 getfreespace(const AFPObj *obj, struct vol *vol, VolSpace *bfree, VolSpace *btotal,
39 uid_t uid, const char *classq)
42 struct ufs_quota_entry ufsq[QUOTA_NLIMITS];
45 if (time(&now) == -1) {
46 LOG(log_info, logtype_afpd, "time(): %s",
53 if ((retq = getfsquota(obj, vol, ufsq, uid, classq)) < 0) {
54 LOG(log_info, logtype_afpd, "getfsquota(%s, %s): %s",
55 vol->v_path, classq, strerror(errno));
63 switch(QL_STATUS(quota_check_limit(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_cur, 1,
64 ufsq[QUOTA_LIMIT_BLOCK].ufsqe_softlimit,
65 ufsq[QUOTA_LIMIT_BLOCK].ufsqe_hardlimit,
66 ufsq[QUOTA_LIMIT_BLOCK].ufsqe_time, now))) {
70 *btotal = dbtob(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_cur);
73 *bfree = dbtob(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_hardlimit -
74 ufsq[QUOTA_LIMIT_BLOCK].ufsqe_cur);
75 *btotal = dbtob(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_hardlimit);
81 int uquota_getvolspace(const AFPObj *obj, struct vol *vol, VolSpace *bfree, VolSpace *btotal, const u_int32_t bsize)
84 VolSpace ubfree, ubtotal;
85 VolSpace gbfree, gbtotal;
87 uretq = getfreespace(obj, vol, &ubfree, &ubtotal,
88 uuid, QUOTADICT_CLASS_USER);
89 LOG(log_info, logtype_afpd, "getfsquota(%s): %d %d",
90 vol->v_path, (int)ubfree, (int)ubtotal);
91 if (obj->ngroups >= 1) {
92 gretq = getfreespace(vol, &ubfree, &ubtotal,
93 obj->groups[0], QUOTADICT_CLASS_GROUP);
96 if (uretq < 1 && gretq < 1) { /* no quota for this fs */
100 /* use group quotas */
103 } else if (gretq < 1) {
104 /* use user quotas */
108 /* return smallest remaining space of user and group */
109 if (ubfree < gbfree) {
121 #else /* HAVE_LIBQUOTA */
124 #define DEBUG_QUOTA 0
127 #define WANT_USER_QUOTA 0
128 #define WANT_GROUP_QUOTA 1
130 #ifdef NEED_QUOTACTL_WRAPPER
131 int quotactl(int cmd, const char *special, int id, caddr_t addr)
133 return syscall(__NR_quotactl, cmd, special, id, addr);
135 #endif /* NEED_QUOTACTL_WRAPPER */
137 static int overquota( struct dqblk *);
141 #ifdef HAVE_LINUX_XQM_H
142 #include <linux/xqm.h>
144 #ifdef HAVE_XFS_XQM_H
146 #define HAVE_LINUX_XQM_H
148 #ifdef HAVE_LINUX_DQBLK_XFS_H
149 #include <linux/dqblk_xfs.h>
150 #define HAVE_LINUX_XQM_H
151 #endif /* HAVE_LINUX_DQBLK_XFS_H */
152 #endif /* HAVE_XFS_XQM_H */
153 #endif /* HAVE_LINUX_XQM_H */
155 #include <linux/unistd.h>
157 static int is_xfs = 0;
159 static int get_linux_xfs_quota(int, char*, uid_t, struct dqblk *);
160 static int get_linux_fs_quota(int, char*, uid_t, struct dqblk *);
162 /* format supported by current kernel */
163 static int kernel_iface = IFACE_UNSET;
166 ** Check kernel quota version
167 ** Taken from quota-tools 3.08 by Jan Kara <jack@suse.cz>
169 static void linuxquota_get_api( void )
171 #ifndef LINUX_API_VERSION
174 if (stat("/proc/sys/fs/quota", &st) == 0) {
175 kernel_iface = IFACE_GENERIC;
178 struct dqstats_v2 v2_stats;
179 struct sigaction sig;
180 struct sigaction oldsig;
182 /* This signal handling is needed because old kernels send us SIGSEGV as they try to resolve the device */
183 sig.sa_handler = SIG_IGN;
184 sig.sa_sigaction = NULL;
186 sigemptyset(&sig.sa_mask);
187 if (sigaction(SIGSEGV, &sig, &oldsig) < 0) {
188 LOG( log_error, logtype_afpd, "cannot set SEGV signal handler: %s", strerror(errno));
191 if (quotactl(QCMD(Q_V2_GETSTATS, 0), NULL, 0, (void *)&v2_stats) >= 0) {
192 kernel_iface = IFACE_VFSV0;
194 else if (errno != ENOSYS && errno != ENOTSUP) {
195 /* RedHat 7.1 (2.4.2-2) newquota check
196 * Q_V2_GETSTATS in it's old place, Q_GETQUOTA in the new place
197 * (they haven't moved Q_GETSTATS to its new value) */
200 char tmp[1024]; /* Just temporary buffer */
202 if (quotactl(QCMD(Q_V1_GETSTATS, 0), NULL, 0, tmp))
204 if (quotactl(QCMD(Q_V1_GETQUOTA, 0), "/dev/null", 0, tmp))
207 /* On a RedHat 2.4.2-2 we expect 0, EINVAL
208 * On a 2.4.x we expect 0, ENOENT
209 * On a 2.4.x-ac we wont get here */
210 if (err_stat == 0 && err_quota == EINVAL) {
211 kernel_iface = IFACE_VFSV0;
214 kernel_iface = IFACE_VFSOLD;
218 /* This branch is *not* in quota-tools 3.08
219 ** but without it quota version is not correctly
220 ** identified for the original SuSE 8.0 kernel */
221 unsigned int vers_no;
224 if ((qf = fopen("/proc/fs/quota", "r"))) {
225 if (fscanf(qf, "Version %u", &vers_no) == 1) {
226 if ( (vers_no == (6*10000 + 5*100 + 0)) ||
227 (vers_no == (6*10000 + 5*100 + 1)) ) {
228 kernel_iface = IFACE_VFSV0;
234 if (sigaction(SIGSEGV, &oldsig, NULL) < 0) {
235 LOG(log_error, logtype_afpd, "cannot reset signal handler: %s", strerror(errno));
241 if (kernel_iface == IFACE_UNSET)
242 kernel_iface = IFACE_VFSOLD;
244 #else /* defined LINUX_API_VERSION */
245 kernel_iface = LINUX_API_VERSION;
249 /****************************************************************************/
251 static int get_linux_quota(int what, char *path, uid_t euser_id, struct dqblk *dp)
256 r=get_linux_xfs_quota(what, path, euser_id, dp);
258 r=get_linux_fs_quota(what, path, euser_id, dp);
263 /****************************************************************************
264 Abstract out the XFS Quota Manager quota get call.
265 ****************************************************************************/
267 static int get_linux_xfs_quota(int what, char *path, uid_t euser_id, struct dqblk *dqb)
270 #ifdef HAVE_LINUX_XQM_H
271 struct fs_disk_quota D;
273 memset (&D, 0, sizeof(D));
275 if ((ret = quotactl(QCMD(Q_XGETQUOTA,(what ? GRPQUOTA : USRQUOTA)), path, euser_id, (caddr_t)&D)))
278 dqb->bsize = (uint64_t)512;
279 dqb->dqb_bsoftlimit = (uint64_t)D.d_blk_softlimit;
280 dqb->dqb_bhardlimit = (uint64_t)D.d_blk_hardlimit;
281 dqb->dqb_ihardlimit = (uint64_t)D.d_ino_hardlimit;
282 dqb->dqb_isoftlimit = (uint64_t)D.d_ino_softlimit;
283 dqb->dqb_curinodes = (uint64_t)D.d_icount;
284 dqb->dqb_curblocks = (uint64_t)D.d_bcount;
290 ** Wrapper for the quotactl(GETQUOTA) call.
291 ** For API v2 the results are copied back into a v1 structure.
292 ** Taken from quota-1.4.8 perl module
294 static int get_linux_fs_quota(int what, char *path, uid_t euser_id, struct dqblk *dqb)
298 if (kernel_iface == IFACE_UNSET)
299 linuxquota_get_api();
301 if (kernel_iface == IFACE_GENERIC)
303 struct dqblk_v3 dqb3;
305 ret = quotactl(QCMD(Q_V3_GETQUOTA, (what ? GRPQUOTA : USRQUOTA)), path, euser_id, (caddr_t) &dqb3);
308 dqb->dqb_bhardlimit = dqb3.dqb_bhardlimit;
309 dqb->dqb_bsoftlimit = dqb3.dqb_bsoftlimit;
310 dqb->dqb_curblocks = dqb3.dqb_curspace / DEV_QBSIZE;
311 dqb->dqb_ihardlimit = dqb3.dqb_ihardlimit;
312 dqb->dqb_isoftlimit = dqb3.dqb_isoftlimit;
313 dqb->dqb_curinodes = dqb3.dqb_curinodes;
314 dqb->dqb_btime = dqb3.dqb_btime;
315 dqb->dqb_itime = dqb3.dqb_itime;
316 dqb->bsize = DEV_QBSIZE;
319 else if (kernel_iface == IFACE_VFSV0)
321 struct dqblk_v2 dqb2;
323 ret = quotactl(QCMD(Q_V2_GETQUOTA, (what ? GRPQUOTA : USRQUOTA)), path, euser_id, (caddr_t) &dqb2);
326 dqb->dqb_bhardlimit = dqb2.dqb_bhardlimit;
327 dqb->dqb_bsoftlimit = dqb2.dqb_bsoftlimit;
328 dqb->dqb_curblocks = dqb2.dqb_curspace / DEV_QBSIZE;
329 dqb->dqb_ihardlimit = dqb2.dqb_ihardlimit;
330 dqb->dqb_isoftlimit = dqb2.dqb_isoftlimit;
331 dqb->dqb_curinodes = dqb2.dqb_curinodes;
332 dqb->dqb_btime = dqb2.dqb_btime;
333 dqb->dqb_itime = dqb2.dqb_itime;
334 dqb->bsize = DEV_QBSIZE;
337 else /* if (kernel_iface == IFACE_VFSOLD) */
339 struct dqblk_v1 dqb1;
341 ret = quotactl(QCMD(Q_V1_GETQUOTA, (what ? GRPQUOTA : USRQUOTA)), path, euser_id, (caddr_t) &dqb1);
344 dqb->dqb_bhardlimit = dqb1.dqb_bhardlimit;
345 dqb->dqb_bsoftlimit = dqb1.dqb_bsoftlimit;
346 dqb->dqb_curblocks = dqb1.dqb_curblocks;
347 dqb->dqb_ihardlimit = dqb1.dqb_ihardlimit;
348 dqb->dqb_isoftlimit = dqb1.dqb_isoftlimit;
349 dqb->dqb_curinodes = dqb1.dqb_curinodes;
350 dqb->dqb_btime = dqb1.dqb_btime;
351 dqb->dqb_itime = dqb1.dqb_itime;
352 dqb->bsize = DEV_QBSIZE;
360 #if defined(HAVE_SYS_MNTTAB_H) || defined(__svr4__)
362 * Return the mount point associated with the filesystem
363 * on which "file" resides. Returns NULL on failure.
366 mountp( char *file, int *nfs)
371 static struct mnttab mnt;
373 if (stat(file, &sb) < 0) {
378 if (( mtab = fopen( "/etc/mnttab", "r" )) == NULL ) {
382 while ( getmntent( mtab, &mnt ) == 0 ) {
384 if ( (stat( mnt.mnt_special, &sb ) == 0) && (devno == sb.st_rdev)) {
386 return mnt.mnt_mountp;
389 /* check for nfs. we probably should use
390 * strcmp(mnt.mnt_fstype, MNTTYPE_NFS), but that's not as fast. */
391 if ((stat(mnt.mnt_mountp, &sb) == 0) && (devno == sb.st_dev) &&
392 strchr(mnt.mnt_special, ':')) {
395 return mnt.mnt_special;
406 * Return the block-special device name associated with the filesystem
407 * on which "file" resides. Returns NULL on failure.
411 special( char *file, int *nfs)
413 static struct fs_data fsd;
415 if ( getmnt(0, &fsd, 0, STAT_ONE, file ) < 0 ) {
416 LOG(log_info, logtype_afpd, "special: getmnt %s: %s", file, strerror(errno) );
420 /* XXX: does this really detect an nfs mounted fs? */
421 if (strchr(fsd.fd_req.devname, ':'))
423 return( fsd.fd_req.devname );
427 #if (defined(HAVE_SYS_MOUNT_H) && !defined(__linux__)) || defined(BSD4_4) || defined(_IBMR2)
430 special(char *file, int *nfs)
432 static struct statfs sfs;
434 if ( statfs( file, &sfs ) < 0 ) {
439 /* Digital UNIX: The struct sfs contains a field sfs.f_type,
440 * the MOUNT_* constants are defined in <sys/mount.h> */
441 if ((sfs.f_type == MOUNT_NFS)||(sfs.f_type == MOUNT_NFS3))
443 /* XXX: make sure this really detects an nfs mounted fs */
444 if (strchr(sfs.f_mntfromname, ':'))
447 return( sfs.f_mntfromname );
453 special(char *file, int *nfs)
461 if (stat(file, &sb) < 0 ) {
466 if (( mtab = setmntent( "/etc/mtab", "r" )) == NULL ) {
470 while (( mnt = getmntent( mtab )) != NULL ) {
471 /* check for local fs */
472 if ( (stat( mnt->mnt_fsname, &sb ) == 0) && devno == sb.st_rdev) {
477 /* check for an nfs mount entry. the alternative is to use
478 * strcmp(mnt->mnt_type, MNTTYPE_NFS) instead of the strchr. */
479 if ((stat(mnt->mnt_dir, &sb) == 0) && (devno == sb.st_dev) &&
480 strchr(mnt->mnt_fsname, ':')) {
492 if (strcmp(mnt->mnt_type, "xfs") == 0)
496 return( mnt->mnt_fsname );
501 #endif /* __svr4__ */
504 static int getfsquota(const AFPObj *obj, struct vol *vol, const int uid, struct dqblk *dq)
513 memset(dq, 0, sizeof(struct dqblk));
514 memset(&dqg, 0, sizeof(dqg));
519 qc.addr = (caddr_t)dq;
520 if ( ioctl( vol->v_qfd, Q_QUOTACTL, &qc ) < 0 ) {
521 return( AFPERR_PARAM );
526 if ( quota( Q_GETDLIM, uid, vol->v_gvs, dq ) != 0 ) {
527 return( AFPERR_PARAM );
536 #define QCMD(a,b) (a)
540 /* for group quotas. we only use these if the user belongs
546 if ( quotactl( vol->v_path, QCMD(Q_GETQUOTA,USRQUOTA),
547 uid, (char *)dq ) != 0 ) {
548 /* try group quotas */
549 if (obj->ngroups >= 1) {
550 if ( quotactl(vol->v_path, QCMD(Q_GETQUOTA, GRPQUOTA),
551 obj->groups[0], (char *) &dqg) != 0 ) {
553 return( AFPERR_PARAM );
561 if (get_linux_quota (WANT_USER_QUOTA, vol->v_gvs, uid, dq) !=0) {
563 LOG(log_debug, logtype_afpd, "user quota did not work!" );
564 #endif /* DEBUG_QUOTA */
567 if (get_linux_quota(WANT_GROUP_QUOTA, vol->v_gvs, getegid(), &dqg) != 0) {
569 LOG(log_debug, logtype_afpd, "group quota did not work!" );
570 #endif /* DEBUG_QUOTA */
572 return AFP_OK; /* no need to check user vs group quota */
578 /* return either the group quota entry or user quota entry,
579 whichever has the least amount of space remaining
582 /* if user space remaining > group space remaining */
584 /* if overquota, free space is 0 otherwise hard-current */
585 ( overquota( dq ) ? 0 : ( dq->dqb_bhardlimit ? dq->dqb_bhardlimit -
586 dq->dqb_curblocks : ~((uint64_t) 0) ) )
590 ( overquota( &dqg ) ? 0 : ( dqg.dqb_bhardlimit ? dqg.dqb_bhardlimit -
591 dqg.dqb_curblocks : ~((uint64_t) 0) ) )
595 /* use group quota limits rather than user limits */
596 dq->dqb_bhardlimit = dqg.dqb_bhardlimit;
597 dq->dqb_bsoftlimit = dqg.dqb_bsoftlimit;
598 dq->dqb_curblocks = dqg.dqb_curblocks;
599 dq->dqb_ihardlimit = dqg.dqb_ihardlimit;
600 dq->dqb_isoftlimit = dqg.dqb_isoftlimit;
601 dq->dqb_curinodes = dqg.dqb_curinodes;
602 dq->dqb_btime = dqg.dqb_btime;
603 dq->dqb_itime = dqg.dqb_itime;
604 dq->bsize = dqg.bsize;
610 #endif /* __svr4__ */
616 static int getquota(const AFPObj *obj, struct vol *vol, struct dqblk *dq, const uint32_t bsize)
621 char buf[ MAXPATHLEN + 1];
623 if ( vol->v_qfd == -1 && vol->v_gvs == NULL) {
624 if (( p = mountp( vol->v_path, &vol->v_nfs)) == NULL ) {
625 LOG(log_info, logtype_afpd, "getquota: mountp %s fails", vol->v_path );
626 return( AFPERR_PARAM );
630 if (( vol->v_gvs = (char *)malloc( strlen( p ) + 1 )) == NULL ) {
631 LOG(log_error, logtype_afpd, "getquota: malloc: %s", strerror(errno) );
634 strcpy( vol->v_gvs, p );
637 sprintf( buf, "%s/quotas", p );
638 if (( vol->v_qfd = open( buf, O_RDONLY, 0 )) < 0 ) {
639 LOG(log_info, logtype_afpd, "open %s: %s", buf, strerror(errno) );
640 return( AFPERR_PARAM );
646 if ( vol->v_gvs == NULL ) {
647 if (( p = special( vol->v_path, &vol->v_nfs )) == NULL ) {
648 LOG(log_info, logtype_afpd, "getquota: special %s fails", vol->v_path );
649 return( AFPERR_PARAM );
652 if (( vol->v_gvs = (char *)malloc( strlen( p ) + 1 )) == NULL ) {
653 LOG(log_error, logtype_afpd, "getquota: malloc: %s", strerror(errno) );
656 strcpy( vol->v_gvs, p );
661 /* Digital UNIX: Two forms of specifying an NFS filesystem are possible,
662 either 'hostname:path' or 'path@hostname' (Ultrix heritage) */
665 char pathstring[MNAMELEN];
666 /* MNAMELEN ist defined in <sys/mount.h> */
669 if ((hostpath = strchr(vol->v_gvs,'@')) != NULL ) {
670 /* convert 'path@hostname' to 'hostname:path',
671 * call getnfsquota(),
672 * convert 'hostname:path' back to 'path@hostname' */
674 sprintf(pathstring,"%s:%s",hostpath+1,vol->v_gvs);
675 strcpy(vol->v_gvs,pathstring);
677 result = getnfsquota(vol, uuid, bsize, dq);
679 hostpath = strchr(vol->v_gvs,':');
681 sprintf(pathstring,"%s@%s",hostpath+1,vol->v_gvs);
682 strcpy(vol->v_gvs,pathstring);
687 /* vol->v_gvs is of the form 'hostname:path' */
688 return getnfsquota(vol, uuid, bsize, dq);
690 /* local filesystem */
691 return getfsquota(obj, vol, obj->uid, dq);
694 return vol->v_nfs ? getnfsquota(vol, obj->uid, bsize, dq) :
695 getfsquota(obj, vol, obj->uid, dq);
699 static int overquota( struct dqblk *dqblk)
703 if ( dqblk->dqb_curblocks > dqblk->dqb_bhardlimit &&
704 dqblk->dqb_bhardlimit != 0 ) {
708 if ( dqblk->dqb_curblocks < dqblk->dqb_bsoftlimit ||
709 dqblk->dqb_bsoftlimit == 0 ) {
713 if ( dqblk->dqb_bwarn ) {
717 if ( gettimeofday( &tv, NULL ) < 0 ) {
718 LOG(log_error, logtype_afpd, "overquota: gettimeofday: %s", strerror(errno) );
719 return( AFPERR_PARAM );
721 if ( dqblk->dqb_btimelimit && dqblk->dqb_btimelimit > tv.tv_sec ) {
729 * This next bit is basically for linux -- everything is fine
730 * if you use 1k blocks... but if you try (for example) to mount
731 * a volume via nfs from a netapp (which might use 4k blocks) everything
732 * gets reported improperly. I have no idea about dbtob on other
736 #ifdef HAVE_BROKEN_DBTOB
738 #define dbtob(a, b) ((VolSpace)((VolSpace)(a) * (VolSpace)(b)))
739 #define HAVE_2ARG_DBTOB
743 #define dbtob(a) ((a) << 10)
746 /* i do the cast to VolSpace here to make sure that 64-bit shifts
748 #ifdef HAVE_2ARG_DBTOB
749 #define tobytes(a, b) dbtob((VolSpace) (a), (VolSpace) (b))
751 #define tobytes(a, b) dbtob((VolSpace) (a))
754 int uquota_getvolspace(const AFPObj *obj, struct vol *vol, VolSpace *bfree, VolSpace *btotal, const uint32_t bsize)
761 if (getquota(obj, vol, &dqblk, bsize) != 0 ) {
762 return( AFPERR_PARAM );
766 this_bsize = dqblk.bsize;
770 LOG(log_debug, logtype_afpd, "after calling getquota in uquota_getvolspace!" );
771 LOG(log_debug, logtype_afpd, "dqb_ihardlimit: %u", dqblk.dqb_ihardlimit );
772 LOG(log_debug, logtype_afpd, "dqb_isoftlimit: %u", dqblk.dqb_isoftlimit );
773 LOG(log_debug, logtype_afpd, "dqb_curinodes : %u", dqblk.dqb_curinodes );
774 LOG(log_debug, logtype_afpd, "dqb_bhardlimit: %u", dqblk.dqb_bhardlimit );
775 LOG(log_debug, logtype_afpd, "dqb_bsoftlimit: %u", dqblk.dqb_bsoftlimit );
776 LOG(log_debug, logtype_afpd, "dqb_curblocks : %u", dqblk.dqb_curblocks );
777 LOG(log_debug, logtype_afpd, "dqb_btime : %u", dqblk.dqb_btime );
778 LOG(log_debug, logtype_afpd, "dqb_itime : %u", dqblk.dqb_itime );
779 LOG(log_debug, logtype_afpd, "bsize/this_bsize : %u/%u", bsize, this_bsize );
780 LOG(log_debug, logtype_afpd, "dqblk.dqb_bhardlimit size: %u", tobytes( dqblk.dqb_bhardlimit, this_bsize ));
781 LOG(log_debug, logtype_afpd, "dqblk.dqb_bsoftlimit size: %u", tobytes( dqblk.dqb_bsoftlimit, this_bsize ));
782 LOG(log_debug, logtype_afpd, "dqblk.dqb_curblocks size: %u", tobytes( dqblk.dqb_curblocks, this_bsize ));
783 #endif /* DEBUG_QUOTA */
785 /* no limit set for this user. it might be set in the future. */
786 if (dqblk.dqb_bsoftlimit == 0 && dqblk.dqb_bhardlimit == 0) {
787 *btotal = *bfree = ~((VolSpace) 0);
788 } else if ( overquota( &dqblk )) {
789 if ( tobytes( dqblk.dqb_curblocks, this_bsize ) > tobytes( dqblk.dqb_bsoftlimit, this_bsize ) ) {
790 *btotal = tobytes( dqblk.dqb_curblocks, this_bsize );
794 *btotal = tobytes( dqblk.dqb_bsoftlimit, this_bsize );
795 *bfree = tobytes( dqblk.dqb_bsoftlimit, this_bsize ) -
796 tobytes( dqblk.dqb_curblocks, this_bsize );
799 *btotal = tobytes( dqblk.dqb_bhardlimit, this_bsize );
800 *bfree = tobytes( dqblk.dqb_bhardlimit, this_bsize ) -
801 tobytes( dqblk.dqb_curblocks, this_bsize );
805 LOG(log_debug, logtype_afpd, "bfree : %u", *bfree );
806 LOG(log_debug, logtype_afpd, "btotal : %u", *btotal );
807 LOG(log_debug, logtype_afpd, "bfree : %uKB", *bfree/1024 );
808 LOG(log_debug, logtype_afpd, "btotal : %uKB", *btotal/1024 );
813 #endif /* HAVE_LIBQUOTA */