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

Unified Diff: metadata.h

Issue 5684002: Add support for bsdiff of file system metadata blocks (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Forgot newly added metadata processing files. Created 10 years 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
Index: metadata.h
diff --git a/metadata.h b/metadata.h
new file mode 100644
index 0000000000000000000000000000000000000000..c9e04e993d3f0fc34504ede0a87e26a2a2b41596
--- /dev/null
+++ b/metadata.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_METADATA_H__
+#define CHROMEOS_PLATFORM_UPDATE_ENGINE_METADATA_H__
+
+#include "update_engine/delta_diff_generator.h"
+#include "update_engine/graph_types.h"
+
+namespace chromeos_update_engine {
+
+// Reads metadata from old image and new image and determines
+// the smallest way to encode the metadata for the diff.
+// If there's no change in the metadata, it creates a MOVE
+// operation. If there is a change, the smallest of REPLACE, REPLACE_BZ,
+// or BSDIFF wins. It writes the diff to data_fd and updates data_file_size
+// accordingly. It also adds the required operation to the graph and adds the
+// metadata extents to blocks.
+// Returns true on success.
+bool DeltaReadMetadata(Graph* graph,
petkov 2010/12/15 18:40:32 This should probably be a static member of a class
thieule 2010/12/15 19:57:01 Done.
+ std::vector<DeltaDiffGenerator::Block>* blocks,
+ const std::string& old_image,
+ const std::string& new_image,
+ int data_fd,
+ off_t* data_file_size);
+
+}; // namespace chromeos_update_engine
+
+#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_METADATA_H__

Powered by Google App Engine
This is Rietveld 408576698