Commits (2)
  • Robert Sprowson's avatar
    Add ReadInfo subreason to map from logic drive · 9a838968
    Robert Sprowson authored
    SDFS_ReadCardInfo,1 allows the logical drive number to be mapped to bus/slot/RCA in a roughly analogous way to ADFS_IDEDeviceInfo. Otherwise, there's no way to map from drive number to the physical card.
    Exports & docs updated.
    
    Version 0.09. Tagged as 'SDFS-0_09'
    9a838968
  • Robert Sprowson's avatar
    Add missing messages directive · 7804de1e
    Robert Sprowson authored
    Missing {DictTokens} added, otherwise when the CmdHelp gets concatenated it's never seen a directive and does nothing with the {Token0}.
    
    Version 0.10. Tagged as 'SDFS-0_10'
    7804de1e
#{DictTokens}
Card:card Card:card
ExtEscape:Escape ExtEscape:Escape
BadDrive:Disc drive not known BadDrive:Disc drive not known
......
/* (0.08) /* (0.10)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 0.08 #define Module_MajorVersion_CMHG 0.10
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Feb 2015 #define Module_Date_CMHG 08 Aug 2017
#define Module_MajorVersion "0.08" #define Module_MajorVersion "0.10"
#define Module_Version 8 #define Module_Version 10
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "02 Feb 2015" #define Module_Date "08 Aug 2017"
#define Module_ApplicationDate "02-Feb-15" #define Module_ApplicationDate "08-Aug-17"
#define Module_ComponentName "SDFS" #define Module_ComponentName "SDFS"
#define Module_ComponentPath "cddl/RiscOS/Sources/FileSys/SDFS/SDFS" #define Module_ComponentPath "cddl/RiscOS/Sources/FileSys/SDFS/SDFS"
#define Module_FullVersion "0.08" #define Module_FullVersion "0.10"
#define Module_HelpVersion "0.08 (02 Feb 2015)" #define Module_HelpVersion "0.10 (08 Aug 2017)"
#define Module_LibraryVersionInfo "0:8" #define Module_LibraryVersionInfo "0:10"
...@@ -71,8 +71,15 @@ _kernel_oserror *swi_ReadCardInfo(uint32_t reason, uint32_t drive, _kernel_swi_r ...@@ -71,8 +71,15 @@ _kernel_oserror *swi_ReadCardInfo(uint32_t reason, uint32_t drive, _kernel_swi_r
r->r[3] = (uint32_t) (g_drive[drive].capacity >> 32); r->r[3] = (uint32_t) (g_drive[drive].capacity >> 32);
break; break;
case SDFSReadCardInfo_Location:
r->r[2] = (g_drive[drive].slot << 0) |
(g_drive[drive].bus << 8) |
(g_drive[drive].rca << 16);
break;
default: default:
e = MESSAGE_ERRORLOOKUP(true, BadReason, "SDFS_ReadCardInfo"); e = MESSAGE_ERRORLOOKUP(true, BadReason, "SDFS_ReadCardInfo");
break;
} }
spinrw_read_unlock(&g_drive_lock); spinrw_read_unlock(&g_drive_lock);
......
...@@ -28,6 +28,7 @@ On entry ...@@ -28,6 +28,7 @@ On entry
R0 = reason code: R0 = reason code:
0 => return card capacity in bytes in R2-R3 (64-bit little-endian) 0 => return card capacity in bytes in R2-R3 (64-bit little-endian)
1 => return card location (slot, bus, RCA) in R2
other values reserved for future use other values reserved for future use
R1 = drive number R1 = drive number
......
...@@ -59,6 +59,7 @@ SWIClass SETS SDFSSWI_Name ...@@ -59,6 +59,7 @@ SWIClass SETS SDFSSWI_Name
; Reason codes to ReadCardInfo ; Reason codes to ReadCardInfo
^ 0 ^ 0
SDFSReadCardInfo_Size # 1 SDFSReadCardInfo_Size # 1
SDFSReadCardInfo_Location # 1
OPT OldOpt OPT OldOpt
END END