#include <stdlib.h>
#include <string.h>
#include <stdint.h>
-#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
#include <netinet/in.h>
+#include <inttypes.h>
#include "bcm_tag.h"
#include "imagetag_cmdline.h"
/* align the start if requested */
if (args->align_rootfs_flag)
rootfsoff = (rootfsoff % block_size) > 0 ? (((rootfsoff / block_size) + 1) * block_size) : rootfsoff;
+ else
+ rootfsoff = (rootfsoff % 4) > 0 ? (((rootfsoff / 4) + 1) * 4) : rootfsoff;
/* align the end */
rootfsend = rootfsoff + getlen(rootfsfile);
sprintf(tag.totalLength, "%lu", imagelen);
if (args->cfe_given) {
- sprintf(tag.cfeAddress, "%lu", flash_start);
+ sprintf(tag.cfeAddress, "%" PRIu32, flash_start);
sprintf(tag.cfeLength, "%lu", cfelen);
} else {
/* We don't include CFE */
}
if (args->altinfo_given) {
- strncpy(&tag.information1[0], args->altinfo_arg, ALTTAGINFO_LEN);
+ strncpy(tag.information1, args->altinfo_arg, TAGINFO1_LEN);
}
if (args->second_image_flag_given) {