Question about struct DiskObject

2 posts / 0 new
Last post
OldFart
OldFart's picture
Offline
Last seen: 19 hours 45 min ago
Joined: 2010-11-30 14:09
Question about struct DiskObject

Hi,

When I apply IIcon->GetDiskObject() or IIcon->GetDiskObjectNew(), I *MAY* get a valid pointer to a struct DiskObject (or not in case of a failure).
How can I figure out from that struct DiskObject whether there was indeed a valid '.info'-file present (GetDiskObject() was successfull), or there was no '.info'-file present (GetDiskObject() failed, but GetDiskObjectNew() was succesfull)?

OldFart

jabirulo
jabirulo's picture
Offline
Last seen: 1 day 39 min ago
Joined: 2013-05-30 00:53
Re: Question about struct DiskObject

If you get a valid struct DiskObject then you can check some of its do_#? values, maybe do_Magic (WB_DISKMAGIC 0xe310 /* a magic number, not easily impersonated */)

Taken from autodocs:

GetDiskObjectNew()
...
This call is functionally identical to GetDiskObject() with one exception. If its call to GetDiskObject() fails, this function calls GetDefDiskObject().
---

GetDefDiskObject()
...
This routine reads in a default Workbench disk object from disk. The valid def_types can be found in workbench/workbench.h and...

AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonRX550/SSD240GB/DVDRW :-P

Log in or register to post comments