Changeset c91c9fb in mainline
- Timestamp:
- 2009-03-02T17:26:01Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 926d6caf
- Parents:
- 6cef75da
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/init/init.c
r6cef75da rc91c9fb 28 28 29 29 /** @addtogroup init Init 30 * @brief Init process for testing purposes.30 * @brief Init process for user space environment configuration. 31 31 * @{ 32 */ 32 */ 33 33 /** 34 34 * @file … … 37 37 #include <stdio.h> 38 38 #include <unistd.h> 39 #include <ipc/ipc.h> 39 40 #include <vfs/vfs.h> 40 41 #include <bool.h> … … 43 44 #include <task.h> 44 45 #include <malloc.h> 46 #include <macros.h> 45 47 #include "init.h" 46 48 #include "version.h" 47 48 static void console_wait(void)49 {50 while (get_cons_phone() < 0)51 usleep(50000); // FIXME52 }53 49 54 50 static bool mount_fs(const char *fstype) … … 57 53 58 54 while (rc < 0) { 59 rc = mount(fstype, "/", "initrd" );60 55 rc = mount(fstype, "/", "initrd", IPC_FLAG_BLOCKING); 56 61 57 switch (rc) { 62 58 case EOK: … … 72 68 printf(NAME ": Unknown filesystem type (%s)\n", fstype); 73 69 return false; 74 default:75 sleep(5); // FIXME76 70 } 77 71 } … … 83 77 { 84 78 char *argv[2]; 85 79 86 80 printf(NAME ": Spawning %s\n", fname); 87 81 88 82 argv[0] = fname; 89 83 argv[1] = NULL; 90 91 if (task_spawn(fname, argv) != 0) { 92 /* Success */ 93 sleep(1); 94 } 84 85 if (task_spawn(fname, argv)) 86 /* Add reasonable delay to avoid 87 intermixed klog output */ 88 usleep(10000); 89 else 90 printf(NAME ": Error spawning %s\n", fname); 95 91 } 96 92 … … 98 94 { 99 95 info_print(); 100 sleep(5); // FIXME101 96 102 if (!mount_fs( "tmpfs") && !mount_fs("fat")) {97 if (!mount_fs(STRING(RDFMT))) { 103 98 printf(NAME ": Exiting\n"); 104 99 return -1;
Note:
See TracChangeset
for help on using the changeset viewer.