-struct cowdisk_header header;
-struct cowdisk_header2 header2;
-off_t disk_base, disk_limit;
-unsigned int granule_size;
-uint32_t l1dir[L1_SIZE];
-
-unsigned int cached_l2dir;
-uint32_t l2dir[L2_SIZE];
-
-size_t read_physical(int fd, off64_t offset, size_t length, void *buffer)
+static struct cowdisk_header header;
+static struct vmdisk_header header4;
+static off64_t disk_limit;
+static unsigned int granule_size;
+static uint32_t *l1dir;
+
+static unsigned int cached_l2dir;
+static uint32_t l2dir[L2_SIZE];
+
+static struct vmdk_prm {
+ uint32_t grain_table_size;
+ uint32_t sectors_per_grain;
+ uint32_t sectors_per_table;
+ uint32_t directory_size;
+} vdsk;
+
+static size_t read_physical(int fd, off64_t offset, size_t length, void *buffer)