summaryrefslogtreecommitdiffstats
path: root/src/analyse.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-07-20 07:43:29 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-07-20 07:43:29 +0200
commitfbdc01bbc359a38383ce36db1682e0db6c1f4046 (patch)
treec5face36f2cee2c5c049b2899e0e76e8ce81fd3d /src/analyse.c
parentfcb2816ea33817d6f23ec617c3336a2a74dc04d0 (diff)
Add detection of Vmware VMFS partition
Diffstat (limited to 'src/analyse.c')
-rw-r--r--src/analyse.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/analyse.c b/src/analyse.c
index b3c967d..269d814 100644
--- a/src/analyse.c
+++ b/src/analyse.c
@@ -53,6 +53,7 @@
#include "swap.h"
#include "sysv.h"
#include "ufs.h"
+#include "vmfs.h"
#include "xfs.h"
#include "zfs.h"
#include "log.h"
@@ -380,6 +381,26 @@ int search_type_128(unsigned char *buffer, disk_t *disk, partition_t *partition,
return 0;
}
+int search_type_2048(unsigned char *buffer, disk_t *disk, partition_t *partition, const int verbose, const int dump_ind)
+{
+ void *data;
+ if(verbose>2)
+ {
+ log_trace("search_type_2048 lba=%lu\n",
+ (long unsigned)(partition->part_offset/disk->sector_size));
+ }
+ data=disk->pread_fast(disk, buffer, 2*DEFAULT_SECTOR_SIZE, partition->part_offset + 2048 * 512);
+ if(data==NULL)
+ return -1;
+ {
+ const struct vmfs_volume *sb_vmfs=(const struct vmfs_volume *)data;
+ if(le32(sb_vmfs->magic)==0xc001d00d &&
+ recover_VMFS(disk, sb_vmfs, partition, verbose, dump_ind)==0)
+ return 1;
+ }
+ return 0;
+}
+
int check_linux(disk_t *disk, partition_t *partition, const int verbose)
{
if(check_JFS(disk, partition)==0 ||