print block info

This commit is contained in:
Laurent Vivier 2004-12-13 02:01:43 +00:00
parent 7d3526ce23
commit 9695ef4eb5
2 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,7 @@ static __attribute__((used)) char* rcsid = "$CVSHeader$";
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
@ -63,11 +64,14 @@ int emile_first_set_param_scsi(int fd, char *second_name)
*count = container->blocks[i].count;
if (container->blocks[i].count == 0)
break;
printf("(%d, %d) ", container->blocks[i].offset,
container->blocks[i].count);
current -= 4;
offset = (long*)(&first[current]);
*offset = container->blocks[i].offset;
(*second_size) += container->blocks[i].count;
}
putchar('\n');
/* mark end of blocks list */
current -= 2;
count = (short*)(&first[current]);

View File

@ -74,9 +74,13 @@ int emile_second_set_kernel_scsi(int fd, char *kernel_name)
{
if (container->blocks[i].count == 0)
break;
printf("(%d, %d) ", container->blocks[i].offset,
container->blocks[i].count);
kernel_image_size += container->blocks[i].count;
}
putchar('\n');
kernel_image_size *= container->block_size;
printf("kernel image size: %ld\n", kernel_image_size);
ret = lseek(fd, container_offset, SEEK_SET);
if (ret != container_offset)