]> granicus.if.org Git - strace/commitdiff
Implement truncate64 & ftruncate64 for them that wants 'em
authorJohn Hughes <john@Calva.COM>
Tue, 6 Mar 2001 16:50:41 +0000 (16:50 +0000)
committerJohn Hughes <john@Calva.COM>
Tue, 6 Mar 2001 16:50:41 +0000 (16:50 +0000)
file.c
svr4/dummy.h
svr4/syscall.h

diff --git a/file.c b/file.c
index 3ec97e314b3d0c67b633aefd4b9a6829d5ee4b0e..090d78d05d694db3e447a4be7f43e9f164290d73 100644 (file)
--- a/file.c
+++ b/file.c
@@ -411,7 +411,7 @@ struct tcb *tcp;
 }
 #endif
 
-#if _LFS_LARGEFILE
+#if _LFS64_LARGEFILE
 int
 sys_lseek64 (tcp)
 struct tcb *tcp;
@@ -443,6 +443,19 @@ struct tcb *tcp;
        return 0;
 }
 
+#if _LFS64_LARGEFILE
+int
+sys_truncate64(tcp)
+struct tcb *tcp;
+{
+       if (entering(tcp)) {
+               printpath(tcp, tcp->u_arg[0]);
+               tprintf(", %llu", get64(tcp->u_arg[1],tcp->u_arg[2]));
+       }
+       return 0;
+}
+#endif
+
 int
 sys_ftruncate(tcp)
 struct tcb *tcp;
@@ -458,6 +471,19 @@ struct tcb *tcp;
        return 0;
 }
 
+#if _LFS64_LARGEFILE
+int
+sys_ftruncate64(tcp)
+struct tcb *tcp;
+{
+       if (entering(tcp)) {
+               tprintf("%ld, %llu", tcp->u_arg[0],
+                       get64(tcp->u_arg[1] ,tcp->u_arg[2]));
+       }
+       return 0;
+}
+#endif
+
 /* several stats */
 
 static struct xlat modetypes[] = {
index 86fed562e042d0a558a83f5044b6d55725b21865..73c4cce3f4523a60667d244aee8194e35061ccee 100644 (file)
 #define sys_getrlimit64 printargs
 #define sys_pread64 printargs
 #define sys_pwrite64 printargs
+#define sys_ftruncate64 printargs
+#define sys_truncate64 printargs
 #endif
 
 /* unimplemented 64-bit stuff */
 #define sys_statvfs64 printargs
 #define sys_fstatvfs64 printargs
-#define sys_ftruncate64 printargs
-#define sys_truncate64 printargs
 
 /* like another call */
 #define sys_creat64 sys_creat
index f0c5d9c61b2665bae065d671f1a83dc2b3f1db34..21cf8d314f7198641620661d81fb07ebd2b110f0 100644 (file)
@@ -311,6 +311,8 @@ extern int sys_getksym ();
 #endif
 #if UNIXWARE >= 7
 extern int sys_lseek64 ();
+extern int sys_truncate64 ();
+extern int sys_ftruncate64 ();
 extern int sys_xsocket ();
 extern int sys_xsocketpair ();
 extern int sys_xbind ();