]> git.saurik.com Git - ldid.git/commitdiff
Use _syscall to verify that -S's truncate worked.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 27 Jun 2015 04:18:46 +0000 (21:18 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 27 Jun 2015 04:18:46 +0000 (21:18 -0700)
ldid.cpp

index 7e56f145c6b0bff5a60314d38e4fcd4d5c7d3fe6..027ca42dcdb5c7e03b87f909a5ba4acde8c03b90 100644 (file)
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -1014,7 +1014,7 @@ int main(int argc, const char *argv[]) {
 
             asprintf(&temp, "%s.%s.cs", dir, base);
             fclose(fopen(temp, "w+"));
 
             asprintf(&temp, "%s.%s.cs", dir, base);
             fclose(fopen(temp, "w+"));
-            truncate(temp, offset);
+            _syscall(truncate(temp, offset));
 
             void *file(map(temp, 0, offset, NULL, false));
             memset(file, 0, offset);
 
             void *file(map(temp, 0, offset, NULL, false));
             memset(file, 0, offset);