rev |
line source |
nuclear@0
|
1 #ifndef PVFS_H_
|
nuclear@0
|
2 #define PVFS_H_
|
nuclear@0
|
3
|
nuclear@0
|
4 #include <stdio.h>
|
nuclear@0
|
5 #include <stdlib.h>
|
nuclear@0
|
6 #include <errno.h>
|
nuclear@0
|
7
|
nuclear@0
|
8 typedef struct PVFS_FILE PVFS_FILE;
|
nuclear@0
|
9 typedef struct PVFS_DIR PVFS_DIR;
|
nuclear@0
|
10
|
nuclear@0
|
11 struct pvfs_dirent {
|
nuclear@0
|
12 char d_name[256];
|
nuclear@0
|
13 };
|
nuclear@0
|
14
|
nuclear@0
|
15 struct pvfs_stat {
|
nuclear@0
|
16 unsigned int st_mode;
|
nuclear@0
|
17 unsigned long st_size;
|
nuclear@0
|
18 };
|
nuclear@0
|
19
|
nuclear@0
|
20 extern int pvfs_errno;
|
nuclear@0
|
21
|
nuclear@0
|
22 #ifdef __cplusplus
|
nuclear@0
|
23 extern "C" {
|
nuclear@0
|
24 #endif
|
nuclear@0
|
25
|
nuclear@0
|
26 /* mount some target (which can be a directory or a pack filename) */
|
nuclear@0
|
27 int pvfs_mount(const char *mntpoint, const char *target);
|
nuclear@0
|
28 int pvfs_umount(const char *mntpoint);
|
nuclear@0
|
29
|
nuclear@0
|
30 int pvfs_chdir(const char *path);
|
nuclear@0
|
31 int pvfs_mkdir(const char *path, unsigned int mode); /* XXX mode is ignored */
|
nuclear@0
|
32
|
nuclear@0
|
33 PVFS_FILE *pvfs_fopen(const char *fname, const char *mode);
|
nuclear@0
|
34 int pvfs_fclose(PVFS_FILE *fp);
|
nuclear@0
|
35
|
nuclear@0
|
36 int pvfs_fseek(PVFS_FILE *fp, long offset, int whence);
|
nuclear@0
|
37 long pvfs_ftell(PVFS_FILE *fp);
|
nuclear@0
|
38 void pvfs_rewind(PVFS_FILE *fp);
|
nuclear@0
|
39
|
nuclear@0
|
40 size_t pvfs_fread(void *buf, size_t size, size_t nitems, PVFS_FILE *fp);
|
nuclear@1
|
41 size_t pvfs_fwrite(void *buf, size_t size, size_t nitems, PVFS_FILE *fp);
|
nuclear@0
|
42
|
nuclear@0
|
43 int pvfs_fgetc(PVFS_FILE *fp);
|
nuclear@0
|
44 int pvfs_fputc(int c, PVFS_FILE *fp);
|
nuclear@0
|
45
|
nuclear@0
|
46 char *pvfs_fgets(char *buf, int size, PVFS_FILE *fp);
|
nuclear@0
|
47 int pvfs_fputs(char *buf, PVFS_FILE *fp);
|
nuclear@0
|
48
|
nuclear@0
|
49 int pvfs_fscanf(PVFS_FILE *fp, const char *fmt, ...);
|
nuclear@0
|
50 int pvfs_vfscanf(PVFS_FILE *fp, const char *fmt, va_list ap);
|
nuclear@0
|
51 int pvfs_fprintf(PVFS_FILE *fp, const char *fmt, ...);
|
nuclear@0
|
52 int pvfs_vfprintf(PVFS_FILE *fp, const char *fmt, va_list ap);
|
nuclear@0
|
53
|
nuclear@0
|
54 void pvfs_clearerr(PVFS_FILE *fp);
|
nuclear@0
|
55 int pvfs_feof(PVFS_FILE *fp);
|
nuclear@0
|
56 int pvfs_ferror(PVFS_FILE *fp);
|
nuclear@0
|
57
|
nuclear@0
|
58 PVFS_DIR *pvfs_opendir(const char *dirname);
|
nuclear@0
|
59 int pvfs_closedir(PVFS_DIR *dir);
|
nuclear@0
|
60 struct pvfs_dirent *pvfs_readdir(PVFS_DIR *dir);
|
nuclear@0
|
61 void pvfs_rewinddir(PVFS_DIR *dir);
|
nuclear@0
|
62
|
nuclear@0
|
63 int pvfs_stat(const char *path, struct pvfs_stat *buf);
|
nuclear@0
|
64
|
nuclear@0
|
65 #ifdef __cplusplus
|
nuclear@0
|
66 }
|
nuclear@0
|
67 #endif
|
nuclear@0
|
68
|
nuclear@0
|
69 #endif /* PVFS_H_ */
|