BOOL
GetAssigns(VOID)
{
BOOL Success=TRUE;
struct Node *node;
struct List *ADOList;
struct DevProc *dp=NULL, *dp2=NULL;
struct MsgPort *filesystemtask;
if ((ADOList=IDOS->AllocDosObjectTags(DOS_VOLUMELIST,
ADO_Type, LDF_ASSIGNS,
ADO_AddColon, TRUE,
TAG_END)))
{
for(node=IExec->GetHead(ADOList); node; node=IExec->GetSucc(node))
{
if (!(AssignsNode=(struct AssignsNode *)SAK_CreateGenericListNode(sizeof(struct AssignsNode),(STRPTR)"")))
{
SAK_EasyRequest(Objects[OID_WINDOW],MainWindow,RequesterTitle,REQIMAGE_WARNING,0,SAK_LocaleString(MSG_COULD_NOT_CREATE_EXEC_LIST_NODE),SAK_LocaleString(MSG_CONTINUE));
Success=FALSE;
break;
}
SAK_AddGenericListNode(MasterAssignsList,(struct Node *)AssignsNode,GLIST_BOTTOM);
IUtility->SNPrintf(AssignsNode->Name,128,"%s",node->ln_Name);
IUtility->SNPrintf(AssignsNode->UserData,128,"[Ass]%s",AssignsNode->Name);
// AssignsNode->IsMultiAssign=FALSE;
while ((dp=IDOS->GetDeviceProcFlags(node->ln_Name,dp,LDF_ALL)))
{
if (dp->dvp_Flags & DVPB_ASSIGNMENT)
{
IDOS->Printf("MultiAssign: %s\n",node->ln_Name);
// AssignsNode->IsMultiAssign=TRUE;
filesystemtask = IDOS->GetFileSysPort();
do
{
if ((dp2=IDOS->GetDeviceProcFlags(node->ln_Name,dp2,LDF_ALL)))
{
IDOS->SetFileSysPort(dp2->dvp_Port);
if ((IDOS->NameFromLock(dp2->dvp_Lock,Misc1Buffer,1024)))
{
IDOS->Printf("MultiAssign: %s -> %s\n",node->ln_Name,Misc1Buffer);
error=0;
}
else
error=IDOS->IoErr();
if (error != 0)
break;
}
} while (dp2 && (dp2->dvp_Flags & DVPF_MULTIASSIGN));
IDOS->SetFileSysPort(filesystemtask);
if (dp2)
{
IDOS->FreeDeviceProc(dp2);
dp2=NULL;
}
}
}
}
if (dp)
IDOS->FreeDeviceProc(dp);
IDOS->FreeDosObject(DOS_VOLUMELIST,ADOList);
}
return(Success);
}
Are the
filesystemtask = IDOS->GetFileSysPort();
and
IDOS->SetFileSysPort(dp2->dvp_Port);
and
IDOS->SetFileSysPort(filesystemtask);
necessary? It works without them.