Changeset 01900b6 in mainline
- Timestamp:
- 2020-01-21T15:10:26Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 51da086
- Parents:
- f8fb03b
- Location:
- uspace
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskdump/taskdump.c
rf8fb03b r01900b6 126 126 static errno_t connect_task(task_id_t task_id) 127 127 { 128 async_sess_t *ksess = async_connect_kbox(task_id); 128 errno_t rc; 129 async_sess_t *ksess = async_connect_kbox(task_id, &rc); 129 130 130 131 if (!ksess) { 131 if ( errno== ENOTSUP) {132 if (rc == ENOTSUP) { 132 133 printf("You do not have userspace debugging support " 133 134 "compiled in the kernel.\n"); 134 135 printf("Compile kernel with 'Support for userspace debuggers' " 135 136 "(CONFIG_UDEBUG) enabled.\n"); 136 return errno;137 return rc; 137 138 } 138 139 139 140 printf("Error connecting\n"); 140 141 printf("async_connect_kbox(%" PRIu64 ") -> %s", task_id, str_error_name(errno)); 141 return errno;142 } 143 144 errno_trc = udebug_begin(ksess);142 return rc; 143 } 144 145 rc = udebug_begin(ksess); 145 146 if (rc != EOK) { 146 147 printf("udebug_begin() -> %s\n", str_error_name(rc)); -
uspace/app/tester/mm/pager1.c
rf8fb03b r01900b6 65 65 TPRINTF("Connecting to VFS pager...\n"); 66 66 67 vfs_pager_sess = service_connect_blocking(SERVICE_VFS, INTERFACE_PAGER, 0); 67 vfs_pager_sess = service_connect_blocking(SERVICE_VFS, INTERFACE_PAGER, 68 0, NULL); 68 69 69 70 if (!vfs_pager_sess) { -
uspace/app/trace/trace.c
rf8fb03b r01900b6 139 139 140 140 if (sess == NULL) { 141 sess = async_connect_kbox(task_id );141 sess = async_connect_kbox(task_id, &rc); 142 142 if (sess == NULL) { 143 143 printf("Error connecting to task %" PRIu64 ".\n", 144 144 task_id); 145 rc = EIO;146 145 goto error; 147 146 } -
uspace/lib/c/generic/async/client.c
rf8fb03b r01900b6 889 889 * @param arg2 User defined argument. 890 890 * @param arg3 User defined argument. 891 * @param rc Placeholder for return code. Unused if NULL. 891 892 * 892 893 * @return New session on success or NULL on error. … … 894 895 */ 895 896 async_sess_t *async_connect_me_to(async_exch_t *exch, iface_t iface, 896 sysarg_t arg2, sysarg_t arg3 )897 sysarg_t arg2, sysarg_t arg3, errno_t *rc) 897 898 { 898 899 if (exch == NULL) { 899 errno = ENOENT; 900 if (rc != NULL) 901 *rc = ENOENT; 902 900 903 return NULL; 901 904 } … … 903 906 async_sess_t *sess = calloc(1, sizeof(async_sess_t)); 904 907 if (sess == NULL) { 905 errno = ENOMEM; 908 if (rc != NULL) 909 *rc = ENOMEM; 910 906 911 return NULL; 907 912 } 908 913 909 914 cap_phone_handle_t phone; 910 errno_t r c= async_connect_me_to_internal(exch->phone, iface, arg2,915 errno_t ret = async_connect_me_to_internal(exch->phone, iface, arg2, 911 916 arg3, 0, &phone); 912 if (rc != EOK) { 913 errno = rc; 917 if (ret != EOK) { 918 if (rc != NULL) 919 *rc = ret; 920 914 921 free(sess); 915 922 return NULL; … … 957 964 * @param arg2 User defined argument. 958 965 * @param arg3 User defined argument. 966 * @param rc Placeholder for return code. Unused if NULL. 959 967 * 960 968 * @return New session on success or NULL on error. … … 962 970 */ 963 971 async_sess_t *async_connect_me_to_blocking(async_exch_t *exch, iface_t iface, 964 sysarg_t arg2, sysarg_t arg3 )972 sysarg_t arg2, sysarg_t arg3, errno_t *rc) 965 973 { 966 974 if (exch == NULL) { 967 errno = ENOENT; 975 if (rc != NULL) 976 *rc = ENOENT; 977 968 978 return NULL; 969 979 } … … 971 981 async_sess_t *sess = calloc(1, sizeof(async_sess_t)); 972 982 if (sess == NULL) { 973 errno = ENOMEM; 983 if (rc != NULL) 984 *rc = ENOMEM; 985 974 986 return NULL; 975 987 } 976 988 977 989 cap_phone_handle_t phone; 978 errno_t r c= async_connect_me_to_internal(exch->phone, iface, arg2,990 errno_t ret = async_connect_me_to_internal(exch->phone, iface, arg2, 979 991 arg3, IPC_FLAG_BLOCKING, &phone); 980 if (rc != EOK) { 981 errno = rc; 992 if (ret != EOK) { 993 if (rc != NULL) 994 *rc = ret; 995 982 996 free(sess); 983 997 return NULL; … … 999 1013 /** Connect to a task specified by id. 1000 1014 * 1001 */ 1002 async_sess_t *async_connect_kbox(task_id_t id) 1015 * @param id Task to which to connect. 1016 * @param rc Placeholder for return code. Unused if NULL. 1017 * 1018 * @return New session on success or NULL on error. 1019 * 1020 */ 1021 async_sess_t *async_connect_kbox(task_id_t id, errno_t *rc) 1003 1022 { 1004 1023 async_sess_t *sess = calloc(1, sizeof(async_sess_t)); 1005 1024 if (sess == NULL) { 1006 errno = ENOMEM; 1025 if (rc != NULL) 1026 *rc = ENOMEM; 1027 1007 1028 return NULL; 1008 1029 } 1009 1030 1010 1031 cap_phone_handle_t phone; 1011 errno_t rc = ipc_connect_kbox(id, &phone); 1012 if (rc != EOK) { 1013 errno = rc; 1032 errno_t ret = ipc_connect_kbox(id, &phone); 1033 if (ret != EOK) { 1034 if (rc != NULL) 1035 *rc = ret; 1036 1014 1037 free(sess); 1015 1038 return NULL; -
uspace/lib/c/generic/devman.c
rf8fb03b r01900b6 89 89 devman_driver_block_sess = 90 90 service_connect_blocking(SERVICE_DEVMAN, 91 INTERFACE_DDF_DRIVER, 0 );91 INTERFACE_DDF_DRIVER, 0, NULL); 92 92 } 93 93 … … 108 108 devman_client_block_sess = 109 109 service_connect_blocking(SERVICE_DEVMAN, 110 INTERFACE_DDF_CLIENT, 0 );110 INTERFACE_DDF_CLIENT, 0, NULL); 111 111 } 112 112 … … 138 138 devman_driver_sess = 139 139 service_connect(SERVICE_DEVMAN, 140 INTERFACE_DDF_DRIVER, 0 );140 INTERFACE_DDF_DRIVER, 0, NULL); 141 141 142 142 fibril_mutex_unlock(&devman_driver_mutex); … … 152 152 devman_client_sess = 153 153 service_connect(SERVICE_DEVMAN, 154 INTERFACE_DDF_CLIENT, 0 );154 INTERFACE_DDF_CLIENT, 0, NULL); 155 155 156 156 fibril_mutex_unlock(&devman_client_mutex); … … 292 292 if (flags & IPC_FLAG_BLOCKING) 293 293 sess = service_connect_blocking(SERVICE_DEVMAN, 294 INTERFACE_DEVMAN_DEVICE, handle );294 INTERFACE_DEVMAN_DEVICE, handle, NULL); 295 295 else 296 296 sess = service_connect(SERVICE_DEVMAN, 297 INTERFACE_DEVMAN_DEVICE, handle );297 INTERFACE_DEVMAN_DEVICE, handle, NULL); 298 298 299 299 return sess; … … 350 350 if (flags & IPC_FLAG_BLOCKING) 351 351 sess = service_connect_blocking(SERVICE_DEVMAN, 352 INTERFACE_DEVMAN_PARENT, handle );352 INTERFACE_DEVMAN_PARENT, handle, NULL); 353 353 else 354 sess = service_connect _blocking(SERVICE_DEVMAN,355 INTERFACE_DEVMAN_PARENT, handle );354 sess = service_connect(SERVICE_DEVMAN, 355 INTERFACE_DEVMAN_PARENT, handle, NULL); 356 356 357 357 return sess; -
uspace/lib/c/generic/io/log.c
rf8fb03b r01900b6 167 167 return ENOMEM; 168 168 169 errno_t rc; 169 170 logger_session = service_connect_blocking(SERVICE_LOGGER, 170 INTERFACE_LOGGER_WRITER, 0); 171 if (logger_session == NULL) { 172 return ENOMEM; 173 } 171 INTERFACE_LOGGER_WRITER, 0, &rc); 172 if (logger_session == NULL) 173 return rc; 174 174 175 175 default_log_id = log_create(prog_name, LOG_NO_PARENT); -
uspace/lib/c/generic/io/logctl.c
rf8fb03b r01900b6 48 48 49 49 if (logger_session == NULL) { 50 errno_t rc; 50 51 logger_session = service_connect_blocking(SERVICE_LOGGER, 51 INTERFACE_LOGGER_CONTROL, 0 );52 INTERFACE_LOGGER_CONTROL, 0, &rc); 52 53 if (logger_session == NULL) 53 return ENOMEM;54 return rc; 54 55 } 55 56 -
uspace/lib/c/generic/loader.c
rf8fb03b r01900b6 46 46 #include "private/loader.h" 47 47 48 /** Connect to a new program loader. 49 * 50 * Spawns a new program loader task and returns the connection structure. 48 /** Spawn a new program loader. 49 * 50 * Spawn a new program loader task. The loader then independetly 51 * connects to the naming service. 51 52 * 52 53 * @param name Symbolic name to set on the newly created task. 53 54 * 54 55 * @return Error code. 56 * 55 57 */ 56 58 errno_t loader_spawn(const char *name) … … 60 62 } 61 63 62 loader_t *loader_connect(void) 64 /** Connect to a program loader. 65 * 66 * @param rc Placeholder for return code. Unused if NULL. 67 * 68 * @return Loader structure. 69 * 70 */ 71 loader_t *loader_connect(errno_t *rc) 63 72 { 64 73 loader_t *ldr = malloc(sizeof(loader_t)); … … 67 76 68 77 async_sess_t *sess = 69 service_connect_blocking(SERVICE_LOADER, INTERFACE_LOADER, 0 );78 service_connect_blocking(SERVICE_LOADER, INTERFACE_LOADER, 0, rc); 70 79 if (sess == NULL) { 71 80 free(ldr); -
uspace/lib/c/generic/loc.c
rf8fb03b r01900b6 153 153 loc_supp_block_sess = 154 154 service_connect_blocking(SERVICE_LOC, 155 INTERFACE_LOC_SUPPLIER, 0 );155 INTERFACE_LOC_SUPPLIER, 0, NULL); 156 156 } 157 157 … … 172 172 loc_cons_block_sess = 173 173 service_connect_blocking(SERVICE_LOC, 174 INTERFACE_LOC_CONSUMER, 0 );174 INTERFACE_LOC_CONSUMER, 0, NULL); 175 175 } 176 176 … … 202 202 loc_supplier_sess = 203 203 service_connect(SERVICE_LOC, 204 INTERFACE_LOC_SUPPLIER, 0 );204 INTERFACE_LOC_SUPPLIER, 0, NULL); 205 205 206 206 fibril_mutex_unlock(&loc_supplier_mutex); … … 216 216 loc_consumer_sess = 217 217 service_connect(SERVICE_LOC, 218 INTERFACE_LOC_CONSUMER, 0 );218 INTERFACE_LOC_CONSUMER, 0, NULL); 219 219 220 220 fibril_mutex_unlock(&loc_consumer_mutex); … … 567 567 568 568 if (flags & IPC_FLAG_BLOCKING) 569 sess = service_connect_blocking(SERVICE_LOC, iface, handle );569 sess = service_connect_blocking(SERVICE_LOC, iface, handle, NULL); 570 570 else 571 sess = service_connect(SERVICE_LOC, iface, handle );571 sess = service_connect(SERVICE_LOC, iface, handle, NULL); 572 572 573 573 return sess; -
uspace/lib/c/generic/ns.c
rf8fb03b r01900b6 49 49 async_port_handler_t handler, void *data) 50 50 { 51 async_sess_t *sess = ns_session_get(); 52 if (sess == NULL) 53 return EIO; 51 errno_t rc; 52 async_sess_t *sess = ns_session_get(&rc); 53 if (sess == NULL) 54 return rc; 54 55 55 56 port_id_t port; 56 errno_trc = async_create_port(iface, handler, data, &port);57 rc = async_create_port(iface, handler, data, &port); 57 58 if (rc != EOK) 58 59 return rc; … … 81 82 async_set_fallback_port_handler(handler, data); 82 83 83 async_sess_t *sess = ns_session_get(); 84 if (sess == NULL) 85 return EIO; 84 errno_t rc; 85 async_sess_t *sess = ns_session_get(&rc); 86 if (sess == NULL) 87 return rc; 86 88 87 89 async_exch_t *exch = async_exchange_begin(sess); … … 89 91 ipc_call_t answer; 90 92 aid_t req = async_send_1(exch, NS_REGISTER_BROKER, service, &answer); 91 errno_trc = async_connect_to_me(exch, INTERFACE_ANY, service, 0);93 rc = async_connect_to_me(exch, INTERFACE_ANY, service, 0); 92 94 93 95 async_exchange_end(exch); … … 103 105 } 104 106 105 async_sess_t *service_connect(service_t service, iface_t iface, sysarg_t arg3) 106 { 107 async_sess_t *sess = ns_session_get(); 107 /** Connect to a singleton service. 108 * 109 * @param service Singleton service ID. 110 * @param iface Interface to connect to. 111 * @param arg3 Custom connection argument. 112 * @param rc Placeholder for return code. Unused if NULL. 113 * 114 * @return New session on success or NULL on error. 115 * 116 */ 117 async_sess_t *service_connect(service_t service, iface_t iface, sysarg_t arg3, 118 errno_t *rc) 119 { 120 async_sess_t *sess = ns_session_get(rc); 108 121 if (sess == NULL) 109 122 return NULL; … … 114 127 115 128 async_sess_t *csess = 116 async_connect_me_to(exch, iface, service, arg3 );129 async_connect_me_to(exch, iface, service, arg3, rc); 117 130 async_exchange_end(exch); 118 131 … … 130 143 } 131 144 145 /** Wait and connect to a singleton service. 146 * 147 * @param service Singleton service ID. 148 * @param iface Interface to connect to. 149 * @param arg3 Custom connection argument. 150 * @param rc Placeholder for return code. Unused if NULL. 151 * 152 * @return New session on success or NULL on error. 153 * 154 */ 132 155 async_sess_t *service_connect_blocking(service_t service, iface_t iface, 133 sysarg_t arg3 )134 { 135 async_sess_t *sess = ns_session_get( );156 sysarg_t arg3, errno_t *rc) 157 { 158 async_sess_t *sess = ns_session_get(rc); 136 159 if (sess == NULL) 137 160 return NULL; … … 139 162 async_exch_t *exch = async_exchange_begin(sess); 140 163 async_sess_t *csess = 141 async_connect_me_to_blocking(exch, iface, service, arg3 );164 async_connect_me_to_blocking(exch, iface, service, arg3, rc); 142 165 async_exchange_end(exch); 143 166 … … 157 180 errno_t ns_ping(void) 158 181 { 159 async_sess_t *sess = ns_session_get(); 182 errno_t rc; 183 async_sess_t *sess = ns_session_get(&rc); 184 if (sess == NULL) 185 return rc; 186 187 async_exch_t *exch = async_exchange_begin(sess); 188 rc = async_req_0_0(exch, NS_PING); 189 async_exchange_end(exch); 190 191 return rc; 192 } 193 194 errno_t ns_intro(task_id_t id) 195 { 196 errno_t rc; 197 async_sess_t *sess = ns_session_get(&rc); 160 198 if (sess == NULL) 161 199 return EIO; 162 200 163 201 async_exch_t *exch = async_exchange_begin(sess); 164 errno_t rc = async_req_0_0(exch, NS_PING); 165 async_exchange_end(exch); 166 167 return rc; 168 } 169 170 errno_t ns_intro(task_id_t id) 171 { 172 async_exch_t *exch; 173 async_sess_t *sess = ns_session_get(); 174 if (sess == NULL) 175 return EIO; 176 177 exch = async_exchange_begin(sess); 178 errno_t rc = async_req_2_0(exch, NS_ID_INTRO, LOWER32(id), UPPER32(id)); 179 async_exchange_end(exch); 180 181 return rc; 182 } 183 184 async_sess_t *ns_session_get(void) 202 rc = async_req_2_0(exch, NS_ID_INTRO, LOWER32(id), UPPER32(id)); 203 async_exchange_end(exch); 204 205 return rc; 206 } 207 208 async_sess_t *ns_session_get(errno_t *rc) 185 209 { 186 210 async_exch_t *exch; … … 188 212 if (sess_ns == NULL) { 189 213 exch = async_exchange_begin(&session_ns); 190 sess_ns = async_connect_me_to(exch, 0, 0, 0 );214 sess_ns = async_connect_me_to(exch, 0, 0, 0, rc); 191 215 async_exchange_end(exch); 192 216 if (sess_ns == NULL) -
uspace/lib/c/generic/task.c
rf8fb03b r01900b6 181 181 182 182 /* Connect to a program loader. */ 183 loader_t *ldr = loader_connect(); 183 errno_t rc; 184 loader_t *ldr = loader_connect(&rc); 184 185 if (ldr == NULL) 185 return EREFUSED;186 return rc; 186 187 187 188 bool wait_initialized = false; … … 189 190 /* Get task ID. */ 190 191 task_id_t task_id; 191 errno_trc = loader_get_task_id(ldr, &task_id);192 rc = loader_get_task_id(ldr, &task_id); 192 193 if (rc != EOK) 193 194 goto error; … … 250 251 /* Start a debug session if requested */ 251 252 if (rsess != NULL) { 252 ksess = async_connect_kbox(task_id );253 ksess = async_connect_kbox(task_id, &rc); 253 254 if (ksess == NULL) { 254 255 /* Most likely debugging support is not compiled in */ 255 rc = ENOTSUP;256 256 goto error; 257 257 } … … 402 402 errno_t task_setup_wait(task_id_t id, task_wait_t *wait) 403 403 { 404 async_sess_t *sess_ns = ns_session_get(); 404 errno_t rc; 405 async_sess_t *sess_ns = ns_session_get(&rc); 405 406 if (sess_ns == NULL) 406 return EIO;407 return rc; 407 408 408 409 async_exch_t *exch = async_exchange_begin(sess_ns); … … 484 485 errno_t task_retval(int val) 485 486 { 486 async_sess_t *sess_ns = ns_session_get(); 487 errno_t rc; 488 async_sess_t *sess_ns = ns_session_get(&rc); 487 489 if (sess_ns == NULL) 488 return EIO;490 return rc; 489 491 490 492 async_exch_t *exch = async_exchange_begin(sess_ns); 491 errno_trc = (errno_t) async_req_1_0(exch, NS_RETVAL, val);493 rc = (errno_t) async_req_1_0(exch, NS_RETVAL, val); 492 494 async_exchange_end(exch); 493 495 -
uspace/lib/c/generic/vfs/vfs.c
rf8fb03b r01900b6 322 322 while (vfs_sess == NULL) { 323 323 vfs_sess = service_connect_blocking(SERVICE_VFS, INTERFACE_VFS, 324 0 );324 0, NULL); 325 325 } 326 326 -
uspace/lib/c/include/async.h
rf8fb03b r01900b6 275 275 276 276 extern async_sess_t *async_connect_me_to(async_exch_t *, iface_t, sysarg_t, 277 sysarg_t );277 sysarg_t, errno_t *); 278 278 extern async_sess_t *async_connect_me_to_blocking(async_exch_t *, iface_t, 279 sysarg_t, sysarg_t );280 extern async_sess_t *async_connect_kbox(task_id_t );279 sysarg_t, sysarg_t, errno_t *); 280 extern async_sess_t *async_connect_kbox(task_id_t, errno_t *); 281 281 282 282 extern errno_t async_connect_to_me(async_exch_t *, iface_t, sysarg_t, sysarg_t); -
uspace/lib/c/include/loader/loader.h
rf8fb03b r01900b6 44 44 45 45 extern errno_t loader_spawn(const char *); 46 extern loader_t *loader_connect( void);46 extern loader_t *loader_connect(errno_t *); 47 47 extern errno_t loader_get_task_id(loader_t *, task_id_t *); 48 48 extern errno_t loader_set_cwd(loader_t *); -
uspace/lib/c/include/ns.h
rf8fb03b r01900b6 43 43 void *); 44 44 extern errno_t service_register_broker(service_t, async_port_handler_t, void *); 45 extern async_sess_t *service_connect(service_t, iface_t, sysarg_t); 46 extern async_sess_t *service_connect_blocking(service_t, iface_t, sysarg_t); 45 extern async_sess_t *service_connect(service_t, iface_t, sysarg_t, errno_t *); 46 extern async_sess_t *service_connect_blocking(service_t, iface_t, sysarg_t, 47 errno_t *); 47 48 48 49 extern errno_t ns_ping(void); 49 50 extern errno_t ns_intro(task_id_t); 50 extern async_sess_t *ns_session_get( void);51 extern async_sess_t *ns_session_get(errno_t *); 51 52 52 53 #endif -
uspace/srv/fs/cdfs/cdfs.c
rf8fb03b r01900b6 75 75 } 76 76 77 errno_t rc; 77 78 async_sess_t *vfs_sess = service_connect_blocking(SERVICE_VFS, 78 INTERFACE_VFS_DRIVER, 0 );79 INTERFACE_VFS_DRIVER, 0, &rc); 79 80 if (!vfs_sess) { 80 printf("%s: Unable to connect to VFS \n", NAME);81 printf("%s: Unable to connect to VFS: %s\n", NAME, str_error(rc)); 81 82 return -1; 82 83 } 83 84 84 errno_trc = fs_register(vfs_sess, &cdfs_vfs_info, &cdfs_ops,85 rc = fs_register(vfs_sess, &cdfs_vfs_info, &cdfs_ops, 85 86 &cdfs_libfs_ops); 86 87 if (rc != EOK) { -
uspace/srv/fs/exfat/exfat.c
rf8fb03b r01900b6 77 77 78 78 async_sess_t *vfs_sess = service_connect_blocking(SERVICE_VFS, 79 INTERFACE_VFS_DRIVER, 0 );79 INTERFACE_VFS_DRIVER, 0, &rc); 80 80 if (!vfs_sess) { 81 printf(NAME ": failed to connect to VFS \n");81 printf(NAME ": failed to connect to VFS: %s\n", str_error(rc)); 82 82 return -1; 83 83 } -
uspace/srv/fs/ext4fs/ext4fs.c
rf8fb03b r01900b6 43 43 #include <ipc/services.h> 44 44 #include <str.h> 45 #include <str_error.h> 45 46 #include "ext4/ops.h" 46 47 #include "../../vfs/vfs.h" … … 66 67 } 67 68 69 errno_t rc; 68 70 async_sess_t *vfs_sess = service_connect_blocking(SERVICE_VFS, 69 INTERFACE_VFS_DRIVER, 0 );71 INTERFACE_VFS_DRIVER, 0, &rc); 70 72 if (!vfs_sess) { 71 printf("%s: Failed to connect to VFS \n", NAME);73 printf("%s: Failed to connect to VFS: %s\n", NAME, str_error(rc)); 72 74 return 2; 73 75 } 74 76 75 errno_trc = ext4_global_init();77 rc = ext4_global_init(); 76 78 if (rc != EOK) { 77 printf("%s: Global initialization failed\n", NAME); 79 printf("%s: Global initialization failed: %s\n", NAME, 80 str_error(rc)); 78 81 return rc; 79 82 } … … 82 85 &ext4_libfs_ops); 83 86 if (rc != EOK) { 84 printf("%s: Failed to register file system\n", NAME); 87 printf("%s: Failed to register file system: %s\n", NAME, 88 str_error(rc)); 85 89 return rc; 86 90 } -
uspace/srv/fs/fat/fat.c
rf8fb03b r01900b6 77 77 78 78 async_sess_t *vfs_sess = service_connect_blocking(SERVICE_VFS, 79 INTERFACE_VFS_DRIVER, 0 );79 INTERFACE_VFS_DRIVER, 0, &rc); 80 80 if (!vfs_sess) { 81 printf(NAME ": failed to connect to VFS \n");81 printf(NAME ": failed to connect to VFS: %s\n", str_error(rc)); 82 82 return -1; 83 83 } -
uspace/srv/fs/locfs/locfs.c
rf8fb03b r01900b6 78 78 } 79 79 80 errno_t rc; 80 81 async_sess_t *vfs_sess = service_connect_blocking(SERVICE_VFS, 81 INTERFACE_VFS_DRIVER, 0 );82 INTERFACE_VFS_DRIVER, 0, &rc); 82 83 if (!vfs_sess) { 83 printf("%s: Unable to connect to VFS \n", NAME);84 printf("%s: Unable to connect to VFS: %s\n", NAME, str_error(rc)); 84 85 return -1; 85 86 } 86 87 87 errno_trc = fs_register(vfs_sess, &locfs_vfs_info, &locfs_ops,88 rc = fs_register(vfs_sess, &locfs_vfs_info, &locfs_ops, 88 89 &locfs_libfs_ops); 89 90 if (rc != EOK) { -
uspace/srv/fs/mfs/mfs.c
rf8fb03b r01900b6 74 74 75 75 async_sess_t *vfs_sess = service_connect_blocking(SERVICE_VFS, 76 INTERFACE_VFS_DRIVER, 0); 77 76 INTERFACE_VFS_DRIVER, 0, &rc); 78 77 if (!vfs_sess) { 79 printf(NAME ": failed to connect to VFS \n");78 printf(NAME ": failed to connect to VFS: %s\n", str_error(rc)); 80 79 rc = errno; 81 80 goto err; -
uspace/srv/fs/tmpfs/tmpfs.c
rf8fb03b r01900b6 80 80 } 81 81 82 errno_t rc; 82 83 async_sess_t *vfs_sess = service_connect_blocking(SERVICE_VFS, 83 INTERFACE_VFS_DRIVER, 0 );84 INTERFACE_VFS_DRIVER, 0, &rc); 84 85 if (!vfs_sess) { 85 printf("%s: Unable to connect to VFS \n", NAME);86 printf("%s: Unable to connect to VFS: %s\n", NAME, str_error(rc)); 86 87 return -1; 87 88 } 88 89 89 errno_trc = fs_register(vfs_sess, &tmpfs_vfs_info, &tmpfs_ops,90 rc = fs_register(vfs_sess, &tmpfs_vfs_info, &tmpfs_ops, 90 91 &tmpfs_libfs_ops); 91 92 if (rc != EOK) { -
uspace/srv/fs/udf/udf.c
rf8fb03b r01900b6 73 73 } 74 74 75 errno_t rc; 75 76 async_sess_t *vfs_sess = 76 service_connect_blocking(SERVICE_VFS, INTERFACE_VFS_DRIVER, 0 );77 service_connect_blocking(SERVICE_VFS, INTERFACE_VFS_DRIVER, 0, &rc); 77 78 if (!vfs_sess) { 78 log_msg(LOG_DEFAULT, LVL_FATAL, "Failed to connect to VFS"); 79 log_msg(LOG_DEFAULT, LVL_FATAL, "Failed to connect to VFS: %s", 80 str_error(rc)); 79 81 return 2; 80 82 } 81 83 82 errno_trc = fs_register(vfs_sess, &udf_vfs_info, &udf_ops,84 rc = fs_register(vfs_sess, &udf_vfs_info, &udf_ops, 83 85 &udf_libfs_ops); 84 86 if (rc != EOK)
Note:
See TracChangeset
for help on using the changeset viewer.