[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bochs-cvs
Subject:    [Bochs-cvs] CVS: bochs/iodev Makefile.in, 1.69, 1.70 pciusb.cc, 1.50,
From:       Volker Ruppert <vruppert () users ! sourceforge ! net>
Date:       2007-03-18 17:52:17
Message-ID: E1HSzYH-0003dC-SJ () sc8-pr-cvs3 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/bochs/bochs/iodev
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13900/iodev

Modified Files:
	Makefile.in pciusb.cc 
Log Message:
- removed USB port option parameter and store device and option in one single
  string. This is better for devices that need to know all it's options when
  connecting to the port. Device name and option should be separated with a
  colon. The USB device 'disk' now uses this format ('disk:usbdisk.img).
- the pciusb plugin must be linked with cdrom.o


Index: Makefile.in
===================================================================
RCS file: /cvsroot/bochs/bochs/iodev/Makefile.in,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- Makefile.in	18 Mar 2007 11:17:28 -0000	1.69
+++ Makefile.in	18 Mar 2007 17:52:15 -0000	1.70
@@ -162,8 +162,8 @@
 libbx_vga.la: vga.lo svga_cirrus.lo
 	$(LIBTOOL) --mode=link $(CXX) -module vga.lo svga_cirrus.lo -o libbx_vga.la -rpath \
$(PLUGIN_PATH)  
-libbx_pciusb.la: pciusb.lo usb_msd.lo scsi_device.lo hdimage.lo
-	$(LIBTOOL) --mode=link $(CXX) -module pciusb.lo usb_msd.lo scsi_device.lo \
hdimage.lo -o libbx_pciusb.la -rpath $(PLUGIN_PATH) +libbx_pciusb.la: pciusb.lo \
usb_msd.lo scsi_device.lo hdimage.lo cdrom.lo +	$(LIBTOOL) --mode=link $(CXX) -module \
pciusb.lo usb_msd.lo scsi_device.lo hdimage.lo cdrom.lo -o libbx_pciusb.la -rpath \
$(PLUGIN_PATH)  
 #### building DLLs for win32  (tested on cygwin only)
 bx_%.dll: %.o
@@ -197,8 +197,8 @@
 bx_vga.dll: vga.o svga_cirrus.o
 	$(CXX) $(CXXFLAGS) -shared -o bx_vga.dll vga.o svga_cirrus.o \
$(WIN32_DLL_IMPORT_LIBRARY)  
-bx_pciusb.dll: pciusb.o usb_msd.o scsi_device.o hdimage.o
-	$(CXX) $(CXXFLAGS) -shared -o bx_pciusb.dll pciusb.o usb_msd.o scsi_device.o \
hdimage.o $(WIN32_DLL_IMPORT_LIBRARY) +bx_pciusb.dll: pciusb.o usb_msd.o \
scsi_device.o hdimage.o cdrom.o +	$(CXX) $(CXXFLAGS) -shared -o bx_pciusb.dll \
pciusb.o usb_msd.o scsi_device.o hdimage.o cdrom.o $(WIN32_DLL_IMPORT_LIBRARY)  
 ##### end DLL section
 

Index: pciusb.cc
===================================================================
RCS file: /cvsroot/bochs/bochs/iodev/pciusb.cc,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- pciusb.cc	18 Mar 2007 11:17:28 -0000	1.50
+++ pciusb.cc	18 Mar 2007 17:52:15 -0000	1.51
@@ -141,9 +141,7 @@
   }
 
   SIM->get_param_string(BXPN_USB1_PORT1)->set_handler(NULL);
-  SIM->get_param_string(BXPN_USB1_OPTION1)->set_handler(NULL);
   SIM->get_param_string(BXPN_USB1_PORT2)->set_handler(NULL);
-  SIM->get_param_string(BXPN_USB1_OPTION2)->set_handler(NULL);
 
   BX_DEBUG(("Exit"));
 }
@@ -178,12 +176,8 @@
 
   SIM->get_param_string(BXPN_USB1_PORT1)->set_handler(usb_param_handler);
   SIM->get_param_string(BXPN_USB1_PORT1)->set_runtime_param(1);
