summaryrefslogtreecommitdiffstats
path: root/src/wbfs.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-01-23 10:26:09 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2016-01-23 10:26:09 +0100
commita3f6516f017477a74536d538827913779cff723e (patch)
treee07d153783da948217f3e3969a93aa4919e0d7e4 /src/wbfs.c
parentb07d180c499d3378a8c05b38b3df2ef9a87e7fcb (diff)
New prototype for test_WBFS()
Diffstat (limited to 'src/wbfs.c')
-rw-r--r--src/wbfs.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/wbfs.c b/src/wbfs.c
index 9241f17..046cc5f 100644
--- a/src/wbfs.c
+++ b/src/wbfs.c
@@ -35,12 +35,12 @@
#include "log.h"
#include "wbfs.h"
-static int test_WBFS(disk_t *disk, const struct wbfs_head *sb, partition_t *partition, const int dump_ind);
+static int test_WBFS(disk_t *disk, const struct wbfs_head *sb, const partition_t *partition, const int dump_ind);
-static int set_WBFS_info(partition_t *partition)
+static void set_WBFS_info(partition_t *partition)
{
+ partition->upart_type=UP_WBFS;
memcpy(partition->info,"WBFS",5);
- return 0;
}
int check_WBFS(disk_t *disk,partition_t *partition)
@@ -80,7 +80,7 @@ int recover_WBFS(disk_t *disk, const struct wbfs_head *sb, partition_t *partitio
return 0;
}
-static int test_WBFS(disk_t *disk, const struct wbfs_head *sb, partition_t *partition, const int dump_ind)
+static int test_WBFS(disk_t *disk, const struct wbfs_head *sb, const partition_t *partition, const int dump_ind)
{
if(be32(sb->magic)!=WBFS_MAGIC)
return 1;
@@ -93,8 +93,5 @@ static int test_WBFS(disk_t *disk, const struct wbfs_head *sb, partition_t *part
offset2sector(disk,partition->part_offset));
dump_log(sb,DEFAULT_SECTOR_SIZE);
}
- if(partition==NULL)
- return 0;
- partition->upart_type=UP_WBFS;
return 0;
}