]> git.ipfire.org Git - thirdparty/util-linux.git/blame - libfdisk/src/libfdisk.h
libfdisk: add alignment code
[thirdparty/util-linux.git] / libfdisk / src / libfdisk.h
CommitLineData
d56a7c23
KZ
1/*
2 * libfdisk.h - libfdisk API
3 *
4 * Copyright (C) 2012 Karel Zak <kzak@redhat.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
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the 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 General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef _LIBFDISK_FDISK_H
22#define _LIBFDISK_FDISK_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
a5fe1b3f
KZ
28struct fdisk_context;
29struct fdisk_parttype;
30
d56a7c23
KZ
31/* init.c */
32extern void fdisk_init_debug(int mask);
33
a5fe1b3f
KZ
34/* parttype.c */
35extern struct fdisk_parttype *fdisk_get_parttype_from_code(struct fdisk_context *cxt,
36 unsigned int code);
37extern struct fdisk_parttype *fdisk_get_parttype_from_string(struct fdisk_context *cxt,
38 const char *str);
39extern struct fdisk_parttype *fdisk_parse_parttype(struct fdisk_context *cxt, const char *str);
40
41extern struct fdisk_parttype *fdisk_new_unknown_parttype(unsigned int type, const char *typestr);
42extern void fdisk_free_parttype(struct fdisk_parttype *type);
43extern size_t fdisk_get_nparttypes(struct fdisk_context *cxt);
44
d56a7c23
KZ
45#ifdef __cplusplus
46}
47#endif
48
49#endif /* _LIBFDISK_FDISK_H */