About DosPacket "ACTION_CURRENT_VOLUME" (Solved)

2 posts / 0 new
Last post
OldFart
OldFart's picture
Offline
Last seen: 1 hour 22 min ago
Joined: 2010-11-30 14:09
About DosPacket "ACTION_CURRENT_VOLUME" (Solved)

Hi,

According to "dos/extents.h" "ACTION_CURRENT_VOLUME" is deprecated. Ok, but what exactly did it return and what is the alternative/OS4.0 way of obtaining that same info?

Regards
OldFart

OldFart
OldFart's picture
Offline
Last seen: 1 hour 22 min ago
Joined: 2010-11-30 14:09
Re: About DosPacket "ACTION_CURRENT_VOLUME" (Solved)

Hi,

I may have solved this puzzle by invoking IDOS->FindDosEntry(). Results are looking good

Part of the code applied:

  1. struct VolumeNode *VN;
  2.  
  3. (__PD)->pd_DosList = IDOS->LockDosList(LDF_DEVICES | LDF_VOLUMES | LDF_READ);
  4.  
  5. while (((__PD)->pd_DosList = IDOS->NextDosEntry((__PD)->pd_DosList, LDF_DEVICES)) != NULL)
  6. {
  7. if (
  8. ((__DN)->dn_Startup != ZERO) &&
  9. ((__DN)->dn_Port != NULL) &&
  10. ((VN =(struct VolumeNode *)IDOS->FindDosEntry((__PD)->pd_DosList, (CONST_STRPTR)_CSTR((__DN)->dn_Name), LDF_VOLUMES)) != NULL)
  11. )
  12. {
  13. /*
  14.   ** Perform further madzjiq here...
  15.   */
  16. }
  17. }
  18.  
  19. IDOS->UnLockDosList(LDF_DEVICES | LDF_VOLUMES | LDF_READ);

OldFart

Log in or register to post comments