/*
- * $Id: afs.c,v 1.16 2003-03-15 01:34:35 didg Exp $
+ * $Id: afs.c,v 1.18 2009-10-15 10:43:13 didg Exp $
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
+#include <sys/stat.h>
#include "globals.h"
#include "directory.h"
#include "volume.h"
#include "misc.h"
+#include "unix.h"
-afs_getvolspace( vol, bfree, btotal, bsize )
+int afs_getvolspace( vol, bfree, btotal, bsize )
struct vol *vol;
VolSpace *bfree, *btotal;
u_int32_t *bsize;
if ( vs->PartBlocksAvail > 0 ) {
if ( vs->MaxQuota != 0 ) {
+#ifdef min
+#undef min
+#endif
#define min(x,y) (((x)<(y))?(x):(y))
free = min( vs->MaxQuota - vs->BlocksInUse, vs->PartBlocksAvail );
} else {
return( AFP_OK );
}
-afp_getdiracl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int afp_getdiracl(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
{
struct ViceIoctl vi;
struct vol *vol;
#undef accessmode
#endif
-afsmode( path, ma, dir, st )
+void afsmode( path, ma, dir, st )
char *path;
struct maccess *ma;
struct dir *dir;
return;
}
- accessmode( path, &ma, dir, st );
+ accessmode( path, ma, dir, st );
return;
}
/*
* cmd | 0 | vid | did | pathtype | pathname | 0 | acl
*/
-afp_setdiracl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int afp_setdiracl(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
{
struct ViceIoctl vi;
struct vol *vol;
extern C_Block seskey;
extern Key_schedule seskeysched;
-afp_afschangepw(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int afp_afschangepw(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
{
char name[ MAXKTCNAMELEN ], instance[ MAXKTCNAMELEN ];
char realm[ MAXKTCREALMLEN ];