Changeset 00aece0 in mainline for uspace/lib/c/generic/vfs/vfs.c
- Timestamp:
- 2012-02-18T16:47:38Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4449c6c
- Parents:
- bd5f3b7 (diff), f943dd3 (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. - File:
-
- 1 edited
-
uspace/lib/c/generic/vfs/vfs.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vfs/vfs.c
rbd5f3b7 r00aece0 143 143 144 144 int mount(const char *fs_name, const char *mp, const char *fqsn, 145 const char *opts, unsigned int flags )145 const char *opts, unsigned int flags, unsigned int instance) 146 146 { 147 147 int null_id = -1; … … 181 181 182 182 sysarg_t rc_orig; 183 aid_t req = async_send_2(exch, VFS_IN_MOUNT, service_id, flags, NULL); 183 aid_t req = async_send_3(exch, VFS_IN_MOUNT, service_id, flags, 184 instance, NULL); 184 185 sysarg_t rc = async_data_write_start(exch, (void *) mpa, mpa_size); 185 186 if (rc != EOK) { … … 654 655 async_exch_t *exch = vfs_exchange_begin(); 655 656 656 req = async_send_ 0(exch, VFS_IN_UNLINK, NULL);657 req = async_send_1(exch, VFS_IN_UNLINK, lflag, NULL); 657 658 rc = async_data_write_start(exch, pa, pa_size); 658 659 if (rc != EOK) { … … 830 831 } 831 832 833 int get_mtab_list(list_t *mtab_list) 834 { 835 sysarg_t rc; 836 aid_t req; 837 size_t i; 838 sysarg_t num_mounted_fs; 839 840 async_exch_t *exch = vfs_exchange_begin(); 841 842 req = async_send_0(exch, VFS_IN_MTAB_GET, NULL); 843 844 /* Ask VFS how many filesystems are mounted */ 845 rc = async_req_0_1(exch, VFS_IN_PING, &num_mounted_fs); 846 if (rc != EOK) 847 goto exit; 848 849 for (i = 0; i < num_mounted_fs; ++i) { 850 mtab_ent_t *mtab_ent; 851 852 mtab_ent = malloc(sizeof(mtab_ent_t)); 853 if (!mtab_ent) { 854 rc = ENOMEM; 855 goto exit; 856 } 857 858 memset(mtab_ent, 0, sizeof(mtab_ent_t)); 859 860 rc = async_data_read_start(exch, (void *) mtab_ent->mp, 861 MAX_PATH_LEN); 862 if (rc != EOK) 863 goto exit; 864 865 rc = async_data_read_start(exch, (void *) mtab_ent->opts, 866 MAX_MNTOPTS_LEN); 867 if (rc != EOK) 868 goto exit; 869 870 rc = async_data_read_start(exch, (void *) mtab_ent->fs_name, 871 FS_NAME_MAXLEN); 872 if (rc != EOK) 873 goto exit; 874 875 sysarg_t p[2]; 876 877 rc = async_req_0_2(exch, VFS_IN_PING, &p[0], &p[1]); 878 if (rc != EOK) 879 goto exit; 880 881 mtab_ent->instance = p[0]; 882 mtab_ent->service_id = p[1]; 883 884 link_initialize(&mtab_ent->link); 885 list_append(&mtab_ent->link, mtab_list); 886 } 887 888 exit: 889 async_wait_for(req, &rc); 890 vfs_exchange_end(exch); 891 return rc; 892 } 893 832 894 /** @} 833 895 */
Note:
See TracChangeset
for help on using the changeset viewer.
