Decode paths associated with file descriptors returned by syscalls

* defs.h (RVAL_FD): New macro.
(RVAL_MASK, RVAL_STR, RVAL_NONE): Update.
* desc.c (sys_dup, sys_delete_module): New functions.
(do_dup2, decode_open, sys_creat): Change return value to RVAL_FD.
* linux/dummy.h (sys_delete_module, sys_dup): Remove.
* linux/syscall.h (sys_delete_module, sys_dup): New prototypes.
* syscall.c (trace_syscall_exiting): Handle RVAL_FD.

Signed-off-by: Zubin Mithra <zubin.mithra@gmail.com>
diff --git a/file.c b/file.c
index c322242..f817182 100644
--- a/file.c
+++ b/file.c
@@ -303,7 +303,7 @@
 			tprintf(", %#lo", tcp->u_arg[offset + 2]);
 		}
 	}
-	return 0;
+	return RVAL_FD;
 }
 
 int
@@ -312,6 +312,12 @@
 	return decode_open(tcp, 0);
 }
 
+int sys_delete_module(struct tcb *tcp)
+{
+	decode_open(tcp, 0);
+	return RVAL_DECIMAL;
+}
+
 int
 sys_openat(struct tcb *tcp)
 {
@@ -348,7 +354,7 @@
 		printpath(tcp, tcp->u_arg[0]);
 		tprintf(", %#lo", tcp->u_arg[1]);
 	}
-	return 0;
+	return RVAL_FD;
 }
 
 #include "xlat/access_flags.h"