Browse Source

Initrd concatenation now working

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
24f32a1945
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/arch/i386/image/bzimage.c

+ 3
- 2
src/arch/i386/image/bzimage.c View File

@@ -186,10 +186,11 @@ static int bzimage_load_initrd ( struct image *image,
186 186
 	for_each_image ( initrd ) {
187 187
 		if ( initrd->type != &initrd_image_type )
188 188
 			continue;
189
-		initrd_len = ( ( image->len + 0x0f ) & ~0x0f );
189
+		initrd_len = ( ( initrd->len + 0x0f ) & ~0x0f );
190 190
 		total_len += initrd_len;
191 191
 	}
192 192
 
193
+	/* Give up if no initrd images found */
193 194
 	if ( ! total_len )
194 195
 		return 0;
195 196
 
@@ -225,7 +226,7 @@ static int bzimage_load_initrd ( struct image *image,
225 226
 	for_each_image ( initrd ) {
226 227
 		if ( initrd->type != &initrd_image_type )
227 228
 			continue;
228
-		initrd_len = ( ( image->len + 0x0f ) & ~0x0f );
229
+		initrd_len = ( ( initrd->len + 0x0f ) & ~0x0f );
229 230
 		DBGC ( image, "bzImage %p has initrd %p at [%lx,%lx)\n",
230 231
 		       image, initrd, ( start + offset ),
231 232
 		       ( start + offset + initrd->len ) );

Loading…
Cancel
Save