summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-02-17 14:31:55 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-02-17 14:31:55 +0100
commit86738a232d74ddea29d2b9c90e8d036f63c438fd (patch)
tree156026a8e14e22d161523949b7edbeb04b078c71 /file.c
parent09a87ae9712acb3725fb76d3f71215e168215611 (diff)
downloadstrace-86738a232d74ddea29d2b9c90e8d036f63c438fd.tar.gz
strace-86738a232d74ddea29d2b9c90e8d036f63c438fd.tar.bz2
strace-86738a232d74ddea29d2b9c90e8d036f63c438fd.tar.xz
Merge two identical tables
* defs.h: Declare whence_codes[]. * desc.c: Delete static whence[]. (printflock[64]): Use whence_codes. * file.c: Make whence_codes[] non-static. Add SEEK_DATA and SEEK_HOLE to them. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/file.c b/file.c
index e535448..bea5312 100644
--- a/file.c
+++ b/file.c
@@ -516,10 +516,16 @@ sys_umask(struct tcb *tcp)
return RVAL_OCTAL;
}
-static const struct xlat whence_codes[] = {
+const struct xlat whence_codes[] = {
{ SEEK_SET, "SEEK_SET" },
{ SEEK_CUR, "SEEK_CUR" },
{ SEEK_END, "SEEK_END" },
+#ifdef SEEK_DATA
+ { SEEK_DATA, "SEEK_DATA" },
+#endif
+#ifdef SEEK_HOLE
+ { SEEK_HOLE, "SEEK_HOLE" },
+#endif
{ 0, NULL },
};