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

Unified Diff: delta_performer.cc

Issue 3723005: AU: Pass opened device fd from update engine to bspatch. (Closed) Base URL: ssh://git@chromiumos-git/update_engine.git
Patch Set: fix for review (StringPrintf()) Created 10 years, 2 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 | « no previous file | subprocess.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: delta_performer.cc
diff --git a/delta_performer.cc b/delta_performer.cc
index 7ee9d4fb20976e0db6a23d178a23e1da6ccf20c8..d1110158f5f33f287e8ac33798803a7d18cb72f2 100644
--- a/delta_performer.cc
+++ b/delta_performer.cc
@@ -446,7 +446,7 @@ bool DeltaPerformer::PerformBsdiffOperation(
}
int fd = is_kernel_partition ? kernel_fd_ : fd_;
- const string& path = is_kernel_partition ? kernel_path_ : path_;
+ const string& path = StringPrintf("/dev/fd/%d", fd);
// If this is a non-idempotent operation, request a delayed exit and clear the
// update state in case the operation gets interrupted. Do this as late as
@@ -464,7 +464,10 @@ bool DeltaPerformer::PerformBsdiffOperation(
cmd.push_back(input_positions);
cmd.push_back(output_positions);
int return_code = 0;
- TEST_AND_RETURN_FALSE(Subprocess::SynchronousExec(cmd, &return_code));
+ TEST_AND_RETURN_FALSE(
+ Subprocess::SynchronousExecFlags(cmd,
+ &return_code,
+ G_SPAWN_LEAVE_DESCRIPTORS_OPEN));
TEST_AND_RETURN_FALSE(return_code == 0);
if (operation.dst_length() % block_size_) {
« no previous file with comments | « no previous file | subprocess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698