aboutsummaryrefslogtreecommitdiff
path: root/makefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'makefs.c')
-rw-r--r--makefs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/makefs.c b/makefs.c
index 7d5b148..24d8f6c 100644
--- a/makefs.c
+++ b/makefs.c
@@ -38,6 +38,10 @@ int main(int argc, char **argv)
if (printf("%s", argv[i]) != name_size)
errx(-1, "error writing to stdout");
+ for (int j = 0; (j + (name_size & 0b11)) & 0b11; j++)
+ if (putchar('\0'))
+ errx(-1, "error writing to stdout");
+
if (fwrite(&file_size, 4, 1, stdout) != 1)
errx(-1, "error writing to stdout");
@@ -60,6 +64,10 @@ int main(int argc, char **argv)
if (!WIFEXITED(wstatus) || WEXITSTATUS(wstatus))
exit(-1);
}
+
+ for (int j = 0; (j + (file_size & 0b11)) & 0b11; j++)
+ if (putchar('\0'))
+ errx(-1, "error writing to stdout");
}
return 0;