From b9aed74b146beb7499ebc5775e8ae179d16900ef Mon Sep 17 00:00:00 2001 From: San Mehat Date: Thu, 4 Feb 2010 15:07:01 -0800 Subject: vold: Fix a few bugs - share command was taking wrong arguments - shared command was returning two termination codes - Force FAT32 cluster size to 4k when formatting Signed-off-by: San Mehat --- CommandListener.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'CommandListener.cpp') diff --git a/CommandListener.cpp b/CommandListener.cpp index a40eac2..59c431f 100644 --- a/CommandListener.cpp +++ b/CommandListener.cpp @@ -61,9 +61,9 @@ int CommandListener::VolumeCmd::runCommand(SocketClient *cli, } else if (!strcmp(argv[1], "format")) { rc = vm->formatVolume(argv[2]); } else if (!strcmp(argv[1], "share")) { - rc = vm->shareVolume(argv[1], argv[2]); + rc = vm->shareVolume(argv[2], argv[3]); } else if (!strcmp(argv[1], "unshare")) { - rc = vm->unshareVolume(argv[1], argv[2]); + rc = vm->unshareVolume(argv[2], argv[3]); } else if (!strcmp(argv[1], "shared")) { bool enabled = false; @@ -74,6 +74,7 @@ int CommandListener::VolumeCmd::runCommand(SocketClient *cli, cli->sendMsg(ResponseCode::ShareEnabledResult, (enabled ? "Share enabled" : "Share disabled"), false); } + return 0; } else { cli->sendMsg(ResponseCode::CommandSyntaxError, "Unknown volume cmd", false); } @@ -93,6 +94,7 @@ int CommandListener::VolumeCmd::runCommand(SocketClient *cli, } else if (errno == EBUSY) { rc = ResponseCode::OpFailedVolBusy; } else { + LOGW("Returning OperationFailed - no handler for errno %d", errno); rc = ResponseCode::OperationFailed; } cli->sendMsg(rc, "volume operation failed", true); -- cgit v1.1