pread() and pwrite() system calls
Michael Ellerman
michael at ellerman.id.au
Tue May 29 18:54:23 EST 2012
On Tue, 2012-05-29 at 09:28 +0100, David Laight wrote:
> > > A special pread/pwrite asm stub that just copies
> > > r7 to r0 could be used.
> > >
> > > Would it be enough to do:
> > > syscall_pread_pwrite:
> > > mov 0,7
> > > sc
> > > blr
> > > and handle the -ve -> errno in C?
> >
> > Huh? Won't fly, r0 is used for the system call number!
>
> I was copying that from r7!
Using the non-existant 'mov' instruction!
or 0,7,7
is much clearer :)
cheers
More information about the Linuxppc-dev
mailing list