Changeset beb9336 in mainline for uspace/srv/fs/ext4fs/ext4fs.c
- Timestamp:
- 2012-08-24T14:07:52Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 041ab64
- Parents:
- bd29f9c9 (diff), db81577 (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/ext4fs/ext4fs.c
rbd29f9c9 rbeb9336 29 29 /** @addtogroup fs 30 30 * @{ 31 */ 32 31 */ 33 32 /** 34 * @file 35 * @brief EXT4 file system driver for HelenOS.33 * @file ext4fs.c 34 * @brief Ext4 file system driver for HelenOS. 36 35 */ 37 36 … … 46 45 #include "../../vfs/vfs.h" 47 46 48 #define NAME 47 #define NAME "ext4fs" 49 48 50 49 vfs_info_t ext4fs_vfs_info = { 51 50 .name = NAME, 52 .instance = 0 ,51 .instance = 0 53 52 }; 54 53 55 /**56 * Entry point of ext4fs server.57 * Initialize data structures and IPC, then accepts connections in server mode.58 */59 54 int main(int argc, char **argv) 60 55 { 61 printf( NAME ": HelenOS EXT4 file system server\n");62 56 printf("%s: HelenOS ext4 file system server\n", NAME); 57 63 58 if (argc == 3) { 64 59 if (!str_cmp(argv[1], "--instance")) 65 60 ext4fs_vfs_info.instance = strtol(argv[2], NULL, 10); 66 61 else { 67 printf( NAME " Unrecognized parameters\n");68 return -1;62 printf("%s: Unrecognized parameters\n", NAME); 63 return 1; 69 64 } 70 65 } 71 66 72 67 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 73 68 SERVICE_VFS, 0, 0); 74 69 if (!vfs_sess) { 75 printf( NAME ": failed to connect to VFS\n");76 return -1;70 printf("%s: Failed to connect to VFS\n", NAME); 71 return 2; 77 72 } 78 73 79 74 int rc = ext4fs_global_init(); 80 75 if (rc != EOK) { 81 printf( NAME ": Failed global initialization\n");82 return 1;76 printf("%s: Global initialization failed\n", NAME); 77 return rc; 83 78 } 84 79 85 80 rc = fs_register(vfs_sess, &ext4fs_vfs_info, &ext4fs_ops, 86 81 &ext4fs_libfs_ops); 87 82 if (rc != EOK) { 88 fprintf(stdout, NAME ": Failed to register fs (%d)\n", rc);89 return 1;83 printf("%s: Failed to register file system\n", NAME); 84 return rc; 90 85 } 91 92 printf( NAME ": Accepting connections\n");86 87 printf("%s: Accepting connections\n", NAME); 93 88 task_retval(0); 94 89 async_manager(); 95 /* not reached */ 90 91 /* Not reached */ 96 92 return 0; 97 93 } … … 99 95 /** 100 96 * @} 101 */ 97 */
Note:
See TracChangeset
for help on using the changeset viewer.