Changeset 4c53333 in mainline for uspace/srv/fs/ext4fs/ext4fs.c
- Timestamp:
- 2013-07-11T08:21:10Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 64e63ce1
- Parents:
- 80445cf (diff), c8bb1633 (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 moved
-
uspace/srv/fs/ext4fs/ext4fs.c (moved) (moved from uspace/srv/fs/ext2fs/ext2fs.c ) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext4fs/ext4fs.c
r80445cf r4c53333 1 1 /* 2 * Copyright (c) 2006 Martin Decky 3 * Copyright (c) 2011 Martin Sucha 2 * Copyright (c) 2012 Frantisek Princ 4 3 * All rights reserved. 5 4 * … … 30 29 /** @addtogroup fs 31 30 * @{ 32 */ 33 31 */ 34 32 /** 35 * @file ext2.c36 * @brief EXT2file system driver for HelenOS.33 * @file ext4fs.c 34 * @brief Ext4 file system driver for HelenOS. 37 35 */ 38 36 39 #include "ext2fs.h"40 #include <ipc/services.h>41 #include <ns.h>42 37 #include <async.h> 43 38 #include <errno.h> 44 #include <unistd.h> 39 #include <libfs.h> 40 #include <ns.h> 41 #include <stdio.h> 45 42 #include <task.h> 46 #include < stdio.h>47 #include <libfs.h>43 #include <ipc/services.h> 44 #include "ext4fs.h" 48 45 #include "../../vfs/vfs.h" 49 46 50 #define NAME "ext2fs"47 #define NAME "ext4fs" 51 48 52 vfs_info_t ext 2fs_vfs_info = {49 vfs_info_t ext4fs_vfs_info = { 53 50 .name = NAME, 54 .instance = 0 ,51 .instance = 0 55 52 }; 56 53 57 54 int main(int argc, char **argv) 58 55 { 59 printf( NAME ": HelenOS EXT2 file system server\n");60 56 printf("%s: HelenOS ext4 file system server\n", NAME); 57 61 58 if (argc == 3) { 62 59 if (!str_cmp(argv[1], "--instance")) 63 ext 2fs_vfs_info.instance = strtol(argv[2], NULL, 10);60 ext4fs_vfs_info.instance = strtol(argv[2], NULL, 10); 64 61 else { 65 printf( NAME " Unrecognized parameters");66 return -1;62 printf("%s: Unrecognized parameters\n", NAME); 63 return 1; 67 64 } 68 65 } … … 71 68 SERVICE_VFS, 0, 0); 72 69 if (!vfs_sess) { 73 printf(NAME ": failed to connect to VFS\n"); 74 return -1; 75 } 76 77 int rc = ext2fs_global_init(); 78 if (rc != EOK) { 79 printf(NAME ": Failed global initialization\n"); 80 return 1; 81 } 82 83 rc = fs_register(vfs_sess, &ext2fs_vfs_info, &ext2fs_ops, 84 &ext2fs_libfs_ops); 85 if (rc != EOK) { 86 fprintf(stdout, NAME ": Failed to register fs (%d)\n", rc); 87 return 1; 70 printf("%s: Failed to connect to VFS\n", NAME); 71 return 2; 88 72 } 89 73 90 printf(NAME ": Accepting connections\n"); 74 int rc = ext4fs_global_init(); 75 if (rc != EOK) { 76 printf("%s: Global initialization failed\n", NAME); 77 return rc; 78 } 79 80 rc = fs_register(vfs_sess, &ext4fs_vfs_info, &ext4fs_ops, 81 &ext4fs_libfs_ops); 82 if (rc != EOK) { 83 printf("%s: Failed to register file system\n", NAME); 84 return rc; 85 } 86 87 printf("%s: Accepting connections\n", NAME); 91 88 task_retval(0); 92 89 async_manager(); 93 /* not reached */ 90 91 /* Not reached */ 94 92 return 0; 95 93 } … … 97 95 /** 98 96 * @} 99 */ 97 */
Note:
See TracChangeset
for help on using the changeset viewer.
