Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemCore
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemCore
Commits
f2bd3fdd
Commit
f2bd3fdd
authored
Jan 9, 2015
by
Leo Wang
Committed by
Android (Google) Code Review
Jan 9, 2015
Browse files
Options
Downloads
Plain Diff
Merge "Provide a way to select force encryption from vendor partition" into lmp-mr1-dev
parents
ba95be58
703b87de
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs_mgr/fs_mgr.c
+12
-1
12 additions, 1 deletion
fs_mgr/fs_mgr.c
with
12 additions
and
1 deletion
fs_mgr/fs_mgr.c
+
12
−
1
View file @
f2bd3fdd
...
...
@@ -256,6 +256,15 @@ static int device_is_secure() {
return
strcmp
(
value
,
"0"
)
?
1
:
0
;
}
static
int
device_is_force_encrypted
()
{
int
ret
=
-
1
;
char
value
[
PROP_VALUE_MAX
];
ret
=
__system_property_get
(
"ro.vold.forceencryption"
,
value
);
if
(
ret
<
0
)
return
0
;
return
strcmp
(
value
,
"1"
)
?
0
:
1
;
}
/*
* Tries to mount any of the consecutive fstab entries that match
* the mountpoint of the one given by fstab->recs[start_idx].
...
...
@@ -378,7 +387,9 @@ int fs_mgr_mount_all(struct fstab *fstab)
/* Deal with encryptability. */
if
(
!
mret
)
{
/* If this is encryptable, need to trigger encryption */
if
((
fstab
->
recs
[
attempted_idx
].
fs_mgr_flags
&
MF_FORCECRYPT
))
{
if
(
(
fstab
->
recs
[
attempted_idx
].
fs_mgr_flags
&
MF_FORCECRYPT
)
||
(
device_is_force_encrypted
()
&&
fs_mgr_is_encryptable
(
&
fstab
->
recs
[
attempted_idx
])))
{
if
(
umount
(
fstab
->
recs
[
attempted_idx
].
mount_point
)
==
0
)
{
if
(
encryptable
==
FS_MGR_MNTALL_DEV_NOT_ENCRYPTED
)
{
ERROR
(
"Will try to encrypt %s %s
\n
"
,
fstab
->
recs
[
attempted_idx
].
mount_point
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment