/*
- * $Id: volume.c,v 1.91 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: volume.c,v 1.92 2009-10-13 22:55:37 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include "unix.h"
#include "mangle.h"
#include "fork.h"
+#include "hash.h"
+#include "afp_vfs.h"
extern int afprun(int root, char *cmd, int *outfd);
}
/* ---------------- */
-static char *myfgets( buf, size, fp )
-char *buf;
-int size;
-FILE *fp;
+static char *myfgets( char *buf, int size, FILE *fp)
{
char *p;
int c;
#endif
-static int accessvol(args, name)
-const char *args;
-const char *name;
+static int accessvol(const char *args, const char *name)
{
char buf[MAXPATHLEN + 1], *p;
struct group *gr;
return 0;
}
-static int hostaccessvol(type, volname, args, obj)
-int type;
-char *volname;
-const char *args;
-const AFPObj *obj;
+static int hostaccessvol(int type, char *volname, const char *args, const AFPObj *obj)
{
char buf[MAXPATHLEN + 1], *p, *b;
DSI *dsi = obj->handle;
return 0;
}
-static void setextmap( ext, type, creator, user)
-char *ext, *type, *creator;
-int user;
+static void setextmap(char *ext, char *type, char *creator, int user)
{
struct extmap *em;
int cnt;
* [codepage:<file>] [casefold:<num>]
* <extension> TYPE [CREATOR]
*/
-static int readvolfile(obj, p1, p2, user, pwent)
-AFPObj *obj;
-struct afp_volume_name *p1;
-char *p2;
-int user;
-struct passwd *pwent;
+static int readvolfile(AFPObj *obj, struct afp_volume_name *p1, char *p2, int user, struct passwd *pwent)
{
FILE *fp;
char path[ MAXPATHLEN + 1], tmp[ MAXPATHLEN + 1],
}
}
-static int getvolspace( vol, bfree, btotal, xbfree, xbtotal, bsize )
-struct vol *vol;
-u_int32_t *bfree, *btotal, *bsize;
-VolSpace *xbfree, *xbtotal;
+static int getvolspace(struct vol *vol,
+ u_int32_t *bfree, u_int32_t *btotal,
+ VolSpace *xbfree, VolSpace *xbtotal, u_int32_t *bsize)
{
int spaceflag, rc;
u_int32_t maxsize;
}
/* ----------------------- */
-static int getvolparams( bitmap, vol, st, buf, buflen )
-u_int16_t bitmap;
-struct vol *vol;
-struct stat *st;
-char *buf;
-int *buflen;
+static int getvolparams( u_int16_t bitmap, struct vol *vol, struct stat *st, char *buf, int *buflen)
{
struct adouble ad;
int bit = 0, isad = 1;
}
/* ------------------------------- */
-int afp_getsrvrparms(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf _U_, *rbuf;
-int ibuflen _U_, *rbuflen;
+int afp_getsrvrparms(AFPObj *obj, char *ibuf _U_, int ibuflen _U_, char *rbuf, int *rbuflen)
{
struct timeval tv;
struct stat st;
/* -------------------------
* we are the user here
*/
-int afp_openvol(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen _U_, *rbuflen;
+int afp_openvol(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
{
struct stat st;
char *volname;
}
/* ------------------------- */
-int afp_closevol(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj _U_;
-char *ibuf, *rbuf _U_;
-int ibuflen _U_, *rbuflen;
+int afp_closevol(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
{
struct vol *vol;
u_int16_t vid;
/* --------------------------
poll if a volume is changed by other processes.
*/
-int pollvoltime(obj)
-AFPObj *obj;
+int pollvoltime(AFPObj *obj)
{
struct vol *vol;
struct timeval tv;
}
/* ------------------------- */
-void setvoltime(obj, vol )
-AFPObj *obj;
-struct vol *vol;
+void setvoltime(AFPObj *obj, struct vol *vol)
{
struct timeval tv;
}
/* ------------------------- */
-int afp_getvolparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj _U_;
-char *ibuf, *rbuf;
-int ibuflen _U_, *rbuflen;
+int afp_getvolparams(AFPObj *obj _U_, char *ibuf, int ibuflen _U_,char *rbuf, int *rbuflen)
{
struct vol *vol;
u_int16_t vid, bitmap;
}
/* ------------------------- */
-int afp_setvolparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj _U_;
-char *ibuf, *rbuf _U_;
-int ibuflen _U_, *rbuflen;
+int afp_setvolparams(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
{
struct adouble ad;
struct vol *vol;