summaryrefslogtreecommitdiffstats
path: root/libgloss
diff options
context:
space:
mode:
authorMichael Frysinger <vapier@gentoo.org>2011-07-01 20:55:42 +0000
committerMichael Frysinger <vapier@gentoo.org>2011-07-01 20:55:42 +0000
commitecd3577e1df0eb8a0a98666c63741c9cf64e869c (patch)
tree9d79a629b0f858881de484b6529e612bddcf0dcd /libgloss
parent071fabe6d9799076f93800c012c2ad6f42797e86 (diff)
downloadcygnal-ecd3577e1df0eb8a0a98666c63741c9cf64e869c.tar.gz
cygnal-ecd3577e1df0eb8a0a98666c63741c9cf64e869c.tar.bz2
cygnal-ecd3577e1df0eb8a0a98666c63741c9cf64e869c.zip
libgloss: bfin: fix sim lseek() syscall
The sim lseek() syscall in the Blackfin libgloss code did not pass down the "whence" argument making lseek() in general kind of useless. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/ChangeLog5
-rw-r--r--libgloss/bfin/syscalls.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index 4ffc12dee..2d7346ce4 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-01 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/syscalls.c (_lseek): Change 3rd arg name to whence. Increase
+ block array to 3 elements. Set 3rd element to whence.
+
2011-06-29 Jeff Johnston <jjohnstn@redhat.com>
* arm/Makefile.in: Add $CFLAGS to compile commands for specified .o targets.
diff --git a/libgloss/bfin/syscalls.c b/libgloss/bfin/syscalls.c
index 03765bf5d..5b1df8dd0 100644
--- a/libgloss/bfin/syscalls.c
+++ b/libgloss/bfin/syscalls.c
@@ -57,12 +57,13 @@ _read (int file, char *ptr, int len)
}
int
-_lseek (int file, int ptr, int dir)
+_lseek (int file, int ptr, int whence)
{
- int block[2];
+ int block[3];
block[0] = file;
block[1] = ptr;
+ block[2] = whence;
return do_syscall (SYS_lseek, block);
}