6 /* These are exactly the same definitions as in fs.h, but the names are
7 * changed so that this file can be included in both kernel and user files.
10 #define HOSTFS_ATTR_MODE 1
11 #define HOSTFS_ATTR_UID 2
12 #define HOSTFS_ATTR_GID 4
13 #define HOSTFS_ATTR_SIZE 8
14 #define HOSTFS_ATTR_ATIME 16
15 #define HOSTFS_ATTR_MTIME 32
16 #define HOSTFS_ATTR_CTIME 64
17 #define HOSTFS_ATTR_ATIME_SET 128
18 #define HOSTFS_ATTR_MTIME_SET 256
19 #define HOSTFS_ATTR_FORCE 512 /* Not a change, but a change it */
20 #define HOSTFS_ATTR_ATTR_FLAG 1024
23 unsigned int ia_valid
;
28 struct timespec ia_atime
;
29 struct timespec ia_mtime
;
30 struct timespec ia_ctime
;
31 unsigned int ia_attr_flags
;
34 extern int stat_file(const char *path
, unsigned long long *inode_out
,
35 int *mode_out
, int *nlink_out
, int *uid_out
, int *gid_out
,
36 unsigned long long *size_out
, struct timespec
*atime_out
,
37 struct timespec
*mtime_out
, struct timespec
*ctime_out
,
38 int *blksize_out
, unsigned long long *blocks_out
);
39 extern int access_file(char *path
, int r
, int w
, int x
);
40 extern int open_file(char *path
, int r
, int w
, int append
);
41 extern int file_type(const char *path
, int *maj
, int *min
);
42 extern void *open_dir(char *path
, int *err_out
);
43 extern char *read_dir(void *stream
, unsigned long long *pos
,
44 unsigned long long *ino_out
, int *len_out
);
45 extern void close_file(void *stream
);
46 extern void close_dir(void *stream
);
47 extern int read_file(int fd
, unsigned long long *offset
, char *buf
, int len
);
48 extern int write_file(int fd
, unsigned long long *offset
, const char *buf
,
50 extern int lseek_file(int fd
, long long offset
, int whence
);
51 extern int file_create(char *name
, int ur
, int uw
, int ux
, int gr
,
52 int gw
, int gx
, int or, int ow
, int ox
);
53 extern int set_attr(const char *file
, struct hostfs_iattr
*attrs
);
54 extern int make_symlink(const char *from
, const char *to
);
55 extern int unlink_file(const char *file
);
56 extern int do_mkdir(const char *file
, int mode
);
57 extern int do_rmdir(const char *file
);
58 extern int do_mknod(const char *file
, int mode
, int dev
);
59 extern int link_file(const char *from
, const char *to
);
60 extern int do_readlink(char *file
, char *buf
, int size
);
61 extern int rename_file(char *from
, char *to
);
62 extern int do_statfs(char *root
, long *bsize_out
, long long *blocks_out
,
63 long long *bfree_out
, long long *bavail_out
,
64 long long *files_out
, long long *ffree_out
,
65 void *fsid_out
, int fsid_size
, long *namelen_out
,
71 * Overrides for Emacs so that we follow Linus's tabbing style.
72 * Emacs will notice this stuff at the end of the file and automatically
73 * adjust the settings for this buffer only. This must remain at the end
75 * ---------------------------------------------------------------------------
77 * c-file-style: "linux"