Browse Source

Fixed stat interface

ceriel 33 years ago
parent
commit
974463cbd4
3 changed files with 49 additions and 4 deletions
  1. 17 2
      mach/mantra/libsys/_fstat.s
  2. 16 1
      mach/mantra/libsys/fstat.s
  3. 16 1
      mach/mantra/libsys/stat.s

+ 17 - 2
mach/mantra/libsys/_fstat.s

@@ -5,7 +5,22 @@
 .sect .data
 .sect .bss
 .sect .text
-__fstat:		move.l	#0x1C,d0
+__fstat:	move.l	#0x1C,d0
 		move.l	4(sp),a0
 		move.l	8(sp),d1
-		jmp callc
+		jsr callc
+		tst.l d0
+		blt 1f
+		move.l 4(sp),a0
+		add.l #30,a0
+		lea 2(a0),a1
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+1:
+		rts

+ 16 - 1
mach/mantra/libsys/fstat.s

@@ -8,4 +8,19 @@
 _fstat:		move.l	#0x1C,d0
 		move.l	4(sp),a0
 		move.l	8(sp),d1
-		jmp callc
+		jsr callc
+		tst.l d0
+		blt 1f
+		move.l 4(sp),a0
+		add.l #30,a0
+		lea 2(a0),a1
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+1:
+		rts

+ 16 - 1
mach/mantra/libsys/stat.s

@@ -8,4 +8,19 @@
 _stat:		move.l #0x12,d0
 		move.l 4(sp),a0
 		move.l 8(sp),d1
-		jmp callc
+		jsr callc
+		tst.l d0
+		blt 1f
+		move.l 4(sp),a0
+		add.l #30,a0
+		lea 2(a0),a1
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+		move.w -(a0),-(a1)
+1:
+		rts