Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Unified Diff: src/platform/update_engine/utils.h

Issue 1881001: AU: Many minor cleanup changes (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/update_engine/update_check_action_unittest.cc ('k') | src/platform/update_engine/utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/utils.h
diff --git a/src/platform/update_engine/utils.h b/src/platform/update_engine/utils.h
index e5d099f1c94dccbef9461d7ec70e0b90c986ec08..c6edb7d985e232883d2463131d5f636136aba870 100644
--- a/src/platform/update_engine/utils.h
+++ b/src/platform/update_engine/utils.h
@@ -77,12 +77,28 @@ bool MakeTempDirectory(const std::string& dirname_template,
// This WILL cross filesystem boundaries.
bool RecursiveUnlinkDir(const std::string& path);
+// Returns the root device for a partition. For example,
+// RootDevice("/dev/sda3") returns "/dev/sda".
+std::string RootDevice(const std::string& partition_device);
+
+// Returns the partition number, as a string, of partition_device. For example,
+// PartitionNumber("/dev/sda3") return "3".
+std::string PartitionNumber(const std::string& partition_device);
+
// Synchronously mount or unmount a filesystem. Return true on success.
// Mounts as ext3 with default options.
bool MountFilesystem(const std::string& device, const std::string& mountpoint,
unsigned long flags);
bool UnmountFilesystem(const std::string& mountpoint);
+enum BootLoader {
+ BootLoader_SYSLINUX = 0,
+ BootLoader_CHROME_FIRMWARE = 1
+};
+// Detects which bootloader this system uses and returns it via the out
+// param. Returns true on success.
+bool GetBootloader(BootLoader* out_bootloader);
+
// Returns the error message, if any, from a GError pointer.
const char* GetGErrorMessage(const GError* error);
« no previous file with comments | « src/platform/update_engine/update_check_action_unittest.cc ('k') | src/platform/update_engine/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698