Changes in uspace/lib/c/generic/vfs/mtab.c [39330200:8d2dd7f2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vfs/mtab.c
r39330200 r8d2dd7f2 40 40 #include <errno.h> 41 41 #include <assert.h> 42 #include <str.h>43 42 44 static void process_mp(const char *path, vfs_stat_t *stat, list_t *mtab_list)43 static void process_mp(const char *path, struct stat *stat, list_t *mtab_list) 45 44 { 46 45 mtab_ent_t *ent; … … 54 53 ent->service_id = stat->service_id; 55 54 56 vfs_statfs_tstfs;55 struct statfs stfs; 57 56 if (vfs_statfs_path(path, &stfs) == EOK) 58 57 str_cpy(ent->fs_name, sizeof(ent->fs_name), stfs.fs_name); … … 63 62 } 64 63 65 static errno_t vfs_get_mtab_visit(const char *path, list_t *mtab_list,64 static int vfs_get_mtab_visit(const char *path, list_t *mtab_list, 66 65 fs_handle_t fs_handle, service_id_t service_id) 67 66 { … … 75 74 while ((dirent = readdir(dir)) != NULL) { 76 75 char *child; 77 vfs_stat_t st; 78 errno_t rc; 79 int ret; 76 struct stat st; 77 int rc; 80 78 81 r et= asprintf(&child, "%s/%s", path, dirent->d_name);82 if (r et< 0) {79 rc = asprintf(&child, "%s/%s", path, dirent->d_name); 80 if (rc < 0) { 83 81 closedir(dir); 84 return ENOMEM;82 return rc; 85 83 } 86 84 … … 96 94 97 95 rc = vfs_stat_path(child, &st); 98 if (rc != EOK) {96 if (rc != 0) { 99 97 free(child); 100 98 closedir(dir); … … 121 119 } 122 120 123 errno_t vfs_get_mtab_list(list_t *mtab_list)121 int vfs_get_mtab_list(list_t *mtab_list) 124 122 { 125 vfs_stat_t st;123 struct stat st; 126 124 127 errno_t rc = vfs_stat_path("/", &st);128 if (rc != EOK)125 int rc = vfs_stat_path("/", &st); 126 if (rc != 0) 129 127 return rc; 130 128
Note:
See TracChangeset
for help on using the changeset viewer.