blob: d98ee2de3cd09b94944929f3a75f3302ab943e8b [file] [log] [blame]
Tom Marshallecb52062019-01-15 10:07:29 -08001/*
2 * Copyright (C) 2008 The Lineage Android Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef __SGDISK
18#define __SGDISK
19
20#include <string>
21#include <vector>
22
23enum ptbl_type {
24 MBR,
25 GPT
26};
27
28struct sgdisk_partition_table {
29 ptbl_type type;
30 std::string guid;
31};
32
33struct sgdisk_partition {
34 int num;
35 std::string type;
36 std::string guid;
37 std::string name;
38};
39
40int sgdisk_read(const char* device, sgdisk_partition_table& ptbl,
41 std::vector<sgdisk_partition>& partitions);
42
43#endif