Displaying 3 results from an estimated 3 matches for "swap_imag".
Did you mean:
  swap_image
  
2006 Feb 05
1
Add swap support to fstype, second version
...ne BLOCK_SIZE 1024
 
+/* Swap needs the definition of block size */
+#include "swap_fs.h"
+
 static int gzip_image(const unsigned char *buf, unsigned long long *bytes)
 {
 	if (buf[0] == 037 && (buf[1] == 0213 || buf[1] == 0236)) {
@@ -182,6 +186,19 @@
 	return 0;
 }
 
+static int swap_image(const unsigned char *buf, unsigned long long *blocks)
+{
+	const struct swap_super_block *ssb =
+		(const struct swap_super_block *)buf;
+
+	if (!memcmp(ssb->magic, SWAP_MAGIC_1, SWAP_MAGIC_L) ||
+	    !memcmp(ssb->magic, SWAP_MAGIC_2, SWAP_MAGIC_L)) {
+		*blocks = 0;
+		return 1;
+	}
+	retu...
2006 Apr 18
0
[patch] fstype fix ext3 <-> lvm2 detection
...2_image	},
 	{ 1,		"minix",	minix_image	},
 	{ 8,		"reiserfs",	reiserfs_image	},
 	{ 64,		"reiserfs",	reiserfs_image	},
 	{ 32,		"jfs",		jfs_image	},
+	{ 0,		"lvm2",		lvm2_image	},
+	{ 1,		"lvm2",		lvm2_image	},
 	{ -1,		"swap",		swap_image	},
 	{ 0,		"",		NULL 		}
 };
2006 Jul 05
0
[PATCH] Do LUKS detection later in fstype
...{1, "minix", minix_image},
 	{8, "reiserfs", reiserfs_image},
 	{64, "reiserfs", reiserfs_image},
 	{32, "jfs", jfs_image},
+	{0, "luks", luks_image},
 	{0, "lvm2", lvm2_image},
 	{1, "lvm2", lvm2_image},
 	{-1, "swap", swap_image},