sdcard: Add support for the O_TRUNC open() flag

BUG: 2935163

Change-Id: I9f76b24147b2f87ddb7869bb72baac03e86ef7e6
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index 82e6354..27cbde2 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -695,7 +695,7 @@
         out.major = FUSE_KERNEL_VERSION;
         out.minor = FUSE_KERNEL_MINOR_VERSION;
         out.max_readahead = req->max_readahead;
-        out.flags = 0;
+        out.flags = FUSE_ATOMIC_O_TRUNC;
         out.max_background = 32;
         out.congestion_threshold = 32;
         out.max_write = 256 * 1024;