Changeset 393 for Whitix/branches/hybrid/kernel
- Timestamp:
- 05/02/08 11:36:05 (7 months ago)
- Files:
-
- 1 modified
-
Whitix/branches/hybrid/kernel/main.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/hybrid/kernel/main.c
r194 r393 88 88 static void Start(void* args) 89 89 { 90 char buf[100];91 90 int i; 92 91 struct StorageDevice* rootDev=NULL; … … 130 129 printf("Mounted the filesystems. Starting the shell\n"); 131 130 132 for (i=0; i<MAX_CONSOLES; i++)131 if (DoOpenFile(¤t->files[0], DEVICES_PATH "/Consoles/Console0",FILE_READ | FILE_FORCE_OPEN,0)) 133 132 { 134 sprintf(buf,"%s/Consoles/Console%d",DEVICES_PATH,i); 135 if (DoOpenFile(¤t->files[0],buf,FILE_READ | FILE_FORCE_OPEN,0)) 136 { 137 printf("Failed to open %s. Halting\n",buf); 138 cli(); hlt(); 139 } 133 printf("Failed to open the first console. Halting\n"); 134 cli(); hlt(); 135 } 140 136 141 strcat(buf,"\n\n"); 142 DoWriteFile(¤t->files[0],(BYTE*)(buf+strlen(DEVICES_PATH)),strlen(buf)-strlen(DEVICES_PATH)); 143 extern int Exec(char* pathName,int* fds,char** argv); 144 if (Exec("/Applications/burn",fds,NULL) < 0) 145 { 146 printf("Could not open the shell. Halting\n"); 147 cli(); hlt(); 148 } 137 extern int Exec(char* pathName,int* fds,char** argv); 138 if (Exec("/System/Startup/startup", fds, NULL) < 0) 139 { 140 printf("Could not launch the startup program. Halting\n"); 141 cli(); hlt(); 149 142 } 150 143
