Changeset 210e50a in mainline for uspace/app
- Timestamp:
- 2010-02-03T13:36:46Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 28be7fa
- Parents:
- 82474ef
- Location:
- uspace/app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/init/init.c
r82474ef r210e50a 94 94 static bool mount_devfs(void) 95 95 { 96 char null[MAX_DEVICE_NAME]; 97 int null_id = devmap_null_create(); 98 99 if (null_id == -1) { 100 printf(NAME ": Unable to create null device\n"); 101 return false; 102 } 103 104 snprintf(null, MAX_DEVICE_NAME, "null/%d", null_id); 105 int rc = mount("devfs", DEVFS_MOUNT_POINT, null, "", IPC_FLAG_BLOCKING); 96 int rc = mount("devfs", DEVFS_MOUNT_POINT, "", "", IPC_FLAG_BLOCKING); 106 97 107 98 switch (rc) { … … 111 102 case EBUSY: 112 103 printf(NAME ": Device filesystem already mounted\n"); 113 devmap_null_destroy(null_id);114 104 return false; 115 105 case ELIMIT: 116 106 printf(NAME ": Unable to mount device filesystem\n"); 117 devmap_null_destroy(null_id);118 107 return false; 119 108 case ENOENT: 120 109 printf(NAME ": Unknown filesystem type (devfs)\n"); 121 devmap_null_destroy(null_id);122 110 return false; 123 111 default: 124 112 printf(NAME ": Error mounting device filesystem (%d)\n", rc); 125 devmap_null_destroy(null_id);126 113 return false; 127 114 } -
uspace/app/tester/vfs/vfs1.c
r82474ef r210e50a 79 79 TPRINTF("Created directory %s\n", MOUNT_POINT); 80 80 81 char null[MAX_DEVICE_NAME]; 82 int null_id = devmap_null_create(); 83 84 if (null_id == -1) 85 return "Unable to create null device"; 86 87 snprintf(null, MAX_DEVICE_NAME, "null/%d", null_id); 88 int rc = mount(FS_TYPE, MOUNT_POINT, null, OPTIONS, FLAGS); 81 int rc = mount(FS_TYPE, MOUNT_POINT, "", OPTIONS, FLAGS); 89 82 switch (rc) { 90 83 case EOK: 91 TPRINTF("Mounted /dev/%s as %s on %s\n", null, FS_TYPE, MOUNT_POINT);84 TPRINTF("Mounted %s on %s\n", FS_TYPE, MOUNT_POINT); 92 85 break; 93 86 case EBUSY:
Note:
See TracChangeset
for help on using the changeset viewer.