internal EBRPartition(IBMPartitionInformation info, EBR ebr) { Ebr = ebr; Start = info.StartLBA; Length = info.LengthLBA; //Identifier = info.PartitionType; blockDev = ebr.blockdevice; }
internal MBRPartition(IBMPartitionInformation info, MBR mbr) { Mbr = mbr; Start = info.StartLBA; Length = info.LengthLBA; //Identifier = info.PartitionType; blockDev = mbr.blockdevice; }
/* public static void Initialise(){ * for (int i = 0; i < Cosmos.Hardware2.Device.Devices.Count; i++){ * Device d = Cosmos.Hardware2.Device.Devices[i]; * if (d is Disk){ * MBR mbr = new MBR(d as Disk); * if (mbr.IsValid()) * Cosmos.Hardware2.Device.Devices.Add(mbr); * } * } * }*/ internal MBR(BlockDevice bd) { this.blockdevice = bd; this.Partitions = new IBMPartitionInformation[4]; this.Partitions[0] = new IBMPartitionInformation(this, 0); this.Partitions[1] = new IBMPartitionInformation(this, 1); this.Partitions[2] = new IBMPartitionInformation(this, 2); this.Partitions[3] = new IBMPartitionInformation(this, 3); Refresh(); }
internal MBR(string drivePath) { this.drivePath = drivePath; this.blockdevice = new BlockDevice(this.drivePath); }