diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2012-08-07 18:43:52 +0200 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2012-08-07 18:43:52 +0200 |
commit | ea52c0509aac90a6d97d84ecf076d65eb9514a40 (patch) | |
tree | 78fbb2b55d7a64d52fab6a643bbdb847e47e88d2 | |
parent | 01726cddc5424d6cf1a63fe68ba905eb05feef85 (diff) | |
download | 0xFFFF-ea52c0509aac90a6d97d84ecf076d65eb9514a40.tar.bz2 |
fiasco: remove align code (now handled by image_read)
-rw-r--r-- | src/fiasco2.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/fiasco2.c b/src/fiasco2.c index 5da202d..8888176 100644 --- a/src/fiasco2.c +++ b/src/fiasco2.c @@ -377,18 +377,7 @@ int fiasco_write_to_file(struct fiasco * fiasco, const char * file) { WRITE_OR_FAIL(fd, type, 12); /* image size */ - size = image->size; - - /* Align mmc image size */ - if ( image->type == IMAGE_MMC ) - size = ((size >> 8) + 1) << 8; - /* Align kernel image size */ - else if ( image->type == IMAGE_KERNEL ) - size = ((size >> 7) + 1) << 7; - - /* TODO: update hash after align */ - - size = htonl(size); + size = htonl(image->size); WRITE_OR_FAIL(fd, &size, 4); /* unknown */ @@ -462,19 +451,6 @@ int fiasco_write_to_file(struct fiasco * fiasco, const char * file) { WRITE_OR_FAIL(fd, buf, size); } - size = image->size; - - if ( image->type == IMAGE_MMC ) - size = ((image->size >> 8) + 1) << 8; - else if ( image->type == IMAGE_KERNEL ) - size = ((image->size >> 7) + 1) << 7; - - /* Align image if needed (fill with 0xff) */ - while ( size > image->size ) { - WRITE_OR_FAIL(fd, "\xff", 1); - --size; - } - image_list = image_list->next; } |