forked from coreos/update_engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfull_update_generator.h
41 lines (33 loc) · 1.41 KB
/
full_update_generator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// 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_FULL_UPDATE_GENERATOR_H__
#define CHROMEOS_PLATFORM_UPDATE_ENGINE_FULL_UPDATE_GENERATOR_H__
#include <glib.h>
#include "update_engine/graph_types.h"
namespace chromeos_update_engine {
class FullUpdateGenerator {
public:
// Given a new rootfs and kernel (|new_image|, |new_kernel_part|), reads them
// sequentially, creating a full update of chunk_size chunks. Populates
// |graph|, |kernel_ops|, and |final_order|, with data about the update
// operations, and writes relevant data to |fd|, updating |data_file_size| as
// it does. Only the first |image_size| bytes are read from |new_image|
// assuming that this is the actual file system.
static bool Run(
Graph* graph,
const std::string& new_kernel_part,
const std::string& new_image,
off_t image_size,
int fd,
off_t* data_file_size,
off_t chunk_size,
off_t block_size,
std::vector<DeltaArchiveManifest_InstallOperation>* kernel_ops,
std::vector<Vertex::Index>* final_order);
private:
// This should never be constructed.
DISALLOW_IMPLICIT_CONSTRUCTORS(FullUpdateGenerator);
};
} // namespace chromeos_update_engine
#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_FULL_UPDATE_GENERATOR_H__