X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fafpd%2Ffork.h;h=7aaff0f5a26acbbae6f115caa4736da5571723d8;hb=b0bcb8f6b0571592a50ce039882c9319e012a270;hp=7d69337678304b57ee1c08ee3077d3a55585237c;hpb=008eac9cd4113c38090c803b1236335158fcc64c;p=netatalk.git diff --git a/etc/afpd/fork.h b/etc/afpd/fork.h index 7d693376..7aaff0f5 100644 --- a/etc/afpd/fork.h +++ b/etc/afpd/fork.h @@ -1,6 +1,4 @@ /* - * $Id: fork.h,v 1.15 2009-10-14 01:38:28 didg Exp $ - * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. */ @@ -9,47 +7,45 @@ #define AFPD_FORK_H 1 #include -#include +#include -#include #include #include "volume.h" #include "directory.h" struct file_key { - dev_t dev; - ino_t inode; + dev_t dev; + ino_t inode; }; struct ofork { struct file_key key; - struct adouble *of_ad; + struct adouble *of_ad; struct vol *of_vol; - struct dir *of_dir; - - u_int16_t of_refnum; + cnid_t of_did; + uint16_t of_refnum; int of_flags; - struct ofork **prevp, *next; - struct ofork *of_d_prev, *of_d_next; +// struct ofork *of_d_prev, *of_d_next; }; -#define OPENFORK_DATA (0) -#define OPENFORK_RSCS (1<<7) +#define OPENFORK_DATA (0) +#define OPENFORK_RSCS (1<<7) -#define OPENACC_RD (1<<0) -#define OPENACC_WR (1<<1) -#define OPENACC_DRD (1<<4) -#define OPENACC_DWR (1<<5) +#define OPENACC_RD (1<<0) +#define OPENACC_WR (1<<1) +#define OPENACC_DRD (1<<4) +#define OPENACC_DWR (1<<5) /* ofork.of_flags bits */ -#define AFPFORK_OPEN (1<<0) -#define AFPFORK_RSRC (1<<1) -#define AFPFORK_DATA (1<<2) +#define AFPFORK_OPEN (1<<0) +#define AFPFORK_RSRC (1<<1) +#define AFPFORK_DATA (1<<2) #define AFPFORK_DIRTY (1<<3) #define AFPFORK_ACCRD (1<<4) #define AFPFORK_ACCWR (1<<5) #define AFPFORK_ACCMASK (AFPFORK_ACCRD | AFPFORK_ACCWR) +#define AFPFORK_MODIFIED (1<<6) /* used in FCE for modified files */ #ifdef AFS extern struct ofork *writtenfork; @@ -69,29 +65,35 @@ extern int of_rename (const struct vol *, struct dir *, const char *, struct dir *, const char *); extern int of_flush (const struct vol *); -extern void of_pforkdesc (FILE *); extern int of_stat (struct path *); -extern int of_statdir (const struct vol *vol, struct path *); +extern int of_statdir (struct vol *vol, struct path *); extern int of_closefork (struct ofork *ofork); extern void of_closevol (const struct vol *vol); +extern void of_close_all_forks(void); extern struct adouble *of_ad (const struct vol *, struct path *, struct adouble *); + +#ifdef HAVE_ATFUNCS +extern struct ofork *of_findnameat(int dirfd, struct path *path); +extern int of_fstatat(int dirfd, struct path *path); +#endif /* HAVE_ATFUNCS */ + + /* in fork.c */ extern int flushfork (struct ofork *); -extern int getforkmode (struct adouble *, int , int ); /* FP functions */ -extern int afp_openfork (AFPObj *, char *, int, char *, int *); -extern int afp_bytelock (AFPObj *, char *, int, char *, int *); -extern int afp_getforkparams (AFPObj *, char *, int, char *, int *); -extern int afp_setforkparams (AFPObj *, char *, int, char *, int *); -extern int afp_read (AFPObj *, char *, int, char *, int *); -extern int afp_write (AFPObj *, char *, int, char *, int *); -extern int afp_flushfork (AFPObj *, char *, int, char *, int *); -extern int afp_flush (AFPObj *, char *, int, char *, int *); -extern int afp_closefork (AFPObj *, char *, int, char *, int *); +int afp_openfork (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_bytelock (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_getforkparams (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_setforkparams (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_read (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_write (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_flushfork (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_flush (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_closefork (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); -extern int afp_bytelock_ext (AFPObj *, char *, int, char *, int *); -extern int afp_read_ext (AFPObj *, char *, int, char *, int *); -extern int afp_write_ext (AFPObj *, char *, int, char *, int *); -extern int afp_syncfork (AFPObj *, char *, int, char *, int *); +int afp_bytelock_ext (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_read_ext (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_write_ext (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); +int afp_syncfork (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen); #endif