34#define OPENFORK_DATA (0)
35#define OPENFORK_RSCS (1<<7)
37#define OPENACC_RD (1<<0)
38#define OPENACC_WR (1<<1)
39#define OPENACC_DRD (1<<4)
40#define OPENACC_DWR (1<<5)
43#define AFPFORK_DATA (1<<0)
44#define AFPFORK_RSRC (1<<1)
45#define AFPFORK_META (1<<2)
46#define AFPFORK_DIRTY (1<<3)
47#define AFPFORK_ACCRD (1<<4)
48#define AFPFORK_ACCWR (1<<5)
49#define AFPFORK_ACCMASK (AFPFORK_ACCRD | AFPFORK_ACCWR)
50#define AFPFORK_MODIFIED (1<<6)
51#define AFPFORK_ERROR (1<<7)
52#define AFPFORK_VIRTUAL (1<<8)
54#define of_name(a) (a)->of_ad->ad_name
60 return offset >= 0 && length >= 0 && size >= 0
61 && offset <= size && length <= size - offset;
66 char *, uint16_t *,
const int,
74 struct dir *,
const char *,
75 struct dir *,
const char *);
96 int df_get, off_t df_off, off_t df_len,
97 int rf_get, off_t rf_off, off_t rf_len,
98 uint16_t band_request,
int try_root,
99 int *df_locked,
int *rf_locked, uint16_t *band_held);
Part of Netatalk's AppleDouble implementatation.
uint32_t cnid_t
Definition adouble.h:157
int afp_closefork(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:1815
int flushfork(struct ofork *ofork)
Definition fork.c:1769
int afp_bytelock(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:1172
int afp_setforkparams(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:879
int afp_flush(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:1687
int afp_flushfork(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:1704
int afp_getforkparams(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:2178
int afp_write_ext(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:2171
int afp_syncfork(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:1738
int afp_read(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:1673
int afp_write(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:2162
int afp_bytelock_ext(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:1179
int fork_setmode_deny(int access, int f_rddny, int f_wrdny, int f_nodny)
Definition fork.c:308
int afp_openfork(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:444
int afp_read_ext(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition fork.c:1680
int of_delete_blocked(const struct ofork *of, uint16_t *band, int *content)
Does this child hold a delete-blocking claim on the fork's file?
Definition ofork.c:513
int of_stat(const struct vol *vol, struct path *)
Definition ofork.c:350
int of_flush(const struct vol *)
Definition ofork.c:141
void of_dealloc(struct ofork *)
Definition ofork.c:894
struct ofork * of_findname(const struct vol *vol, struct path *)
Definition ofork.c:431
struct ofork * of_find(const uint16_t)
Definition ofork.c:326
int of_statdir(struct vol *vol, struct path *)
stat the current directory.
Definition ofork.c:383
struct ofork * of_findnameat(int dirfd, struct path *path)
Search for open fork by dirfd/name.
Definition ofork.c:465
static int fork_range_within(off_t offset, off_t length, off_t size)
Definition fork.h:58
void of_pforkdesc(FILE *)
Definition ofork.c:126
void of_closevol(const AFPObj *obj, const struct vol *vol)
Definition ofork.c:1232
struct ofork * of_alloc(struct vol *, struct dir *, char *, uint16_t *, const int, struct adouble *, struct stat *)
Definition ofork.c:200
struct adouble * of_ad(const struct vol *, struct path *, struct adouble *)
Definition ofork.c:1213
int of_rename(const struct vol *, struct ofork *, struct dir *, const char *, struct dir *, const char *)
Definition ofork.c:159
void of_close_inode_forks(const AFPObj *obj, const struct vol *vol, struct path *path)
Close every fork this child holds on path's inode.
Definition ofork.c:570
of_locks_status
Definition fork.h:93
@ OF_LOCKS_OK
Definition fork.h:93
@ OF_LOCKS_NOENT
Definition fork.h:93
@ OF_LOCKS_ERROR
Definition fork.h:93
int of_fstatat(int dirfd, struct path *path)
Definition ofork.c:365
int of_get_locks(const struct vol *vol, int dirfd, struct path *path, int df_get, off_t df_off, off_t df_len, int rf_get, off_t rf_off, off_t rf_len, uint16_t band_request, int try_root, int *df_locked, int *rf_locked, uint16_t *band_held)
Conflict GET (F_GETLK only): read another holder's locks on a file.
Definition ofork.c:650
int of_closefork(const AFPObj *obj, struct ofork *ofork)
Definition ofork.c:942
void of_log_highwater(void)
Definition ofork.c:931
void of_close_all_forks(const AFPObj *obj)
Definition ofork.c:1254
Definition include/atalk/directory.h:72
dev_t dev
Definition fork.h:18
ino_t inode
Definition fork.h:19
struct file_key key
Definition fork.h:23
cnid_t of_did
Definition fork.h:26
struct vol * of_vol
Definition fork.h:25
int of_flags
Definition fork.h:28
const unsigned char * of_virtual_data
Definition fork.h:29
struct ofork ** prevp
Definition fork.h:31
struct ofork * next
Definition fork.h:31
uint16_t of_refnum
Definition fork.h:27
struct adouble * of_ad
Definition fork.h:24
off_t of_virtual_len
Definition fork.h:30
Definition include/atalk/directory.h:140
Definition include/atalk/volume.h:33