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

Unified Diff: image_burn_service.cc

Issue 6357012: Use chromeos::IsBootDevicePath. (Closed) Base URL: http://git.chromium.org/git/image-burner.git@master
Patch Set: lint Created 9 years, 11 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 | « image_burn_service.h ('k') | image_burner_tester.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: image_burn_service.cc
diff --git a/image_burn_service.cc b/image_burn_service.cc
index 727d81c4e3db01d40099f202eeb65bfe9f2f7316..4d7cd940944f25b23a6b76811e301a16e7fc321e 100644
--- a/image_burn_service.cc
+++ b/image_burn_service.cc
@@ -15,7 +15,6 @@
#include <cros/chromeos_cros_api.h>
#include <cros/chromeos_mount.h>
#include <dbus/dbus-glib-lowlevel.h>
-#include <rootdev/rootdev.h>
#include <fstream>
#include <string>
@@ -170,18 +169,8 @@ void ImageBurnService::InitiateBurning(const char* from_path,
burning_ = false;
}
-bool ImageBurnService::IsBootPath(const char* device_path) {
- char boot_path[PATH_MAX];
- if (rootdev(boot_path, sizeof(boot_path), true, true)) {
- LOG(ERROR) << "IsBootPath: rootdev failed to find the root device";
- return true;
- }
-
- return (strncmp(device_path, boot_path, strlen(boot_path)) == 0);
-}
-
bool ImageBurnService::UnmountAndValidateDevice(const char* device_path) {
- if (IsBootPath(device_path)) {
+ if (chromeos::IsBootDevicePath(device_path)) {
LOG(ERROR) << device_path << " is on root device";
return false;
}
« no previous file with comments | « image_burn_service.h ('k') | image_burner_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698