Fix/finish modularization
[mapsector.git] / lib / 50_map_partition.sh
index 1e16873..c3d5886 100644 (file)
@@ -8,7 +8,7 @@ describe_partition()
     echo "    partition tables"
 }
 
-map_partition()
+do_partition()
 {
     # Step 1: Find partition to which this sector belongs
 
@@ -16,6 +16,8 @@ map_partition()
     local partstart
     local partsector
 
+    echo "# $device: partition table detected" 1>&2
+
     partdev="`fdisk -ul $device | awk -v sector="$sector" -F '[ *]+' '/^\// && !/Extended$/ && $2<=sector && $3>=sector {print $1,$2}'`" #`"
 
     if [ -z "$partdev" ]; then
@@ -33,6 +35,8 @@ map_partition()
 
     device="$partdev"
     sector="$partsector"
+
+    return 1
 }
 
 register_mapper "partition"