-  SIM->get_param_string(BXPN_USB1_OPTION1)->set_handler(usb_param_handler);
-  SIM->get_param_string(BXPN_USB1_OPTION1)->set_runtime_param(1);
   SIM->get_param_string(BXPN_USB1_PORT2)->set_handler(usb_param_handler);
   SIM->get_param_string(BXPN_USB1_PORT2)->set_runtime_param(1);
-  SIM->get_param_string(BXPN_USB1_OPTION2)->set_handler(usb_param_handler);
-  SIM->get_param_string(BXPN_USB1_OPTION2)->set_runtime_param(1);
 
   //HACK: Turn on debug messages from the start
   //BX_USB_THIS setonoff(LOGLEV_DEBUG, ACT_REPORT);
@@ -404,7 +398,7 @@
     type = USB_DEV_TYPE_KEYPAD;
     connected = 1;
     BX_USB_THIS keyboard_connected = 1;
-  } else if (!strcmp(devname, "disk")) {
+  } else if (!strncmp(devname, "disk:", 5)) {
     type = USB_DEV_TYPE_DISK;
     connected = 1;
     BX_USB_THIS hub[0].usb_port[port].device = new usb_msd_device_t();
@@ -1738,6 +1732,7 @@
 void bx_pciusb_c::usb_set_connect_status(Bit8u port, int type, bx_bool connected)
 {
   char pname[BX_PATHNAME_LEN];
+  char fname[BX_PATHNAME_LEN];
 
   if (BX_USB_THIS hub[0].usb_port[port].device != NULL) {
     if (BX_USB_THIS hub[0].usb_port[port].device->get_type() == type) {
@@ -1770,14 +1765,15 @@
         if ((type == USB_DEV_TYPE_DISK) &&
             (!BX_USB_THIS hub[0].usb_port[port].device->get_connected())) {
           if (port == 0) {
-            strcpy(pname, BXPN_USB1_OPTION1);
+            strcpy(pname, BXPN_USB1_PORT1);
           } else {
-            strcpy(pname, BXPN_USB1_OPTION2);
+            strcpy(pname, BXPN_USB1_PORT2);
           }
-          if (!((usb_msd_device_t*)BX_USB_THIS \
hub[0].usb_port[port].device)->init(SIM->get_param_string(pname)->getptr())) { +      \
strcpy(fname, SIM->get_param_string(pname)->getptr() + 5); +          if \
(!((usb_msd_device_t*)BX_USB_THIS hub[0].usb_port[port].device)->init(fname)) {  \
usb_set_connect_status(port, USB_DEV_TYPE_DISK, 0);  } else {
-            BX_INFO(("HD on USB port #%d: '%s'", port+1, \
SIM->get_param_string(pname)->getptr())); +            BX_INFO(("HD on USB port #%d: \
'%s'", port+1, fname));  }
         }
       } else {
@@ -2158,8 +2154,6 @@
       } else if (strcmp(val, "none") && !BX_USB_THIS hub[0].usb_port[0].status) {
         init_device(0, val);
       }
-    } else if (!strcmp(pname, BXPN_USB1_OPTION1)) {
-      BX_ERROR(("USB port #1 option change not implemented yet"));
     } else if (!strcmp(pname, BXPN_USB1_PORT2)) {
       BX_INFO(("USB port #2 experimental device change"));
       if (!strcmp(val, "none") && BX_USB_THIS hub[0].usb_port[1].status) {
@@ -2172,8 +2166,6 @@
       } else if (strcmp(val, "none") && !BX_USB_THIS hub[0].usb_port[1].status) {
         init_device(1, val);
       }
-    } else if (!strcmp(pname, BXPN_USB1_OPTION2)) {
-      BX_ERROR(("USB port #2 option change not implemented yet"));
     } else {
       BX_PANIC(("usb_param_handler called with unexpected parameter '%s'", pname));
     }


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bochs-cvs mailing list
Bochs-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic