blob: e5130406ebfdc3e5fe061d4d24733e9a14384363 [file] [log] [blame]
// Copyright 2020 The Fuchsia 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 SRC_STORAGE_GPT_GPT_H_
#define SRC_STORAGE_GPT_GPT_H_
#include <gpt/gpt.h>
#include <mbr/mbr.h>
namespace gpt {
// Create a mbr::Mbr containing a single protective MBR partition,
// covering the whole disk.
//
// A protective MBR avoids legacy operating systems from incorrectly
// detecting the disk as containing no data (when in fact it is using
// a GPT) and possibly attempting to format the disk, etc.
mbr::Mbr MakeProtectiveMbr(uint64_t blocks_in_disk);
} // namespace gpt
#endif // SRC_STORAGE_GPT_GPT_H_