OSDN Git Service

libefiboot: make everything use "struct device" and kill "struct disk_info"
[android-x86/external-efivar.git] / src / disk.h
1 /*
2  * libefiboot - library for the manipulation of EFI boot variables
3  * Copyright 2012-2015 Red Hat, Inc.
4  * Copyright (C) 2001 Dell Computer Corporation <Matt_Domsch@dell.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License as
8  * published by the Free Software Foundation; either version 2.1 of the
9  * License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, see
18  * <http://www.gnu.org/licenses/>.
19  *
20  */
21 #ifndef _EFIBOOT_DISK_H
22 #define _EFIBOOT_DISK_H
23
24 extern bool HIDDEN is_partitioned(int fd);
25
26 extern HIDDEN ssize_t _make_hd_dn(uint8_t *buf, ssize_t size, int fd,
27                                   int32_t partition, uint32_t options);
28 #define make_hd_dn(buf, size, off, fd, partition, option) \
29         _make_hd_dn(((buf)+(off)), ((size)?((size)-(off)):0), (fd),\
30                     (partition), (options))
31
32 #endif /* _EFIBOOT_DISK_H */