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