Make the floppy driver buildable again... even under Haiku.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26050 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2008-06-20 22:58:15 +00:00
parent e65b3b4eac
commit 8942de6c0d
5 changed files with 38 additions and 36 deletions
@@ -1,32 +1,12 @@
SubDir HAIKU_TOP src add-ons kernel drivers arch x86 floppy ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders drivers kernel ;
KernelAddon floppy :
floppy.c
floppy_ctrl.c
device_icons.c
;
# Not ready for prime-time yet: R5 floppy driver replacement at the moment.
# KernelObjects
# floppy.c
# floppy_ctrl.c
# device_icons.c
# :
# -fno-pic -D_KERNEL_MODE
# ;
#
# KernelLd floppy :
# <$(SOURCE_GRIST)>floppy.o
# <$(SOURCE_GRIST)>floppy_ctrl.o
# <$(SOURCE_GRIST)>device_icons.o
# kernel.so
# :
# $(HAIKU_TOP)/src/kernel/ldscripts/$(TARGET_ARCH)/add-on.ld
# :
# -Bdynamic -shared
# :
# :
# drivers/dev/floppy
# ;
@@ -1,7 +1,9 @@
/*
* OpenBeOS floppy driver
* (c) 2003, OpenBeOS project.
* François Revol, [email protected]
* Copyright 2003-2008, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* François Revol <[email protected]>
*/
const char floppy_icon[] = {
@@ -1,7 +1,9 @@
/*
* OpenBeOS floppy driver
* (c) 2003, OpenBeOS project.
* François Revol, [email protected]
* Copyright 2003-2008, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* François Revol <[email protected]>
*/
/*
@@ -1,7 +1,9 @@
/*
* OpenBeOS floppy driver
* (c) 2003, OpenBeOS project.
* François Revol, revol@free.fr
* Copyright 2003-2008, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* François Revol <revol@free.fr>
*/
#ifndef _FLOPPY_H
@@ -10,7 +12,21 @@
#include <Drivers.h>
#include <ISA.h>
#include <KernelExport.h>
// TODO: switch to native lock.
#ifdef __HAIKU__
#include <lock.h>
typedef recursive_lock lock;
#define new_lock recursive_lock_init
#define free_lock recursive_lock_destroy
#define LOCK(l) recursive_lock_lock(&l);
#define UNLOCK(l) recursive_lock_unlock(&l);
#else
#ifndef _IMPEXP_KERNEL
#define _IMPEXP_KERNEL
#endif
#include "lock.h"
#endif
#define FLO "floppy: "
#if defined(DEBUG) && DEBUG > 0
@@ -1,7 +1,9 @@
/*
* OpenBeOS floppy driver
* (c) 2003, OpenBeOS project.
* François Revol, revol@free.fr
* Copyright 2003-2008, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* François Revol <revol@free.fr>
*/