Example #1
0
 /*
  * CTOR - Creates FATBootSector and Calculates Partition Cluster Start LBA
  *
  */
 public Partition(byte[] bootSectorBytes, HardDrive hdd, PartitionTableEntry entry)
 {
     if (entry.TypeCode == 0x0B || entry.TypeCode == 0x0C)
     {
         bootSector = new FATBootSector(bootSectorBytes);
         //Partition cluster starts immediately following both FAT's
         clusterBeginLBA = entry.LBA_Begin1 + bootSector.BPB.ReservedSectors + (bootSector.BPB.NumOfFATs * bootSector.BPB.SectorsPerFAT32);
         fatBeginLBA = entry.LBA_Begin1 + bootSector.BPB.ReservedSectors;
     }
     this.hdd = hdd;
     this.entry = entry;
 }
Example #2
0
 /*
  * CTOR - Creates FATBootSector and Calculates Partition Cluster Start LBA
  *
  */
 public Partition(byte[] bootSectorBytes, HardDrive hdd, PartitionTableEntry entry)
 {
     if (entry.TypeCode == 0x0B || entry.TypeCode == 0x0C)
     {
         bootSector = new FATBootSector(bootSectorBytes);
         //Partition cluster starts immediately following both FAT's
         clusterBeginLBA = entry.LBA_Begin1 + bootSector.BPB.ReservedSectors + (bootSector.BPB.NumOfFATs * bootSector.BPB.SectorsPerFAT32);
         fatBeginLBA     = entry.LBA_Begin1 + bootSector.BPB.ReservedSectors;
     }
     this.hdd   = hdd;
     this.entry = entry;
 }