• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

Revision58ebdb6ad9d8f0391e74f20ac83cd2f6dbfce026 (tree)
Time2016-08-18 17:04:52
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

init: expand variables on mount_all command

This allows mount_all to handle fstab.${ro.hardware} instead
of hardcoding the file name.

Change Summary

Incremental Difference

--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -528,9 +528,14 @@ static int do_mount_all(const std::vector<std::string>& args) {
528528 ret = -1;
529529 }
530530 } else if (pid == 0) {
531+ std::string filename_val;
532+ if (!expand_props(args[1], &filename_val)) {
533+ ERROR("mount_all: cannot expand '%s'\n", fstabfile);
534+ _exit(-1);
535+ }
531536 /* child, call fs_mgr_mount_all() */
532537 klog_set_level(6); /* So we can see what fs_mgr_mount_all() does */
533- fstab = fs_mgr_read_fstab(fstabfile);
538+ fstab = fs_mgr_read_fstab(filename_val.c_str());
534539 child_ret = fs_mgr_mount_all(fstab);
535540 fs_mgr_free_fstab(fstab);
536541 if (child_ret == -1) {