am dd1a8040: Include reason when wiping data.

* commit 'dd1a8040e8449cc0e8b861a23e0339a43d80593c':
  Include reason when wiping data.
This commit is contained in:
Jeff Sharkey 2014-09-26 00:21:49 +00:00 committed by Android Git Automerger
commit 714526434c

View file

@ -3046,7 +3046,8 @@ int cryptfs_enable_internal(char *howarg, int crypt_type, char *passwd,
mkdir("/cache/recovery", 0700);
int fd = open("/cache/recovery/command", O_RDWR|O_CREAT|O_TRUNC, 0600);
if (fd >= 0) {
write(fd, "--wipe_data", strlen("--wipe_data") + 1);
write(fd, "--wipe_data\n", strlen("--wipe_data\n") + 1);
write(fd, "--reason=cryptfs_enable_internal\n", strlen("--reason=cryptfs_enable_internal\n") + 1);
close(fd);
} else {
SLOGE("could not open /cache/recovery/command\n");