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

Loading…
Cancel
Save