Changes in uspace/srv/fs/devfs/devfs.c [79ae36dd:ffa2c8ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/devfs/devfs.c
r79ae36dd rffa2c8ef 41 41 #include <stdio.h> 42 42 #include <ipc/services.h> 43 #include < ns.h>43 #include <ipc/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 if (!IPC_GET_IMETHOD(call)) 70 switch (IPC_GET_IMETHOD(call)) { 71 case IPC_M_PHONE_HUNGUP: 71 72 return; 72 73 switch (IPC_GET_IMETHOD(call)) {74 73 case VFS_OUT_MOUNTED: 75 74 devfs_mounted(callid, &call); … … 120 119 int main(int argc, char *argv[]) 121 120 { 122 printf( "%s: HelenOS Device Filesystem\n", NAME);121 printf(NAME ": HelenOS Device Filesystem\n"); 123 122 124 123 if (!devfs_init()) { 125 printf( "%s: failed to initialize devfs\n", NAME);124 printf(NAME ": failed to initialize devfs\n"); 126 125 return -1; 127 126 } 128 127 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); 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"); 133 131 return -1; 134 132 } 135 133 136 int rc = fs_register(vfs_ sess, &devfs_reg, &devfs_vfs_info,134 int rc = fs_register(vfs_phone, &devfs_reg, &devfs_vfs_info, 137 135 devfs_connection); 138 136 if (rc != EOK) { 139 printf( "%s: Failed to register file system (%d)\n", NAME, rc);137 printf(NAME ": Failed to register file system (%d)\n", rc); 140 138 return rc; 141 139 } 142 140 143 printf( "%s: Accepting connections\n", NAME);141 printf(NAME ": Accepting connections\n"); 144 142 task_retval(0); 145 143 async_manager();
Note:
See TracChangeset
for help on using the changeset viewer.