summaryrefslogtreecommitdiffstats
path: root/libparted/tests/common.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:16:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:16:34 +0000
commita398d2c2b5fd6ab0545d8bb019f9a970b2309404 (patch)
tree272fc7ab226258d7ceddee12c8c682c8e711c2b0 /libparted/tests/common.h
parentInitial commit. (diff)
downloadparted-a398d2c2b5fd6ab0545d8bb019f9a970b2309404.tar.xz
parted-a398d2c2b5fd6ab0545d8bb019f9a970b2309404.zip
Adding upstream version 3.6.upstream/3.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libparted/tests/common.h')
-rw-r--r--libparted/tests/common.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libparted/tests/common.h b/libparted/tests/common.h
new file mode 100644
index 0000000..5d7485e
--- /dev/null
+++ b/libparted/tests/common.h
@@ -0,0 +1,31 @@
+#include <parted/parted.h>
+
+/* Determine sector size from environment
+ *
+ */
+size_t get_sector_size (void);
+
+/* Create an empty disk image
+ *
+ * filename: file (with full path) where to write the disk image
+ * size: size of disk image (megabytes)
+ */
+char* _create_disk (const off_t size);
+
+/* Create a disk label
+ *
+ * dev: device to use when creating the label
+ * type: label type
+ */
+PedDisk* _create_disk_label (PedDevice* dev, PedDiskType* type);
+
+/* Return if a disk label is implemented
+ *
+ * label: disk label name
+ */
+int _implemented_disk_label (const char* label) _GL_ATTRIBUTE_PURE;
+
+/* Test specific exception handler
+ *
+ */
+PedExceptionOption _test_exception_handler (PedException* e);