Commit 9a838968 authored by Robert Sprowson's avatar Robert Sprowson

Add ReadInfo subreason to map from logic drive

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'
parent 30493587
/* (0.08) /* (0.09)
* *
* 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.09
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Feb 2015 #define Module_Date_CMHG 06 Oct 2016
#define Module_MajorVersion "0.08" #define Module_MajorVersion "0.09"
#define Module_Version 8 #define Module_Version 9
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "02 Feb 2015" #define Module_Date "06 Oct 2016"
#define Module_ApplicationDate "02-Feb-15" #define Module_ApplicationDate "06-Oct-16"
#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.09"
#define Module_HelpVersion "0.08 (02 Feb 2015)" #define Module_HelpVersion "0.09 (06 Oct 2016)"
#define Module_LibraryVersionInfo "0:8" #define Module_LibraryVersionInfo "0:9"
...@@ -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
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