I need to upgrade a function in a project I'm working on to AmigaOS 4.
This is the old code.
static BOOL OnSameVolume(STRPTR fname1, STRPTR fname2)
{
struct InfoData __aligned idata;
struct DeviceList *dlist1, *dlist2;
BPTR lock;
dlist1 = dlist2 = NULL;
if (lock = Lock(fname1, ACCESS_READ)) {
if (Info(lock, &idata))
dlist1 = BADDR(idata.id_VolumeNode);
UnLock(lock);
}
if (lock = Lock(fname2, ACCESS_READ)) {
if (Info(lock, &idata))
dlist2 = BADDR(idata.id_VolumeNode);
UnLock(lock);
}
if (dlist1 && dlist2)
return((BOOL)(dlist1->dl_Task == dlist2->dl_Task && dlist1->dl_Name == dlist2->dl_Name));
else
return(FALSE);
}
as struct DeviceList is now in dos/obsolete.h I'm wonder what the correct way to do the above is under AmigaOS 4?