Beispiel #1
0
 internal EBRPartition(IBMPartitionInformation info, EBR ebr)
 {
     Ebr    = ebr;
     Start  = info.StartLBA;
     Length = info.LengthLBA;
     //Identifier = info.PartitionType;
     blockDev = ebr.blockdevice;
 }
Beispiel #2
0
 internal MBRPartition(IBMPartitionInformation info, MBR mbr)
 {
     Mbr    = mbr;
     Start  = info.StartLBA;
     Length = info.LengthLBA;
     //Identifier = info.PartitionType;
     blockDev = mbr.blockdevice;
 }
Beispiel #3
0
        /* 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();
        }
Beispiel #4
0
 internal MBR(string drivePath)
 {
     this.drivePath   = drivePath;
     this.blockdevice = new BlockDevice(this.drivePath);
 }