Subversion Repositories HelenOS

Rev

Rev 3665 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3665 Rev 3742
Line 10... Line 10...
10
#define MEM_MAP_DESCRIPTOR_OFFSET_PAGES 24    
10
#define MEM_MAP_DESCRIPTOR_OFFSET_PAGES 24    
11
 
11
 
12
 
12
 
13
 
13
 
14
//Link image as a data array into hello - usefull with network boot
14
//Link image as a data array into hello - usefull with network boot
15
#define IMAGE_LINKED
15
//#define IMAGE_LINKED
16
 
16
 
17
bootinfo_t *bootinfo=(bootinfo_t *)BOOTINFO_ADDRESS;
17
bootinfo_t *bootinfo=(bootinfo_t *)BOOTINFO_ADDRESS;
18
 
18
 
19
 
19
 
20
#ifdef IMAGE_LINKED
20
#ifdef IMAGE_LINKED
Line 84... Line 84...
84
    UINTN Size;
84
    UINTN Size;
85
 
85
 
86
    StrCpy(FileName,DevicePathToStr(LoadedImage->FilePath));
86
    StrCpy(FileName,DevicePathToStr(LoadedImage->FilePath));
87
    for(i=StrLen(FileName);i>=0 && FileName[i]!='\\';i--);
87
    for(i=StrLen(FileName);i>=0 && FileName[i]!='\\';i--);
88
    FileName[i] = 0;
88
    FileName[i] = 0;
-
 
89
    FileName[0] = 0;
89
   
90
   
90
    Print(L"%s\n",LoadedImage->LoadOptions);
91
    Print(L"%s\n",LoadedImage->LoadOptions);
91
   
92
   
92
    i=0;
93
    i=0;
93
    CHAR16 *LoadOptions = LoadedImage->LoadOptions;
94
    CHAR16 *LoadOptions = LoadedImage->LoadOptions;
Line 103... Line 104...
103
   
104
   
104
    if(LoadOptions[i++]==0){
105
    if(LoadOptions[i++]==0){
105
        StrCat(FileName,L"\\image.bin");
106
        StrCat(FileName,L"\\image.bin");
106
        defaultLoad=1;
107
        defaultLoad=1;
107
    }  
108
    }  
108
    else{
109
/*  else{
109
        CHAR16 buf[1024];
110
        CHAR16 buf[1024];
110
        buf[0]='\\';
111
        //buf[0]='\\';
111
        i--;
112
        i--;
112
        int j;
113
        int j;
113
        for(j=0;LoadOptions[i+j]!=L' '&&LoadOptions[i+j]!=0;j++)
114
        for(j=0;LoadOptions[i+j]!=L' '&&LoadOptions[i+j]!=0;j++)
114
            buf[j+1]=LoadOptions[i+j];
115
            buf[j+1]=LoadOptions[i+j];
115
        buf[j+1]=0;
116
        buf[j+1]=0;
116
        StrCat(FileName,buf);
117
        StrCat(FileName,buf);
117
        defaultLoad=0;
118
        defaultLoad=0;
-
 
119
    }*/
-
 
120
    else{
-
 
121
        CHAR16 buf[1024];
-
 
122
        //buf[0]='\\';
-
 
123
        i--;
-
 
124
        int j;
-
 
125
        for(j=0;LoadOptions[i+j]!=L' '&&LoadOptions[i+j]!=0;j++)
-
 
126
            buf[j]=LoadOptions[i+j];
-
 
127
        buf[j+1]=0;
-
 
128
        StrCat(FileName,buf);
-
 
129
        defaultLoad=0;
118
    }
130
    }
119
 
131
 
120
    imageLoad=1;
132
    imageLoad=1;
121
#ifdef IMAGE_LINKED
133
#ifdef IMAGE_LINKED
122
    if(defaultLoad) {
134
    if(defaultLoad) {