Changeset eb522e8 in mainline for uspace/app/init/init.c
- Timestamp:
- 2011-06-01T08:43:42Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d6c1f1
- Parents:
- 9e2e715 (diff), e51a514 (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/app/init/init.c
r9e2e715 reb522e8 37 37 #include <stdio.h> 38 38 #include <unistd.h> 39 #include <ipc/ipc.h>40 39 #include <vfs/vfs.h> 41 40 #include <bool.h> … … 57 56 #define DEVFS_MOUNT_POINT "/dev" 58 57 59 #define SCRATCH_FS_TYPE "tmpfs"60 #define SCRATCH_MOUNT_POINT "/scratch"58 #define TMPFS_FS_TYPE "tmpfs" 59 #define TMPFS_MOUNT_POINT "/tmp" 61 60 62 61 #define DATA_FS_TYPE "fat" 63 #define DATA_DEVICE "bd/ disk0"62 #define DATA_DEVICE "bd/ata1disk0" 64 63 #define DATA_MOUNT_POINT "/data" 65 64 … … 185 184 186 185 /* Wait for the input device to be ready */ 187 dev _handle_t handle;186 devmap_handle_t handle; 188 187 rc = devmap_device_get_handle(dev, &handle, IPC_FLAG_BLOCKING); 189 188 if (rc != EOK) { … … 200 199 } 201 200 202 static void getterm(const char *dev, const char *app )201 static void getterm(const char *dev, const char *app, bool wmsg) 203 202 { 204 203 char term[DEVMAP_NAME_MAXLEN]; … … 210 209 211 210 /* Wait for the terminal device to be ready */ 212 dev _handle_t handle;211 devmap_handle_t handle; 213 212 rc = devmap_device_get_handle(dev, &handle, IPC_FLAG_BLOCKING); 214 213 if (rc != EOK) { … … 218 217 } 219 218 220 rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, term, app, NULL); 221 if (rc != EOK) { 222 printf("%s: Error spawning %s %s %s (%s)\n", NAME, 223 APP_GETTERM, term, app, str_error(rc)); 224 } 225 } 226 227 static bool mount_scratch(void) 228 { 229 int rc = mount(SCRATCH_FS_TYPE, SCRATCH_MOUNT_POINT, "", "", 0); 230 return mount_report("Scratch filesystem", SCRATCH_MOUNT_POINT, 231 SCRATCH_FS_TYPE, NULL, rc); 219 if (wmsg) { 220 rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, "-w", term, 221 app, NULL); 222 if (rc != EOK) { 223 printf("%s: Error spawning %s -w %s %s (%s)\n", NAME, 224 APP_GETTERM, term, app, str_error(rc)); 225 } 226 } else { 227 rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, term, app, 228 NULL); 229 if (rc != EOK) { 230 printf("%s: Error spawning %s %s %s (%s)\n", NAME, 231 APP_GETTERM, term, app, str_error(rc)); 232 } 233 } 234 } 235 236 static bool mount_tmpfs(void) 237 { 238 int rc = mount(TMPFS_FS_TYPE, TMPFS_MOUNT_POINT, "", "", 0); 239 return mount_report("Temporary filesystem", TMPFS_MOUNT_POINT, 240 TMPFS_FS_TYPE, NULL, rc); 232 241 } 233 242 … … 261 270 } 262 271 263 mount_scratch(); 264 272 mount_tmpfs(); 273 274 spawn("/srv/apic"); 275 spawn("/srv/i8259"); 265 276 spawn("/srv/fhc"); 266 277 spawn("/srv/obio"); … … 295 306 #endif 296 307 297 getterm("term/vc0", "/app/bdsh"); 298 getterm("term/vc1", "/app/bdsh"); 299 getterm("term/vc2", "/app/bdsh"); 300 getterm("term/vc3", "/app/bdsh"); 301 getterm("term/vc4", "/app/bdsh"); 302 getterm("term/vc5", "/app/bdsh"); 303 getterm("term/vc6", "/app/klog"); 304 308 getterm("term/vc0", "/app/bdsh", true); 309 getterm("term/vc1", "/app/bdsh", false); 310 getterm("term/vc2", "/app/bdsh", false); 311 getterm("term/vc3", "/app/bdsh", false); 312 getterm("term/vc4", "/app/bdsh", false); 313 getterm("term/vc5", "/app/bdsh", false); 314 getterm("term/vc6", "/app/klog", false); 315 316 #ifdef CONFIG_START_DEVMAN 317 318 #ifdef CONFIG_DEVMAN_EARLY_LAUNCH 319 spawn("/srv/devman"); 320 #else 321 getterm("term/vc7", "/srv/devman", false); 322 #endif 323 324 #endif 325 305 326 return 0; 306 327 }
Note:
See TracChangeset
for help on using the changeset viewer.