diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-07-29 19:07:34 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-07-29 19:07:34 +0200 |
commit | 1808e23086d01b658569025825789094612547cc (patch) | |
tree | b27251717d697ff7217c96e9f4e8b9af1ebb0c34 /tests | |
parent | fs-tracer: store file offset (diff) | |
download | fs-tracer-1808e23086d01b658569025825789094612547cc.tar.gz fs-tracer-1808e23086d01b658569025825789094612547cc.tar.bz2 fs-tracer-1808e23086d01b658569025825789094612547cc.zip |
fs-tracer: handle fseek syscall
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/a.out | bin | 15872 -> 15872 bytes | |||
-rw-r--r-- | tests/openat.c | 7 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/a.out b/tests/a.out index a6e5bdd..3d9e7c1 100755 --- a/tests/a.out +++ b/tests/a.out Binary files differdiff --git a/tests/openat.c b/tests/openat.c index e5f6f17..582260a 100644 --- a/tests/openat.c +++ b/tests/openat.c @@ -22,6 +22,13 @@ int main(int argc, char** argv) { printf("Write error: %s\n", strerror(errno)); } + ret = syscall(SYS_lseek, fd, 24, SEEK_SET); + printf("FSeek ret: %d\n", ret); + + if (ret == -1) { + printf("FSeek error: %s\n", strerror(errno)); + } + ret = syscall(SYS_write, fd, "\nplease", 7); printf("Write ret: %d\n", ret); |