Commit 2f96fb78 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Internationalisation, help, and syntax improvments

Assign a proper error number and translate "Incompatible USBDriver version".
Don't bother internationalising the *commands which are for debug builds only.
Rephrase the help for USBQuirk so it makes sense, and trim the unmatched '<' from the syntax example.
Bracket the USBDiscover help with the same switch that governs the code, which has been disabled for over a decade.

Version 1.04. Tagged as 'NetBSD-1_04'
parent 02ba7000
/* (1.03)
/* (1.04)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.03
#define Module_MajorVersion_CMHG 1.04
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 17 Sep 2015
#define Module_Date_CMHG 28 Sep 2015
#define Module_MajorVersion "1.03"
#define Module_Version 103
#define Module_MajorVersion "1.04"
#define Module_Version 104
#define Module_MinorVersion ""
#define Module_Date "17 Sep 2015"
#define Module_Date "28 Sep 2015"
#define Module_ApplicationDate "17-Sep-15"
#define Module_ApplicationDate "28-Sep-15"
#define Module_ComponentName "NetBSD"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/USB/NetBSD"
#define Module_FullVersion "1.03"
#define Module_HelpVersion "1.03 (17 Sep 2015)"
#define Module_LibraryVersionInfo "1:3"
#define Module_FullVersion "1.04"
#define Module_HelpVersion "1.04 (28 Sep 2015)"
#define Module_LibraryVersionInfo "1:4"
No preview for this file type
......@@ -8,5 +8,5 @@
#define EHCIDriverModule_Module_Date_CMHG 22 Aug 2015
#define EHCIDriverModule_MajorVersion_CMHG 0.28
#define USBDriverModule_Module_Date_CMHG 17 Sep 2015
#define USBDriverModule_MajorVersion_CMHG 0.77
#define USBDriverModule_Module_Date_CMHG 28 Sep 2015
#define USBDriverModule_MajorVersion_CMHG 0.78
......@@ -148,6 +148,7 @@ struct iface_softc {
#define E_BadRequest "\x08\x90\x81\x00" "BadRequest"
#define E_NotRootP "\x09\x90\x81\x00" "NotRootP"
#define E_BadDevice "\x0A\x90\x81\x00" "BadDevice"
#define E_MismatchVers "\x0B\x90\x81\x00" "IncVers"
#define E_XferFailed "\x20\x90\x81\x00" "XferFailed"
#define USBDEV_MESSAGES "Resources:$.Resources.USBDriver.USBDevs"
......@@ -874,7 +875,7 @@ static _kernel_oserror* command_ListQuirks(void)
{
int i;
usbd_quirk_entry *t;
printf("\n USB Extra Quirk listing:\nVendor Product Device Quirk\n");
printf("Vendor Product Device Flags\n");
if(extra_quirks)
{
......@@ -1060,7 +1061,7 @@ _kernel_oserror *module_swis(int swi_offset, _kernel_swi_regs *r, void *pw)
/* R1 now contains internal API version number
This check should be made more permissive when appropriate */
if(r->r[1] != RISCOS_USBDRIVER_API_VERSION)
return (_kernel_oserror *)"\0\0\0\0Incompatible USBDriver version";
return uerror (E_MismatchVers);
r->r[0] = (int) register_bus ((device_ptr_t) r->r[0]);
break;
......@@ -1236,7 +1237,7 @@ reloop:
/*---------------------------------------------------------------------------*/
/* dummy - we don't do attachement like this */
/* dummy - we don't do attachment like this */
void* (config_found) (struct device* dev, void* h, int (*f) (void*, const char*))
{
(void) f;
......
......@@ -37,7 +37,8 @@ command-keyword-table: module_commands
#ifdef USB_DEBUG
USBDebug( min-args:1, max-args:3,
international:,help-text:"HUSBDBG",invalid-syntax:"SUSBDBG"),
help-text: "*USBDebug sets the debug level for general usb, hub and mouse output.",
invalid-syntax:"*USBDebug <usb> [<hub> [<mouse>]]"),
#endif
USBBuses( min-args:0, max-args:0,
......@@ -58,10 +59,11 @@ USBSetConfig( min-args:2, max-args:2,
USBSetInterface(min-args:3, max-args:3,
international:,help-text:"HUSBINT",invalid-syntax:"SUSBINT"),
;#ifdef USB_DEBUG
#ifdef USB_DEBUG
USBDiscover( min-args:0, max-args:0,
international:,help-text:"HUSBDIS",invalid-syntax:"SUSBDIS"),
;#endif
help-text: "*USBDiscover forces a search for new devices on all buses.",
invalid-syntax:"Syntax: *USBDiscover"),
#endif
USBReset( min-args:1, max-args:1,
international:,help-text:"HUSBRES",invalid-syntax:"SUSBRES"),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment