Changeset 41811af in mainline for uspace/srv/fs/devfs/devfs.c
- Timestamp:
- 2011-06-10T10:14:26Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ab547063
- Parents:
- 9536e6e (diff), 390d80d (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
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/devfs/devfs.c
r9536e6e r41811af 41 41 #include <stdio.h> 42 42 #include <ipc/services.h> 43 #include < ipc/ns.h>43 #include <ns.h> 44 44 #include <async.h> 45 45 #include <errno.h> … … 68 68 ipc_callid_t callid = async_get_call(&call); 69 69 70 switch (IPC_GET_IMETHOD(call)) { 71 case IPC_M_PHONE_HUNGUP: 70 if (!IPC_GET_IMETHOD(call)) 72 71 return; 72 73 switch (IPC_GET_IMETHOD(call)) { 73 74 case VFS_OUT_MOUNTED: 74 75 devfs_mounted(callid, &call); … … 119 120 int main(int argc, char *argv[]) 120 121 { 121 printf( NAME ": HelenOS Device Filesystem\n");122 printf("%s: HelenOS Device Filesystem\n", NAME); 122 123 123 124 if (!devfs_init()) { 124 printf( NAME ": failed to initialize devfs\n");125 printf("%s: failed to initialize devfs\n", NAME); 125 126 return -1; 126 127 } 127 128 128 int vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0); 129 if (vfs_phone < EOK) { 130 printf(NAME ": Unable to connect to VFS\n"); 129 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 130 SERVICE_VFS, 0, 0); 131 if (!vfs_sess) { 132 printf("%s: Unable to connect to VFS\n", NAME); 131 133 return -1; 132 134 } 133 135 134 int rc = fs_register(vfs_ phone, &devfs_reg, &devfs_vfs_info,136 int rc = fs_register(vfs_sess, &devfs_reg, &devfs_vfs_info, 135 137 devfs_connection); 136 138 if (rc != EOK) { 137 printf( NAME ": Failed to register file system (%d)\n", rc);139 printf("%s: Failed to register file system (%d)\n", NAME, rc); 138 140 return rc; 139 141 } 140 142 141 printf( NAME ": Accepting connections\n");143 printf("%s: Accepting connections\n", NAME); 142 144 task_retval(0); 143 145 async_manager();
Note:
See TracChangeset
for help on using the changeset viewer.