]> wimlib.net Git - wimlib/blobdiff - src/integrity.c
util.h: gcc printf format attribute
[wimlib] / src / integrity.c
index 38a12ff59f046b88fff5730256ed9d8d918f0122..ade79f4808e77105b4cb24f844d0752c90b6c2ff 100644 (file)
@@ -4,23 +4,25 @@
  * WIM files can optionally contain an array of SHA1 message digests at the end,
  * one digest for each 1 MB of the file.  This file implements the checking of
  * the digests, and the writing of the digests for new WIM files.
- *
+ */
+
+/*
  * Copyright (C) 2012 Eric Biggers
  *
- * wimlib - Library for working with WIM files 
+ * This file is part of wimlib, a library for working with WIM files.
  *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option) any
- * later version.
+ * wimlib is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
  *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
  *
- * You should have received a copy of the GNU Lesser General Public License along
- * with this library; if not, write to the Free Software Foundation, Inc., 59
- * Temple Place, Suite 330, Boston, MA 02111-1307 USA 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with wimlib; if not, see http://www.gnu.org/licenses/.
  */
 
 #include "wimlib_internal.h"
@@ -249,7 +251,7 @@ int write_integrity_table(FILE *out, u64 end_header_offset,
        u32   integrity_table_size;
        int   ret;
 
-       DEBUG("Writing integrity table.\n");
+       DEBUG("Writing integrity table\n");
        if (fseeko(out, end_header_offset, SEEK_SET) != 0) {
                ERROR("Failed to seek to byte %"PRIu64" of WIM "
                                "to calculate integrity data: %m\n",
@@ -301,6 +303,7 @@ int write_integrity_table(FILE *out, u64 end_header_offset,
                        fflush(stdout);
                }
 
+
                size_t bytes_to_read = min(INTEGRITY_CHUNK_SIZE, bytes_remaining);
                size_t bytes_read = fread(chunk_buf, 1, bytes_to_read, out);
                if (bytes_read != bytes_to_read) {
@@ -319,7 +322,9 @@ int write_integrity_table(FILE *out, u64 end_header_offset,
                bytes_remaining -= bytes_read;
        }
        if (show_progress)
-               putchar('\n');
+               puts("Calculating integrity checksums for WIM "
+                               "(0 bytes remaining, 100% done)"
+                               "                       ");
 
        if (fseeko(out, 0, SEEK_END) != 0) {
                ERROR("Failed to seek to end of WIM to write integrity "