diff options
author | Tom Cherry <tomcherry@google.com> | 2018-08-07 10:22:01 -0700 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2018-08-23 11:12:57 -0700 |
commit | 4590a2aeb7dabfe8102514ac923b6930ccb7bf50 (patch) | |
tree | 58f5c488a821abef62745f650bbca738a18312a6 /init/switch_root.h | |
parent | d8f419d4d10abdc6b9d891c227f23885d69c51c6 (diff) | |
download | system_core-4590a2aeb7dabfe8102514ac923b6930ccb7bf50.tar.gz system_core-4590a2aeb7dabfe8102514ac923b6930ccb7bf50.tar.bz2 system_core-4590a2aeb7dabfe8102514ac923b6930ccb7bf50.zip |
Switch root to /system in first stage mount
Bug: 79173823
Bug: 79758715
Test: boot hikey and observe that /system is the new root
Change-Id: I22f58f1332150ebae8e7e24eccfe780ff29eba7f
Diffstat (limited to 'init/switch_root.h')
-rw-r--r-- | init/switch_root.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/init/switch_root.h b/init/switch_root.h new file mode 100644 index 000000000..d515e5dd7 --- /dev/null +++ b/init/switch_root.h @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include <string> + +namespace android { +namespace init { + +void SwitchRoot(const std::string& new_root); + +} // namespace init +} // namespace android |