libstorage-ng
Toggle main menu visibility
Loading...
Searching...
No Matches
Msdos.h
1
/*
2
* Copyright (c) [2014-2015] Novell, Inc.
3
* Copyright (c) [2016-2020] SUSE LLC
4
*
5
* All Rights Reserved.
6
*
7
* This program is free software; you can redistribute it and/or modify it
8
* under the terms of version 2 of the GNU General Public License as published
9
* by the Free Software Foundation.
10
*
11
* This program is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14
* more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program; if not, contact Novell, Inc.
18
*
19
* To contact Novell about this file by physical or electronic mail, you may
20
* find current contact information at www.novell.com.
21
*/
22
23
24
#ifndef STORAGE_MSDOS_H
25
#define STORAGE_MSDOS_H
26
27
28
#include "storage/Devices/PartitionTable.h"
29
30
31
namespace
storage
32
{
33
34
class
Msdos :
public
PartitionTable
35
{
36
public
:
37
44
static
Msdos*
create
(
Devicegraph
* devicegraph);
45
46
static
Msdos* load(
Devicegraph
* devicegraph,
const
xmlNode* node);
47
48
public
:
49
50
class
Impl;
51
52
Impl& get_impl();
53
const
Impl& get_impl()
const
;
54
55
virtual
Msdos* clone()
const override
;
56
virtual
std::unique_ptr<Device> clone_v2()
const override
;
57
65
unsigned
long
get_minimal_mbr_gap
()
const
;
66
72
void
set_minimal_mbr_gap
(
unsigned
long
minimal_mbr_gap);
73
74
Msdos(Impl* impl);
75
ST_NO_SWIG Msdos(std::unique_ptr<Device::Impl>&& impl);
76
77
};
78
79
85
bool
is_msdos
(
const
Device
* device);
86
93
Msdos
*
to_msdos
(
Device
* device);
94
98
const
Msdos
*
to_msdos
(
const
Device
* device);
99
100
}
101
102
103
#endif
storage::Device
An abstract base class for storage devices.
Definition
Device.h:82
storage::Devicegraph
The main container of the libstorage-ng.
Definition
Devicegraph.h:170
storage::Msdos
Definition
Msdos.h:35
storage::Msdos::create
static Msdos * create(Devicegraph *devicegraph)
Create a device of type Msdos.
storage::Msdos::get_minimal_mbr_gap
unsigned long get_minimal_mbr_gap() const
Get the size of the MBR gap (see https://en.wikipedia.org/wiki/BIOS_boot_partition).
storage::Msdos::set_minimal_mbr_gap
void set_minimal_mbr_gap(unsigned long minimal_mbr_gap)
Set the size of the MBR gap.
storage
The storage namespace.
Definition
Actiongraph.h:40
storage::to_msdos
Msdos * to_msdos(Device *device)
Converts pointer to Device to pointer to Msdos.
storage::is_msdos
bool is_msdos(const Device *device)
Checks whether device points to an Msdos.
storage
Devices
Msdos.h
Generated by
1.17.0