mounter: switch over to new mounter code

This commit is contained in:
Stefan Reinauer 2022-10-02 12:58:31 -07:00
parent 7fd13ff663
commit 05e5134ee9
5 changed files with 34 additions and 4 deletions

View File

@ -8,7 +8,7 @@ PROG := a4091.device
PROGU := a4091
PROGD := a4091d
SRCS := device.c version.c siop.c port.c attach.c cmdhandler.c printf.c
SRCS += sd.c scsipi_base.c scsiconf.c scsimsg.c rdb_partitions.c bootmenu.c
SRCS += sd.c scsipi_base.c scsiconf.c scsimsg.c mounter.c bootmenu.c
SRCS += romfile.c battmem.c
ASMSRCS := reloc.S baserel.S
SRCSU := a4091.c
@ -48,7 +48,7 @@ CFLAGS += -D_KERNEL -DPORT_AMIGA
#CFLAGS += -DDEBUG_SCSIMSG # Debug scsimsg.c
#CFLAGS += -DDEBUG_SD # Debug sd.c
#CFLAGS += -DDEBUG_SIOP # Debug siop.c
#CFLAGS += -DDEBUG_RDB # Debug rdb_partitions.c
#CFLAGS += -DDEBUG_MOUNTER # Debug mounter.c
#CFLAGS += -DDEBUG_BOOTMENU # Debug bootmenu.c
#CFLAGS += -DNO_SERIAL_OUTPUT # Turn off serial debugging for the whole driver

View File

@ -21,7 +21,7 @@
#include "device.h"
#include "cmdhandler.h"
#include "version.h"
#include "rdb_partitions.h"
#include "mounter.h"
#include "bootmenu.h"
#include "romfile.h"
#include "attach.h"

View File

@ -49,6 +49,7 @@
#include <proto/dos.h>
#include "ndkcompat.h"
#include "mounter.h"
#define TRACE 1
#define Trace printf
@ -938,3 +939,31 @@ LONG MountDrive(struct MountStruct *ms)
dbg("Exit code %"PRId32"\n", ret);
return ret;
}
int mount_drives(struct ConfigDev *cd, struct Library *dev)
{
extern char real_device_name[];
static BOOL mounted = FALSE;
struct MountStruct ms;
int i, ret = 0;
ULONG unitNum[] = { 7, 0, 1, 2, 3, 4, 5, 6 };
printf("Mounter:\n");
if (!mounted) {
ms.deviceName = real_device_name;
ms.unitNum = unitNum;
ms.creatorName = NULL;
ms.configDev = cd;
ms.SysBase = *(struct ExecBase **)4UL;
mounted = TRUE;
ret = MountDrive(&ms);
}
printf("ret = %x\nunitNum = { ", ret);
for (i=0; i<8; i++)
printf("%x%s", unitNum[i], i<7?", ":" }\n");
return ret;
}

View File

@ -6,4 +6,6 @@ void W_DeleteIORequest(APTR iorequest, struct ExecBase *SysBase);
struct MsgPort *W_CreateMsgPort(struct ExecBase *SysBase);
void W_DeleteMsgPort(struct MsgPort *port, struct ExecBase *SysBase);
int mount_drives(struct ConfigDev *cd, struct Library *dev);
#endif

1
port.h
View File

@ -91,7 +91,6 @@ void *device_private(device_t dev);
!defined(DEBUG_SCSIMSG) && \
!defined(DEBUG_SD) && \
!defined(DEBUG_SIOP) && \
!defined(DEBUG_RDB) && \
!defined(DEBUG_BOOTMENU) && \
!defined(DEBUG_MOUNTER)) || defined(NO_SERIAL_OUTPUT)
#ifdef USE_SERIAL_OUTPUT