mirror of
https://github.com/LIV2/a4091-software.git
synced 2025-12-05 22:12:44 +00:00
mounter: switch over to new mounter code
This commit is contained in:
parent
7fd13ff663
commit
05e5134ee9
4
Makefile
4
Makefile
@ -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
|
||||
|
||||
|
||||
2
device.c
2
device.c
@ -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"
|
||||
|
||||
29
mounter.c
29
mounter.c
@ -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;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user