Fix a bug in passing parameters to prepare_user_storage.
Add the serial parameter to prepare_user_storage to avoid
confusion when parsing parameters and passing them around.
Change-Id: Id5516c248401ad50585aa8f6e8b1545a6cded549
diff --git a/CryptCommandListener.cpp b/CryptCommandListener.cpp
index 93f953f..5de5cf2 100644
--- a/CryptCommandListener.cpp
+++ b/CryptCommandListener.cpp
@@ -366,8 +366,11 @@
} else if (subcommand == "prepare_user_storage") {
CHECK_ARGC(6, "prepare_user_storage <uuid> <user> <serial> <ephemeral>");
- return sendGenericOkFail(cli, e4crypt_prepare_user_storage(
- parseNull(argv[2]), atoi(argv[3]), atoi(argv[4]) != 0));
+ return sendGenericOkFail(cli,
+ e4crypt_prepare_user_storage(parseNull(argv[2]),
+ atoi(argv[3]),
+ atoi(argv[4]),
+ atoi(argv[5]) != 0));
} else {
dumpArgs(argc, argv, -1);