[vbox-dev] [PATCH 2/2] vgdrvLinuxIOCtl: Always return standard Linux errno values

Hans de Goede hdegoede at redhat.com
Mon Aug 7 14:46:01 GMT 2017


Hi,

On 07-08-17 16:16, Michael Thayer wrote:
> Hello Hans and Knut,
> 
> Would a new ioctl to query the last IPRT code for an open session be an
> option in case the caller does need the extra information?

Thank you for the suggestion, but IMHO that is worse (uglier) then returning
the vbox status error codes as positive values.

Knut, I hope that my last 2 mails may have convinced you to re-consider
moving to standard errno returns only. But if I've failed to convince
you then please let me know, then I can drop these patches from my
ongoing work and just keep the positive return value is a vbox status code
thing for the upstream submission.

Thanks & Regards,

Hans



> 
> Regards
> Michael
> 
> 06.08.2017 22:08, Knut St. Osmundsen wrote:
>> Hi Hans,
>>
>> I'm with you on this not being entirely optimal.  However 'man ioctl'
>> (http://man7.org/linux/man-pages/man2/ioctl.2.html) documents it as sane
>> behavior.  So why change working code?
>>
>> As I mentioned, the ideal fix would be to pass the VBox status code back
>> separately in the request buffer, making the fix cross platform rather
>> than linux specific.  But that's a lot of work.
>>
>> -bird--
> Michael Thayer | VirtualBox engineer
> ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | D-71384 Weinstadt
> 
> ORACLE Deutschland B.V. & Co. KG
> Hauptverwaltung: Riesstraße 25, D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
> 
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister
> der Handelskammer Midden-Nederland, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev
> 



More information about the vbox-dev mailing list