diff --git a/Core/Disk.cpp b/Core/Disk.cpp index a038a54..744fb4a 100644 --- a/Core/Disk.cpp +++ b/Core/Disk.cpp @@ -88,7 +88,7 @@ namespace Disk // why there is NUL (\0) between every char????? char PartName[72]; memcpy(PartName, GPTPartition.Label, 72); - for (char i = 0; i < 72; i++) + for (int i = 0; i < 72; i++) if (PartName[i] == '\0') PartName[i] = ' '; PartName[71] = '\0'; diff --git a/include/disk.hpp b/include/disk.hpp index 0419eb8..89f3219 100644 --- a/include/disk.hpp +++ b/include/disk.hpp @@ -90,12 +90,12 @@ namespace Disk uint64_t EndLBA = 0xdeadbeef; uint64_t Sectors = 0xdeadbeef; uint64_t Flags = 0xdeadbeef; - unsigned char Port = 0xdeadbeef; + unsigned char Port = 0; PartitionStyle Style = PartitionStyle::Unknown; size_t Index = 0; - uint64_t Read(uint64_t Offset, uint64_t Count, uint8_t *Buffer) {} - uint64_t Write(uint64_t Offset, uint64_t Count, uint8_t *Buffer) {} + uint64_t Read(uint64_t Offset, uint64_t Count, uint8_t *Buffer) {return 0;} + uint64_t Write(uint64_t Offset, uint64_t Count, uint8_t *Buffer) {return 0;} Partition() {} ~Partition() {} }; @@ -111,8 +111,8 @@ namespace Disk bool MechanicalDisk = false; uint64_t UniqueIdentifier = 0xdeadbeef; - uint64_t Read(uint64_t Offset, uint64_t Count, uint8_t *Buffer) {} - uint64_t Write(uint64_t Offset, uint64_t Count, uint8_t *Buffer) {} + uint64_t Read(uint64_t Offset, uint64_t Count, uint8_t *Buffer) {return 0;} + uint64_t Write(uint64_t Offset, uint64_t Count, uint8_t *Buffer) {return 0;} Drive() { // TODO: Allocate buffer }