summaryrefslogtreecommitdiffstats
path: root/src/log_part.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-15 13:53:12 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-15 13:53:12 +0200
commite2711613a26a931180264c077339acc1c8887918 (patch)
tree90bb514047b4ace440c82d539b81de527fa55510 /src/log_part.c
parentfd9c697a03a5501e326479192dad98e2d6fdb64e (diff)
New functions log_all_partitions() and init_list_part()
Diffstat (limited to 'src/log_part.c')
-rw-r--r--src/log_part.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/log_part.c b/src/log_part.c
index 5efd7de..dd60a68 100644
--- a/src/log_part.c
+++ b/src/log_part.c
@@ -31,14 +31,21 @@
#include "log_part.h"
#include "intrf.h" /* aff_part_aux */
-void log_partition(const disk_t *disk_car, const partition_t *partition)
+void log_partition(const disk_t *disk, const partition_t *partition)
{
const char *msg;
char buffer_part_size[100];
- msg=aff_part_aux(AFF_PART_ORDER|AFF_PART_STATUS, disk_car, partition);
+ msg=aff_part_aux(AFF_PART_ORDER|AFF_PART_STATUS, disk, partition);
log_info("%s",msg);
size_to_unit(partition->part_size, buffer_part_size);
if(partition->info[0]!='\0')
log_info("\n %s, %s", partition->info, buffer_part_size);
log_info("\n");
}
+
+void log_all_partitions(const disk_t *disk, const list_part_t *list_part)
+{
+ list_part_t *element;
+ for(element=list_part; element!=NULL; element=element->next)
+ log_partition(disk, element->part);
+}