]> arthur.barton.de Git - netatalk.git/blob - include/atalk/unix.h
24c1f7c5686e8d4063e655412d7e86f653b6e476
[netatalk.git] / include / atalk / unix.h
1 /*
2    Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
3
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 2 of the License, or
7    (at your option) any later version.
8  
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13 */
14
15 #ifndef ATALK_UNIX_H
16 #define ATALK_UNIX_H
17
18 #ifdef HAVE_CONFIG_H
19 #include <config.h>
20 #endif
21
22 #include <sys/types.h>
23 #include <dirent.h>
24
25 #define NETATALK_DIOSZ_STACK 65536
26 #define NETATALK_DIOSZ_HEAP  (1024*1024)
27
28 /* vfs/unix.c */
29 extern int netatalk_unlink(const char *name);
30 extern int netatalk_unlinkat(int dirfd, const char *name);
31 extern int statat(int dirfd, const char *path, struct stat *st);
32 extern int lstatat(int dirfd, const char *path, struct stat *st);
33 extern DIR *opendirat(int dirfd, const char *path);
34
35 /* rmdir ENOENT not an error */
36 extern int netatalk_rmdir(int dirfd, const char *name);
37 extern int netatalk_rmdir_all_errors(int dirfd, const char *name);
38
39 extern int setfilmode(const char *, mode_t, struct stat *, mode_t);
40 extern int dir_rx_set(mode_t mode);
41 extern int unix_rename(int sfd, const char *oldpath, int dfd, const char *newpath);
42 extern int copy_file(int sfd, const char *src, const char *dst, mode_t mode);
43 extern int copy_file_fd(int sfd, int dfd);
44 extern int copy_ea(const char *ea, int sfd, const char *src, const char *dst, mode_t mode);
45
46 extern void become_root(void);
47 extern void unbecome_root(void);
48 extern int gmem(gid_t gid, int ngroups, gid_t *groups);
49
50 #endif  /* ATALK_UNIX_H */