From 9d3696befe60cd2ea0e308a4257705f32dd44964 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 28 Feb 1991 16:47:45 +0000 Subject: [PATCH] Changed stat() interface --- mach/sun3/libsys/LIST | 4 ++-- mach/sun3/libsys/__statcvt.s | 27 +++++++++++++++++++++++++++ mach/sun3/libsys/_fstat.s | 7 +++++++ mach/sun3/libsys/fstat.s | 4 ++-- mach/sun3/libsys/lstat.s | 7 +++++-- mach/sun3/libsys/stat.s | 7 +++++-- 6 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 mach/sun3/libsys/__statcvt.s create mode 100644 mach/sun3/libsys/_fstat.s diff --git a/mach/sun3/libsys/LIST b/mach/sun3/libsys/LIST index 5b98dc0c4..bd9c84e83 100644 --- a/mach/sun3/libsys/LIST +++ b/mach/sun3/libsys/LIST @@ -36,9 +36,8 @@ fcntl.s flock.s fork.s _fork.s -Xstat.c -_Xstat.c fstat.s +_fstat.s fstatfs.s fsync.s ftime.c @@ -192,3 +191,4 @@ uname.c vadvise.s vfork.s wait3.s +__statcvt.s diff --git a/mach/sun3/libsys/__statcvt.s b/mach/sun3/libsys/__statcvt.s new file mode 100644 index 000000000..4c5df3cd3 --- /dev/null +++ b/mach/sun3/libsys/__statcvt.s @@ -0,0 +1,27 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define ___statcvt +___statcvt: +move.l (4,sp),a0 +lea (60,a0),a0 +lea (4,a0),a1 +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.w -(a0),-(a1) +clr.w -(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.l -(a0),-(a1) +move.w -(a0),-(a1) +clr.w -(a1) +move.w -(a0),-(a1) +clr.l d0 +rts diff --git a/mach/sun3/libsys/_fstat.s b/mach/sun3/libsys/_fstat.s new file mode 100644 index 000000000..ccd047681 --- /dev/null +++ b/mach/sun3/libsys/_fstat.s @@ -0,0 +1,7 @@ +#include "syscall.h" +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define __fstat +__fstat: pea (SYS_fstat); trap #0; bcc 1f; jmp (cerror) +1: + move.l (sp)+,(sp) + jmp (___statcvt) diff --git a/mach/sun3/libsys/fstat.s b/mach/sun3/libsys/fstat.s index 78bae40cf..15bc3e428 100644 --- a/mach/sun3/libsys/fstat.s +++ b/mach/sun3/libsys/fstat.s @@ -1,4 +1,4 @@ #include "syscall.h" .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text -.define ___fstat -___fstat: SYSTEM(SYS_fstat) +.define _fstat +_fstat: jmp (__fstat) diff --git a/mach/sun3/libsys/lstat.s b/mach/sun3/libsys/lstat.s index ccf8a699f..8d5ca6777 100644 --- a/mach/sun3/libsys/lstat.s +++ b/mach/sun3/libsys/lstat.s @@ -1,4 +1,7 @@ #include "syscall.h" .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text -.define __lstat -__lstat: SYSTEM(SYS_lstat) +.define _lstat +_lstat: pea (SYS_lstat); trap #0; bcc 1f; jmp (cerror) +1: + move.l (sp)+,(sp) + jmp (___statcvt) diff --git a/mach/sun3/libsys/stat.s b/mach/sun3/libsys/stat.s index b953f554c..a5da95e0c 100644 --- a/mach/sun3/libsys/stat.s +++ b/mach/sun3/libsys/stat.s @@ -1,4 +1,7 @@ #include "syscall.h" .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text -.define __stat -__stat: SYSTEM(SYS_stat) +.define _stat +_stat: pea (SYS_stat); trap #0; bcc 1f; jmp (cerror) +1: + move.l (sp)+,(sp) + jmp (___statcvt) -- 2.34.1