Commit 6d572cd3 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Add missing message, use central allocations for DOSFS' FS number

Missing 'Stack full' error message added (German translation needed).
Use DOSFS FS number from headers.
Tested with floppy disc (FAT12), 1GB image file (FAT16) and 4GB image file (FAT32) with no issues seen.

Version 1.01. Tagged as 'DOSFS-1_01'
parent 631ad37c
No preview for this file type
/* (1.00)
/* (1.01)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.00
#define Module_MajorVersion_CMHG 1.01
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 13 Jan 2013
#define Module_MajorVersion "1.00"
#define Module_Version 100
#define Module_MajorVersion "1.01"
#define Module_Version 101
#define Module_MinorVersion ""
#define Module_Date "13 Jan 2013"
......@@ -18,6 +18,6 @@
#define Module_ComponentName "DOSFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/ImageFS/DOSFS"
#define Module_FullVersion "1.00"
#define Module_HelpVersion "1.00 (13 Jan 2013)"
#define Module_LibraryVersionInfo "1:0"
#define Module_FullVersion "1.01"
#define Module_HelpVersion "1.01 (13 Jan 2013)"
#define Module_LibraryVersionInfo "1:1"
......@@ -21,6 +21,7 @@
#include <stdlib.h>
#include "kernel.h"
#include "swis.h"
#include "Global/FSNumbers.h"
#include "DOSFSHdr.h"
#include "MsgTrans.h"
......
......@@ -355,7 +355,7 @@ time5byte *get_RISCOS_TIME(time5byte *timebuff)
newTIME = ((timebuff == NULL) ? (time5byte *)malloc(sizeof(time5byte)) : timebuff) ;
/* specify the format we wish to read the clock in */
newTIME->lo = clock_5byte ;
newTIME->lo = OWReadRTC_5ByteInt ;
reglist.r[0] = OsWord_ReadRealTimeClock ;
reglist.r[1] = (word)newTIME ;
......
......@@ -17,6 +17,9 @@
/* Wrappers for MessageTrans SWIs Copyright (c) 1991 SMCormie */
/*-------------------------------------------------------------------------*/
#ifndef __h_MsgTrans
#define __h_MsgTrans
/* GLOBAL error reporting */
/* "t" == return type */
/* "n" == internal error number */
......@@ -29,11 +32,13 @@
/* Filing system error bases */
#define FS_errflag (0x00010000) /* Filing System error */
#define FS_number (43) /* DOSFS */
#define err_mask (0xFF)
#define ext_err(v) (((v) & err_mask) | FS_errflag | (FS_number << 8))
#define ext_err(v) (((v) & err_mask) | FS_errflag | (fsnumber_MSDOSFS << 8))
/* The following are DOSFS specific error messages. */
#define err_badparargs (0x00) /* In assembler stubs */
#define err_badparfile (0x01) /* In assembler stubs */
#define err_badparfunc (0x02) /* In assembler stubs */
#define err_notfile (0x03) /* Uses Global message "IsntFil" */
#define err_fatloadfailed (0x04)
#define err_heapexhausted (0x05) /* Uses Global message "NoMem" */
......@@ -52,8 +57,10 @@
#define err_clusterinuse (0x12)
#define err_badswi (0x13) /* Uses Global message "BadSWI" */
#define err_buftoosmall (0x14) /* Uses Global message "BufOFlo" */
#define err_nostack (0x15) /* In assembler stubs */
/* The following have been matched with FileCore error messages. */
#define err_notsupported (0xA5) /* In assembler stubs */
#define err_baddrive (0xAC)
#define err_dirfull (0xB3)
#define err_notempty (0xB4)
......@@ -123,3 +130,5 @@ extern _kernel_oserror *msgtrans_lookup(
char *p3,
char *p4
);
#endif
......@@ -20,12 +20,6 @@
#ifndef __h_TIMEconv
#define __h_TIMEconv
/* OS_Word 14 subreasons */
#define clock_textin (0)
#define clock_BCDin (1)
#define clock_BCDout (2)
#define clock_5byte (3)
/*-------------------------------------------------------------------------*/
/* build a picture of time */
......
......@@ -83,19 +83,16 @@ func SETD {FALSE}
; -------------------------------------------------------------------
; Errors
notsupported * &D8
nostack * &A5
badparargs * &00
badparfile * &01
badparfunc * &02
err_badparargs * &00
err_badparfile * &01
err_badparfunc * &02
err_nostack * &15
err_notsupported * &A5
; -------------------------------------------------------------------
; Misc constants
spare_word * &2053474A ; "JGS "
GBLA fs_number
fs_number SETA 0 ; undefined filing system
; -------------------------------------------------------------------
; Private (assembler) data
sl_offset & |_Lib$Reloc$Off| ; stack overflow buffer size
......@@ -266,7 +263,7 @@ args_table_end
args_table_entries * ((args_table_end - args_table_start) / 4)
DOS_args_badparameter
MOV a1,#badparargs
MOV a1,#err_badparargs
Ccall |global_error|
[ :LNOT: No32bitCode
MSR CPSR_f,#V_bit ; global_error doesn't return -1,hence Ccall doesn't set V for us
......@@ -427,7 +424,7 @@ file_table_end
file_table_entries * ((file_table_end - file_table_start) / 4)
DOS_file_badparameter
MOV a1,#badparfile
MOV a1,#err_badparfile
Ccall |global_error|
[ :LNOT: No32bitCode
MSR CPSR_f,#V_bit ; global_error doesn't return -1,hence Ccall doesn't set V for us
......@@ -672,7 +669,7 @@ func_table_end
func_table_entries * ((func_table_end - func_table_start) / 4)
DOS_func_badparameter
MOV r0,#badparfunc
MOV r0,#err_badparfunc
Ccall |global_error|
[ :LNOT: No32bitCode
MSR CPSR_f,#V_bit ; global_error doesn't return -1,hence Ccall doesn't set V for us
......@@ -869,7 +866,7 @@ DOS_func_badparameter
; Called when an unrecognised reason code is presented
DOS_notsupported
; There should be no stacked state at this point
MOV a1,#notsupported
MOV a1,#err_notsupported
Ccall |global_error|
[ :LNOT: No32bitCode
MSR CPSR_f,#V_bit ; global_error doesn't return -1,hence Ccall doesn't set V for us
......@@ -885,7 +882,7 @@ DOS_not_enough_stack
MSR CPSR_cxsf,lr
]
Pull "sl,fp,lr" ; recover entry registers
MOV a1,#nostack ; There should be no stacked state at this point
MOV a1, #err_nostack ; There should be no stacked state at this point
Ccall |global_error| ; now,just for fun,we'll call Ccall again
[ :LNOT: No32bitCode
MSR CPSR_f,#V_bit ; global_error doesn't return -1,hence Ccall doesn't set V for us
......
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