summaryrefslogtreecommitdiff
path: root/tools/firmware-utils/src/mktplinkfw-lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/firmware-utils/src/mktplinkfw-lib.c')
-rw-r--r--tools/firmware-utils/src/mktplinkfw-lib.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/firmware-utils/src/mktplinkfw-lib.c b/tools/firmware-utils/src/mktplinkfw-lib.c
index 18da13d..b2b6de2 100644
--- a/tools/firmware-utils/src/mktplinkfw-lib.c
+++ b/tools/firmware-utils/src/mktplinkfw-lib.c
@@ -236,19 +236,13 @@ int build_fw(size_t header_size)
goto out_free_buf;
if (!combined) {
- if (rootfs_align)
- p = buf + writelen;
- else
- p = buf + rootfs_ofs;
+ p = buf + rootfs_ofs;
ret = read_to_buf(&rootfs_info, p);
if (ret)
goto out_free_buf;
- if (rootfs_align)
- writelen += rootfs_info.file_size;
- else
- writelen = rootfs_ofs + rootfs_info.file_size;
+ writelen = rootfs_ofs + rootfs_info.file_size;
if (add_jffs2_eof)
writelen = pad_jffs2(buf, writelen, layout->fw_max_len);