From 52fa7c68ec95409552bb2a21e079075229fcb144 Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 14 Oct 2014 18:07:54 +0000 Subject: [PATCH] Find a matching filesystem in FileSystem.resource by handler name rather than by DOS type if possible. Previously, even though the default diskimage.device mountfiles for virtual CD drives specify cdrom-handler, they ended up being given afs-handler based on their default "DOS0" DOS type. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@49705 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- workbench/c/Mount.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/workbench/c/Mount.c b/workbench/c/Mount.c index fc4686bd07..0552021205 100644 --- a/workbench/c/Mount.c +++ b/workbench/c/Mount.c @@ -1,5 +1,5 @@ /* - (C) 1995-2012 The AROS Development Team + (C) 1995-2014 The AROS Development Team (C) 2002-2005 Harry Sintonen (C) 2005-2007 Pavel Fedin $Id$ @@ -1295,6 +1295,7 @@ struct FileSysEntry *GetFileSysEntry(ULONG DosType) struct FileSysResource *MyFileSysRes; struct FileSysEntry *MyFileSysEntry; struct FileSysEntry *CurrentFileSysEntry; + BOOL Matched; MyFileSysEntry = NULL; MyFileSysRes = OpenResource(FSRNAME); @@ -1304,7 +1305,12 @@ struct FileSysEntry *GetFileSysEntry(ULONG DosType) CurrentFileSysEntry = (struct FileSysEntry*) MyFileSysRes->fsr_FileSysEntries.lh_Head; while (CurrentFileSysEntry->fse_Node.ln_Succ) { - if (CurrentFileSysEntry->fse_DosType == DosType) + if (HandlerString != NULL) + Matched = strcmp(HandlerString + BSTR_OFFSET, + AROS_BSTR_ADDR(CurrentFileSysEntry->fse_Handler)) == 0; + else + Matched = CurrentFileSysEntry->fse_DosType == DosType; + if (Matched) { if (MyFileSysEntry) { -- 2.11.4.GIT