[haiku-commits] r36515 - in haiku/trunk: headers/os/drivers/tty src/add-ons/kernel/drivers/ports/pc_serial

  • From: revol@xxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 28 Apr 2010 11:58:19 +0200 (CEST)

Author: mmu_man
Date: 2010-04-28 11:58:18 +0200 (Wed, 28 Apr 2010)
New Revision: 36515
Changeset: http://dev.haiku-os.org/changeset/36515/haiku
Ticket: http://dev.haiku-os.org/ticket/5754

Modified:
   haiku/trunk/headers/os/drivers/tty/ttylayer.h
   haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp
   haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h
Log:
Fix #5754 so at least the driver builds. It is not yet usable since we do not 
have a tty manager. For now it should be possible to get the BeOS one to work 
in Haiku though, but it's not tested.


Modified: haiku/trunk/headers/os/drivers/tty/ttylayer.h
===================================================================
--- haiku/trunk/headers/os/drivers/tty/ttylayer.h       2010-04-28 04:50:09 UTC 
(rev 36514)
+++ haiku/trunk/headers/os/drivers/tty/ttylayer.h       2010-04-28 09:58:18 UTC 
(rev 36515)
@@ -28,6 +28,7 @@
        bool    bg;
        bool    locked;
 };
+#define ddbackground(d) ((d)->bg = true)
 
 
 typedef bool (*tty_service_func)(struct tty *tty, struct ddrover *rover, uint 
op);

Modified: haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp   
2010-04-28 04:50:09 UTC (rev 36514)
+++ haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp   
2010-04-28 09:58:18 UTC (rev 36515)
@@ -26,8 +26,11 @@
 config_manager_for_driver_module_info *gConfigManagerModule = NULL;
 isa_module_info *gISAModule = NULL;
 pci_module_info *gPCIModule = NULL;
-//XXX: ifndef __HAIKU__
+#ifdef __HAIKU__
+tty_module_info *gTTYModule = NULL;
+#else
 tty_module_info_v1_bone *gTTYModule = NULL;
+#endif
 struct ddomain gSerialDomain;
 sem_id gDriverLock = -1;
 bool gHandleISA = false;
@@ -842,7 +845,7 @@
 
 
 /* pc_serial_open - handle open() calls */
-static status_t
+status_t
 pc_serial_open(const char *name, uint32 flags, void **cookie)
 {
        TRACE_FUNCALLS("> pc_serial_open(%s, 0x%08x, 0x%08x)\n", name, flags, 
cookie);
@@ -863,7 +866,7 @@
 
 
 /* pc_serial_read - handle read() calls */
-static status_t
+status_t
 pc_serial_read(void *cookie, off_t position, void *buffer, size_t *numBytes)
 {
        TRACE_FUNCALLS("> pc_serial_read(0x%08x, %Ld, 0x%08x, %d)\n", cookie,
@@ -874,7 +877,7 @@
 
 
 /* pc_serial_write - handle write() calls */
-static status_t
+status_t
 pc_serial_write(void *cookie, off_t position, const void *buffer,
        size_t *numBytes)
 {
@@ -886,7 +889,7 @@
 
 
 /* pc_serial_control - handle ioctl calls */
-static status_t
+status_t
 pc_serial_control(void *cookie, uint32 op, void *arg, size_t length)
 {
        TRACE_FUNCALLS("> pc_serial_control(0x%08x, 0x%08x, 0x%08x, %d)\n",
@@ -898,7 +901,7 @@
 
 #if defined(B_BEOS_VERSION_DANO) || defined(__HAIKU__)
 /* pc_serial_select - handle select start */
-static status_t
+status_t
 pc_serial_select(void *cookie, uint8 event, uint32 ref, selectsync *sync)
 {
        TRACE_FUNCALLS("> pc_serial_select(0x%08x, 0x%08x, 0x%08x, %p)\n",
@@ -909,7 +912,7 @@
 
 
 /* pc_serial_deselect - handle select exit */
-static status_t
+status_t
 pc_serial_deselect(void *cookie, uint8 event, selectsync *sync)
 {
        TRACE_FUNCALLS("> pc_serial_deselect(0x%08x, 0x%08x, %p)\n",
@@ -921,7 +924,7 @@
 
 
 /* pc_serial_close - handle close() calls */
-static status_t
+status_t
 pc_serial_close(void *cookie)
 {
        TRACE_FUNCALLS("> pc_serial_close(0x%08x)\n", cookie);
@@ -931,7 +934,7 @@
 
 
 /* pc_serial_free - called after last device is closed, and all i/o complete. 
*/
-static status_t
+status_t
 pc_serial_free(void *cookie)
 {
        TRACE_FUNCALLS("> pc_serial_free(0x%08x)\n", cookie);

Modified: haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h
===================================================================
--- haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h     
2010-04-28 04:50:09 UTC (rev 36514)
+++ haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h     
2010-04-28 09:58:18 UTC (rev 36515)
@@ -191,8 +191,11 @@
 extern config_manager_for_driver_module_info *gConfigManagerModule;
 extern isa_module_info *gISAModule;
 extern pci_module_info *gPCIModule;
-//extern tty_module_info *gTTYModule;
+#ifdef __HAIKU__
+extern tty_module_info *gTTYModule;
+#else
 extern tty_module_info_v1_bone *gTTYModule;
+#endif
 extern struct ddomain gSerialDomain;
 
 extern "C" {


Other related posts:

  • » [haiku-commits] r36515 - in haiku/trunk: headers/os/drivers/tty src/add-ons/kernel/drivers/ports/pc_serial - revol