Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
system_vold
Commits
5817821c
Commit
5817821c
authored
15 years ago
by
San Mehat
Browse files
Options
Download
Email Patches
Plain Diff
vold: Add command to unmount secure containers
Signed-off-by:
San Mehat
<
san@google.com
>
parent
88705166
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
CommandListener.cpp
CommandListener.cpp
+21
-0
CommandListener.h
CommandListener.h
+7
-0
No files found.
CommandListener.cpp
View file @
5817821c
...
...
@@ -45,6 +45,7 @@ CommandListener::CommandListener() :
registerCmd
(
new
FinalizeAsecCmd
());
registerCmd
(
new
DestroyAsecCmd
());
registerCmd
(
new
MountAsecCmd
());
registerCmd
(
new
UnmountAsecCmd
());
registerCmd
(
new
ListAsecCmd
());
registerCmd
(
new
AsecPathCmd
());
}
...
...
@@ -254,6 +255,26 @@ int CommandListener::MountAsecCmd::runCommand(SocketClient *cli,
return
0
;
}
CommandListener
::
UnmountAsecCmd
::
UnmountAsecCmd
()
:
VoldCommand
(
"unmount_asec"
)
{
}
int
CommandListener
::
UnmountAsecCmd
::
runCommand
(
SocketClient
*
cli
,
int
argc
,
char
**
argv
)
{
if
(
argc
!=
2
)
{
cli
->
sendMsg
(
ResponseCode
::
CommandSyntaxError
,
"Usage: unmount_asec <namespace-id>"
,
false
);
return
0
;
}
if
(
VolumeManager
::
Instance
()
->
unmountAsec
(
argv
[
1
]))
{
cli
->
sendMsg
(
ResponseCode
::
OperationFailed
,
"Unmount failed"
,
true
);
}
else
{
cli
->
sendMsg
(
ResponseCode
::
CommandOkay
,
"Unmount succeeded"
,
false
);
}
return
0
;
}
CommandListener
::
ListAsecCmd
::
ListAsecCmd
()
:
VoldCommand
(
"list_asec"
)
{
...
...
This diff is collapsed.
Click to expand it.
CommandListener.h
View file @
5817821c
...
...
@@ -111,6 +111,13 @@ private:
int
runCommand
(
SocketClient
*
c
,
int
argc
,
char
**
argv
);
};
class
UnmountAsecCmd
:
public
VoldCommand
{
public:
UnmountAsecCmd
();
virtual
~
UnmountAsecCmd
()
{}
int
runCommand
(
SocketClient
*
c
,
int
argc
,
char
**
argv
);
};
class
ListAsecCmd
:
public
VoldCommand
{
public:
ListAsecCmd
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment