Browse Source

uncrypt: fix f2fs ioctl argument for pin_file

This patch fixes missing f2fs ioctl call.

Change-Id: Id840b76b9d5c580041aaee4501ac8e69fc3fb818
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Jaegeuk Kim 3 years ago
parent
commit
6b4d9a9560
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      uncrypt/uncrypt.cpp

+ 2
- 1
uncrypt/uncrypt.cpp View File

@@ -332,7 +332,8 @@ static int produce_block_map(const char* path, const char* map_file, const char*
332 332
 #define F2FS_IOC_GET_PIN_FILE	_IOW(F2FS_IOCTL_MAGIC, 14, __u32)
333 333
 #endif
334 334
     if (f2fs_fs) {
335
-        int error = ioctl(fd, F2FS_IOC_SET_PIN_FILE);
335
+        __u32 set = 1;
336
+        int error = ioctl(fd, F2FS_IOC_SET_PIN_FILE, &set);
336 337
         // Don't break the old kernels which don't support it.
337 338
         if (error && errno != ENOTTY && errno != ENOTSUP) {
338 339
             PLOG(ERROR) << "Failed to set pin_file for f2fs: " << path << " on " << blk_dev;