diff options
author | Alex Deymo <deymo@google.com> | 2016-02-18 11:00:40 -0800 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2016-02-29 18:04:36 -0800 |
commit | 390efedcb7e17587da765b6d682077cb7fa46ee1 (patch) | |
tree | 8a8016f57fbcc5c5848ef95536b653171e05cb2d /common/utils.h | |
parent | 14fd1ec41d1da4e849b724b762ca111a30c6628c (diff) |
Parse postinstall parameters from the payload metadata.
Payload v2 includes a description of the post-install command it should
run, while in payload v1 we use the default values. This patch mounts
the partition on the new top-level directory called /postinstall that
should already be created.
Bug: 27177071
TEST=FEATURES=test emerge-link update_engine
Change-Id: Iaedf3b01e5e1ad57c68bd316b4b6e79cbab35bb6
Diffstat (limited to 'common/utils.h')
-rw-r--r-- | common/utils.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/common/utils.h b/common/utils.h index 5bf14224..8da0726c 100644 --- a/common/utils.h +++ b/common/utils.h @@ -171,10 +171,13 @@ std::string MakePartitionName(const std::string& disk_name, std::string MakePartitionNameForMount(const std::string& part_name); // Synchronously mount or unmount a filesystem. Return true on success. -// When mounting, it will attempt to mount the the device as "ext3", "ext2" and -// "squashfs", with the passed |flags| options. -bool MountFilesystem(const std::string& device, const std::string& mountpoint, - unsigned long flags); // NOLINT(runtime/int) +// When mounting, it will attempt to mount the device as the passed filesystem +// type |type|, with the passed |flags| options. If |type| is empty, "ext2", +// "ext3", "ext4" and "squashfs" will be tried. +bool MountFilesystem(const std::string& device, + const std::string& mountpoint, + unsigned long flags, // NOLINT(runtime/int) + const std::string& type); bool UnmountFilesystem(const std::string& mountpoint); // Returns the block count and the block byte size of the file system on |