[PATCH 2/3] Add snappy supporting flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: HATAYAMA Daisuke <d.hatayama at jp.fujitsu.com>
---
 defs.h     |    1 +
 diskdump.c |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/defs.h b/defs.h
index caa87c0..8eebc52 100755
--- a/defs.h
+++ b/defs.h
@@ -283,6 +283,7 @@ struct number_option {
 #define DUMPFILE_SPLIT      (0x10)
 #define NO_ELF_NOTES        (0x20)
 #define LZO_SUPPORTED       (0x40)
+#define SNAPPY_SUPPORTED    (0x80)
 #define DISKDUMP_VALID()    (dd->flags & DISKDUMP_LOCAL)
 #define KDUMP_CMPRS_VALID() (dd->flags & KDUMP_CMPRS_LOCAL)
 #define KDUMP_SPLIT()       (dd->flags & DUMPFILE_SPLIT)
diff --git a/diskdump.c b/diskdump.c
index d80eea4..4d194c5 100644
--- a/diskdump.c
+++ b/diskdump.c
@@ -682,6 +682,10 @@ is_diskdump(char *file)
 		dd->flags |= LZO_SUPPORTED;
 #endif
 
+#ifdef SNAPPY
+	dd->flags |= SNAPPY_SUPPORTED;
+#endif
+
 	return TRUE;
 }
 
@@ -1309,6 +1313,8 @@ __diskdump_memory_dump(FILE *fp)
 		fprintf(fp, "%sNO_ELF_NOTES", others++ ? "|" : "");
 	if (dd->flags & LZO_SUPPORTED)
 		fprintf(fp, "%sLZO_SUPPORTED", others++ ? "|" : "");
+	if (dd->flags & SNAPPY_SUPPORTED)
+		fprintf(fp, "%sSNAPPY_SUPPORTED", others++ ? "|" : "");
         fprintf(fp, ") %s\n", FLAT_FORMAT() ? "[FLAT]" : "");
         fprintf(fp, "               dfd: %d\n", dd->dfd);
         fprintf(fp, "               ofp: %lx\n", (ulong)dd->ofp);
-- 
1.7.7.6

-------------- next part --------------

[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux