more syscall-dump improvements

This commit is contained in:
Jaroslav Kysela
2015-04-03 13:20:23 +02:00
parent e51e8bf4c7
commit 4849c2cfd9
3 changed files with 43 additions and 5 deletions

12
tools/s2i-dump.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
if ! test -d /mnt/s2i-log; then
mkdir -p /mnt/s2i-log
mount -t tmpfs -o size=300M,mode=0755 tmpfs /mnt/s2i-log
fi
mkdir -p /usr/local/bin
ln -sf /usr/bin/mdnsd /usr/local/bin/mdnsd
rm -f /mnt/s2i-log/s2i.log
LD_PRELOAD=/usr/lib/syscall-dump.so \
SYSCALL_DUMP_LOG=/mnt/s2i-log/s2i.log \
/usr/lib/s2i.bin

View File

@@ -199,7 +199,7 @@ off_t lseek(int fd, off_t offset, int whence)
REDIR(real_lseek, "lseek");
r = real_lseek(fd, offset, whence);
dlog("lseek(%d, %lx, %d) = %d (%d)\n", fd, (long)offset, whence, r, E(r));
dlog("lseek(%d, %ld, %d) = %d (%d)\n", fd, (long)offset, whence, r, E(r));
return r;
}
@@ -212,7 +212,7 @@ off64_t lseek64(int fd, off64_t offset, int whence)
REDIR(real_lseek64, "lseek64");
r = real_lseek64(fd, offset, whence);
dlog("lseek(%d, %llx, %d) = %d (%d)\n", fd, (long long)offset, whence, r, E(r));
dlog("lseek(%d, %lld, %d) = %d (%d)\n", fd, (long long)offset, whence, r, E(r));
return r;
}