goto out;
}
- fd_dst = open(dst, O_WRONLY | O_CREAT, 0666);
+ fd_dst = open(dst, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd_dst < 0) {
printf("Can't open file %s (%s)\n", dst, strerror(errno));
goto out;
return ret;
}
+
+void summary_show(struct image_summary *summary, const char *imagefile,
+ const char *keydest)
+{
+ if (summary->sig_offset) {
+ printf("Signature written to '%s', node '%s'\n", imagefile,
+ summary->sig_path);
+ if (keydest) {
+ printf("Public key written to '%s', node '%s'\n",
+ keydest, summary->keydest_path);
+ }
+ }
+}