diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-25 10:49:12 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-25 10:50:46 +0100 |
| commit | 59dbe4cffc7c633709ef8b45f49c46daf7f74e92 (patch) | |
| tree | 3047ae19e5b44883f68958d6052393306884f8fe /public/tools | |
| parent | dfe23f4918131dcf9b2c1459f3e36e93d3e79225 (diff) | |
cli(diutil): FIX: fill DI_DISK_IMAGE with the retrieved fields.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'public/tools')
| -rw-r--r-- | public/tools/diutil/CommandLine.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/public/tools/diutil/CommandLine.cc b/public/tools/diutil/CommandLine.cc index 22c1616c..c0388611 100644 --- a/public/tools/diutil/CommandLine.cc +++ b/public/tools/diutil/CommandLine.cc @@ -8,7 +8,6 @@ ------------------------------------------- */ #include <DiskImage.fwrk/headers/DiskImage.h> -#include <NewKit/Defines.h> static const Char kDiskName[kDIDiskNameLen] = "Disk"; static SInt32 kDiskSectorSz = 512; @@ -53,7 +52,17 @@ int main(int argc, char** argv) } } + // create disk image. + DI_DISK_IMAGE img{}; + img.disk_sz = kDiskSz; + img.sector_sz = kDiskSectorSz; + img.block_cnt = 0; + + MmCopyMemory((VoidPtr)img.disk_name, (VoidPtr)kDiskName, kDIDiskNameLen); + MmCopyMemory((VoidPtr)img.out_name, (VoidPtr)kOutDisk, kDIDiskNameLen); + + // format disk image. return DIFormatPartitionEPM(img); }
\ No newline at end of file |
