summaryrefslogtreecommitdiffstats
path: root/src/parti386.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-11-10 08:12:15 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2008-11-10 08:12:15 +0100
commit3707225caf554891fed4261fef74441e9bd74345 (patch)
tree8be6284afd61cb8619cf2cefd94b18b07eaae77a /src/parti386.c
parent630a6ef2d6d2daf654cfe5aac9c39b78b275b70e (diff)
Defined more functions as static
Diffstat (limited to 'src/parti386.c')
-rw-r--r--src/parti386.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/parti386.c b/src/parti386.c
index 74f352d..b0d97a1 100644
--- a/src/parti386.c
+++ b/src/parti386.c
@@ -50,6 +50,7 @@
#include "hfsp.h"
#include "jfs_superblock.h"
#include "jfs.h"
+#include "luks.h"
#include "lvm.h"
#include "md.h"
#include "netware.h"
@@ -120,6 +121,7 @@ static const char* errmsg_i386_entry2partition(const errcode_type_t errcode);
static const char *get_partition_typename_i386(const partition_t *partition);
static const char *get_partition_typename_i386_aux(const unsigned int part_type_i386);
static unsigned int get_part_type_i386(const partition_t *partition);
+static uint64_t C_H_S2offset(const disk_t *disk_car,const unsigned int C, const unsigned int H, const unsigned int S);
static const struct systypes i386_sys_types[] = {
{P_NO_OS, "No partition"},
@@ -238,6 +240,12 @@ arch_fnct_t arch_i386= {
.get_part_type=get_part_type_i386
};
+static uint64_t C_H_S2offset(const disk_t *disk_car,const unsigned int C, const unsigned int H, const unsigned int S)
+{
+ return (((uint64_t)C * disk_car->geom.heads_per_cylinder + H) *
+ disk_car->geom.sectors_per_head + S - 1) * disk_car->sector_size;
+}
+
static unsigned int get_part_type_i386(const partition_t *partition)
{
return partition->part_type_i386;
@@ -1651,6 +1659,10 @@ static int check_part_i386(disk_t *disk_car,const int verbose,partition_t *parti
ret=check_xfs(disk_car,partition,verbose);
}
if(ret!=0)
+ {
+ ret=check_LUKS(disk_car,partition,verbose);
+ }
+ if(ret!=0)
{ screen_buffer_add("No EXT2, JFS, Reiser, cramfs or XFS marker\n"); }
break;
case P_LINSWAP: