]> granicus.if.org Git - sysstat/commitdiff
sadc/sar: New format (part 4): Update file_magic structure
authorSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 22 Sep 2017 12:18:12 +0000 (14:18 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 22 Sep 2017 12:18:12 +0000 (14:18 +0200)
Use integer type for upgraded field instead of unsigned char in
file_magic structure. Thus we are no longer limited to 15 for the
patchlevel and sublevel version numbers.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sa.h

diff --git a/sa.h b/sa.h
index 0f6b92ee782b8b61fc56214f94bf828cc9e9aaf3..0e2e6ab288fad00b79f73e2f8f17ba87b6eb0ac4 100644 (file)
--- a/sa.h
+++ b/sa.h
@@ -366,7 +366,7 @@ struct svg_hdr_parm {
 #define PREVIOUS_FORMAT_MAGIC  0x2173
 
 /* Padding in file_magic structure. See below. */
-#define FILE_MAGIC_PADDING     63
+#define FILE_MAGIC_PADDING     60
 
 /* Structure for file magic header data */
 struct file_magic {
@@ -392,10 +392,10 @@ struct file_magic {
        /*
         * Set to non zero if data file has been converted with "sadf -c" from
         * an old format (version x.y.z) to a newest format (version X.Y.Z).
-        * In this case, the value is: Y*16 + Z + 1.
+        * In this case, the value is: Y*256 + Z + 1.
         * The FORMAT_MAGIC value of the file can be used to determine X.
         */
-       unsigned char upgraded;
+       unsigned int upgraded;
        /*
         * Padding. Reserved for future use while avoiding a format change.
         */