diff options
author | Tao Bao | 2017-09-29 12:39:08 -0500 |
---|---|---|
committer | Tao Bao | 2017-09-29 13:03:08 -0500 |
commit | ad774b297010d23911dfc75bb626cf74e374f731 (patch) | |
tree | 70fa4171a1da9240f0306a3151318d1a26b231c3 /roots.cpp | |
parent | e687c5a1e12d9da3610d9402cc0996afaf11f0dc (diff) | |
download | platform-bootable-recovery-ad774b297010d23911dfc75bb626cf74e374f731.tar.gz platform-bootable-recovery-ad774b297010d23911dfc75bb626cf74e374f731.tar.xz platform-bootable-recovery-ad774b297010d23911dfc75bb626cf74e374f731.zip |
roots: Remove #include "common.h".
And add the missing include of <string.h> (e.g. for strcmp(3)).
Minor update to the arg of fs_mgr_get_entry_for_mount_point(), which now
accepts std::string.
Test: mmma bootable/recovery
Change-Id: I9cb8c31fe71b5a053f4d84bf1aba00e96c02ed03
Diffstat (limited to 'roots.cpp')
-rw-r--r-- | roots.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -20,6 +20,7 @@ | |||
20 | #include <fcntl.h> | 20 | #include <fcntl.h> |
21 | #include <stdint.h> | 21 | #include <stdint.h> |
22 | #include <stdlib.h> | 22 | #include <stdlib.h> |
23 | #include <string.h> | ||
23 | #include <sys/mount.h> | 24 | #include <sys/mount.h> |
24 | #include <sys/stat.h> | 25 | #include <sys/stat.h> |
25 | #include <sys/types.h> | 26 | #include <sys/types.h> |
@@ -38,7 +39,6 @@ | |||
38 | #include <ext4_utils/wipe.h> | 39 | #include <ext4_utils/wipe.h> |
39 | #include <fs_mgr.h> | 40 | #include <fs_mgr.h> |
40 | 41 | ||
41 | #include "common.h" | ||
42 | #include "mounts.h" | 42 | #include "mounts.h" |
43 | 43 | ||
44 | static struct fstab* fstab = nullptr; | 44 | static struct fstab* fstab = nullptr; |
@@ -77,7 +77,7 @@ Volume* volume_for_path(const char* path) { | |||
77 | if (path == nullptr || path[0] == '\0') return nullptr; | 77 | if (path == nullptr || path[0] == '\0') return nullptr; |
78 | std::string str(path); | 78 | std::string str(path); |
79 | while (true) { | 79 | while (true) { |
80 | Volume* result = fs_mgr_get_entry_for_mount_point(fstab, str.c_str()); | 80 | Volume* result = fs_mgr_get_entry_for_mount_point(fstab, str); |
81 | if (result != nullptr || str == "/") { | 81 | if (result != nullptr || str == "/") { |
82 | return result; | 82 | return result; |
83 | } | 83 | } |