Changeset 368ee04 in mainline for uspace/lib/c/include/vfs
- Timestamp:
- 2017-04-05T18:10:39Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 93ad8166
- Parents:
- 39f892a9 (diff), 2166728 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/c/include/vfs
- Files:
-
- 2 edited
- 1 moved
-
inbox.h (moved) (moved from uspace/lib/c/include/fcntl.h ) (2 diffs)
-
vfs.h (modified) (2 diffs)
-
vfs_mtab.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/vfs/inbox.h
r39f892a9 r368ee04 1 1 /* 2 * Copyright (c) 20 07 Jakub Jermar2 * Copyright (c) 2013 Jiri Zarevucky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libc 29 /** @addtogroup libc 30 30 * @{ 31 */ 32 /** @file 31 */ 32 33 /** 34 * @file 35 * @brief 33 36 */ 34 37 35 #ifndef LIBC_ FCNTL_H_36 #define LIBC_ FCNTL_H_38 #ifndef LIBC_VFS_INBOX_H_ 39 #define LIBC_VFS_INBOX_H_ 37 40 38 #define O_CREAT 1 39 #define O_EXCL 2 40 #define O_TRUNC 4 41 #define O_APPEND 8 42 #define O_RDONLY 16 43 #define O_RDWR 32 44 #define O_WRONLY 64 45 #define O_DESC 128 41 enum { 42 INBOX_MAX_ENTRIES = 256, 43 }; 46 44 47 extern int open(const char *, int, ...); 45 extern int inbox_set(const char *name, int file); 46 extern int inbox_get(const char *name); 47 48 extern int inbox_list(const char **names, int capacity); 48 49 49 50 #endif 50 51 51 /** @} 52 /** 53 * @} 52 54 */ -
uspace/lib/c/include/vfs/vfs.h
r39f892a9 r368ee04 42 42 #include <stdio.h> 43 43 #include <async.h> 44 #include "vfs_mtab.h"45 44 45 #define MAX_OPEN_FILES 128 46 46 47 47 enum vfs_change_state_type { … … 49 49 }; 50 50 51 typedef enum { 52 KIND_FILE, 53 KIND_DIRECTORY, 54 } vfs_file_kind_t; 51 55 52 extern char *vfs_absolutize(const char *, size_t *);53 56 54 extern int vfs_mount(const char *, const char *, const char *, const char *, 55 unsigned int, unsigned int); 56 extern int vfs_unmount(const char *); 57 struct stat { 58 fs_handle_t fs_handle; 59 service_id_t service_id; 60 fs_index_t index; 61 unsigned int lnkcnt; 62 bool is_file; 63 bool is_directory; 64 aoff64_t size; 65 service_id_t service; 66 }; 67 68 struct statfs { 69 char fs_name[FS_NAME_MAXLEN + 1]; 70 uint32_t f_bsize; /* fundamental file system block size */ 71 uint64_t f_blocks; /* total data blocks in file system */ 72 uint64_t f_bfree; /* free blocks in fs */ 73 }; 57 74 58 75 extern int vfs_fhandle(FILE *, int *); 59 76 60 extern int vfs_fd_wait(void); 61 extern int vfs_get_mtab_list(list_t *mtab_list); 62 77 extern char *vfs_absolutize(const char *, size_t *); 78 extern int vfs_clone(int, int, bool); 79 extern int vfs_cwd_get(char *path, size_t); 80 extern int vfs_cwd_set(const char *path); 63 81 extern async_exch_t *vfs_exchange_begin(void); 64 82 extern void vfs_exchange_end(async_exch_t *); 83 extern int vfs_link(int, const char *, vfs_file_kind_t, int *); 84 extern int vfs_link_path(const char *, vfs_file_kind_t, int *); 85 extern int vfs_lookup(const char *, int); 86 extern int vfs_lookup_open(const char *, int, int); 87 extern int vfs_mount_path(const char *, const char *, const char *, 88 const char *, unsigned int, unsigned int); 89 extern int vfs_mount(int, const char *, service_id_t, const char *, unsigned, 90 unsigned, int *); 91 extern int vfs_open(int, int); 92 extern int vfs_pass_handle(async_exch_t *, int, async_exch_t *); 93 extern int vfs_put(int); 94 extern ssize_t vfs_read(int, aoff64_t *, void *, size_t); 95 extern int vfs_read_short(int, aoff64_t, void *, size_t, ssize_t *); 96 extern int vfs_receive_handle(bool); 97 extern int vfs_rename_path(const char *, const char *); 98 extern int vfs_resize(int, aoff64_t); 99 extern int vfs_root(void); 100 extern void vfs_root_set(int); 101 extern int vfs_stat(int, struct stat *); 102 extern int vfs_stat_path(const char *, struct stat *); 103 extern int vfs_statfs(int, struct statfs *); 104 extern int vfs_statfs_path(const char *, struct statfs *); 105 extern int vfs_sync(int); 106 extern int vfs_unlink(int, const char *, int); 107 extern int vfs_unlink_path(const char *); 108 extern int vfs_unmount(int); 109 extern int vfs_unmount_path(const char *); 110 extern int vfs_walk(int, const char *, int); 111 extern ssize_t vfs_write(int, aoff64_t *, const void *, size_t); 112 extern int vfs_write_short(int, aoff64_t, const void *, size_t, ssize_t *); 65 113 66 114 #endif -
uspace/lib/c/include/vfs/vfs_mtab.h
r39f892a9 r368ee04 43 43 link_t link; 44 44 char mp[MAX_PATH_LEN]; 45 char opts[MAX_MNTOPTS_LEN];46 45 char fs_name[FS_NAME_MAXLEN]; 47 unsigned int instance;48 46 service_id_t service_id; 49 47 } mtab_ent_t; 48 49 extern int vfs_get_mtab_list(list_t *); 50 50 51 51 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
