]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - disk-utils/fdisk-list.h
a30cd6a5159c4e082c05d257ef95a32f1c3a7951
2 * SPDX-License-Identifier: GPL-2.0-or-later
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * Copyright (C) 2014-2023 Karel Zak <kzak@redhat.com>
11 #ifndef UTIL_LINUX_FDISK_LIST_H
12 #define UTIL_LINUX_FDISK_LIST_H
14 extern void list_disklabel(struct fdisk_context
*cxt
);
15 extern void list_disk_identifier(struct fdisk_context
*cxt
);
16 extern void list_disk_geometry(struct fdisk_context
*cxt
);
17 extern void list_freespace(struct fdisk_context
*cxt
);
19 extern char *next_proc_partition(FILE **f
);
20 extern int print_device_pt(struct fdisk_context
*cxt
, char *device
, int warnme
, int verify
, int separator
);
21 extern int print_device_freespace(struct fdisk_context
*cxt
, char *device
, int warnme
, int separator
);
23 extern void print_all_devices_pt(struct fdisk_context
*cxt
, int verify
);
24 extern void print_all_devices_freespace(struct fdisk_context
*cxt
);
26 extern void list_available_columns(FILE *out
);
27 extern int *init_fields(struct fdisk_context
*cxt
, const char *str
, size_t *n
);
30 /* used by fdisk and sfdisk */
37 static inline int wipemode_from_string(const char *str
)
40 static const char *modes
[] = {
41 [WIPEMODE_AUTO
] = "auto",
42 [WIPEMODE_NEVER
] = "never",
43 [WIPEMODE_ALWAYS
] = "always"
49 for (i
= 0; i
< ARRAY_SIZE(modes
); i
++) {
50 if (strcasecmp(str
, modes
[i
]) == 0)
57 #endif /* UTIL_LINUX_FDISK_LIST_H */