[haiku-commits] r40786 - in haiku/trunk/src/add-ons/kernel: bus_managers/acpi bus_managers/firewire bus_managers/ide bus_managers/ps2 bus_managers/scsi ...

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 2 Mar 2011 19:49:02 +0100 (CET)

Author: korli
Date: 2011-03-02 19:49:02 +0100 (Wed, 02 Mar 2011)
New Revision: 40786
Changeset: http://dev.haiku-os.org/changeset/40786

Modified:
   haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.cpp
   haiku/trunk/src/add-ons/kernel/bus_managers/firewire/fwohci.cpp
   haiku/trunk/src/add-ons/kernel/bus_managers/ide/ide_sim.c
   haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_keyboard.cpp
   haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_standard_mouse.c
   haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_synaptics.c
   haiku/trunk/src/add-ons/kernel/bus_managers/scsi/devices.cpp
   haiku/trunk/src/add-ons/kernel/busses/scsi/ahci/ahci_sim.cpp
   haiku/trunk/src/add-ons/kernel/busses/scsi/usb/usb_scsi.c
   haiku/trunk/src/add-ons/kernel/generic/scsi_periph/io.cpp
Log:
changed ioctl hook return code when the opcode isn't supported.


Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.cpp   
2011-03-02 18:28:08 UTC (rev 40785)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.cpp   
2011-03-02 18:49:02 UTC (rev 40786)
@@ -268,7 +268,7 @@
 acpi_namespace_control(void* cookie, uint32 op, void* arg, size_t len)
 {
        dprintf("acpi_ns_dump: device_control\n");
-       return B_BAD_VALUE;
+       return B_DEV_INVALID_IOCTL;
 }
 
 

Modified: haiku/trunk/src/add-ons/kernel/bus_managers/firewire/fwohci.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/firewire/fwohci.cpp     
2011-03-02 18:28:08 UTC (rev 40785)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/firewire/fwohci.cpp     
2011-03-02 18:49:02 UTC (rev 40786)
@@ -394,7 +394,7 @@
                        err = EINVAL;
                break;
        default:
-               err = EINVAL;
+               err = ENOTTY;
                break;
        }
        return err;

Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ide/ide_sim.c
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/ide/ide_sim.c   2011-03-02 
18:28:08 UTC (rev 40785)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/ide/ide_sim.c   2011-03-02 
18:49:02 UTC (rev 40786)
@@ -750,7 +750,7 @@
                }
        }
 
-       return B_BAD_VALUE;
+       return B_DEV_INVALID_IOCTL;
 }
 
 

Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_keyboard.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_keyboard.cpp    
2011-03-02 18:28:08 UTC (rev 40785)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_keyboard.cpp    
2011-03-02 18:49:02 UTC (rev 40786)
@@ -508,7 +508,7 @@
 
                default:
                        INFO("ps2: invalid ioctl 0x%lx\n", op);
-                       return EINVAL;
+                       return B_DEV_INVALID_IOCTL;
        }
 }
 

Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_standard_mouse.c
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_standard_mouse.c        
2011-03-02 18:28:08 UTC (rev 40785)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_standard_mouse.c        
2011-03-02 18:49:02 UTC (rev 40786)
@@ -510,7 +510,7 @@
 
                default:
                        TRACE("ps2: ioctl unknown mouse opcode: %ld\n", op);
-                       return B_BAD_VALUE;
+                       return B_DEV_INVALID_IOCTL;
        }
 }
 

Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_synaptics.c
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_synaptics.c     
2011-03-02 18:28:08 UTC (rev 40785)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/ps2/ps2_synaptics.c     
2011-03-02 18:49:02 UTC (rev 40786)
@@ -767,7 +767,7 @@
 
                default:
                        TRACE("SYNAPTICS: unknown opcode: %ld\n", op);
-                       return B_BAD_VALUE;
+                       return B_DEV_INVALID_IOCTL;
        }
 }
 

Modified: haiku/trunk/src/add-ons/kernel/bus_managers/scsi/devices.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/scsi/devices.cpp        
2011-03-02 18:28:08 UTC (rev 40785)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/scsi/devices.cpp        
2011-03-02 18:49:02 UTC (rev 40786)
@@ -471,7 +471,7 @@
                        device->target_id, op, buffer, length);
        }
 
-       return B_BAD_VALUE;
+       return B_DEV_INVALID_IOCTL;
 }
 
 

Modified: haiku/trunk/src/add-ons/kernel/busses/scsi/ahci/ahci_sim.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/busses/scsi/ahci/ahci_sim.cpp        
2011-03-02 18:28:08 UTC (rev 40785)
+++ haiku/trunk/src/add-ons/kernel/busses/scsi/ahci/ahci_sim.cpp        
2011-03-02 18:49:02 UTC (rev 40786)
@@ -115,7 +115,7 @@
        size_t length)
 {
        TRACE("ahci_ioctl, cookie %p\n", cookie);
-       return B_BAD_VALUE;
+       return B_DEV_INVALID_IOCTL;
 }
 
 

Modified: haiku/trunk/src/add-ons/kernel/busses/scsi/usb/usb_scsi.c
===================================================================
--- haiku/trunk/src/add-ons/kernel/busses/scsi/usb/usb_scsi.c   2011-03-02 
18:28:08 UTC (rev 40785)
+++ haiku/trunk/src/add-ons/kernel/busses/scsi/usb/usb_scsi.c   2011-03-02 
18:49:02 UTC (rev 40786)
@@ -1165,7 +1165,7 @@
 module_ioctl(scsi_sim_cookie cookie, uint8 targetID, uint32 op, void *buffer, 
size_t length)
 {
        TRACE_ALWAYS("ioctl\n");
-       return B_ERROR;
+       return B_DEV_INVALID_IOCTL;
 }
 
 

Modified: haiku/trunk/src/add-ons/kernel/generic/scsi_periph/io.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/generic/scsi_periph/io.cpp   2011-03-02 
18:28:08 UTC (rev 40785)
+++ haiku/trunk/src/add-ons/kernel/generic/scsi_periph/io.cpp   2011-03-02 
18:49:02 UTC (rev 40786)
@@ -332,7 +332,7 @@
                        }
 
                        SHOW_ERROR(4, "Unknown ioctl: %x", op);
-                       return B_BAD_VALUE;
+                       return B_DEV_INVALID_IOCTL;
        }
 }
 


Other related posts:

  • » [haiku-commits] r40786 - in haiku/trunk/src/add-ons/kernel: bus_managers/acpi bus_managers/firewire bus_managers/ide bus_managers/ps2 bus_managers/scsi ... - korli