summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/bsd.c
diff options
context:
space:
mode:
authorKarel Zak2014-11-26 10:28:37 +0100
committerKarel Zak2014-11-26 10:28:37 +0100
commita4e6a45e54e10567aaa7a501e3e69bf533440193 (patch)
treece9da96dd41ea74031a2bc8671929d4451d621dd /libfdisk/src/bsd.c
parentlibfdisk: cleanup ask API, add comments (diff)
downloadkernel-qcow2-util-linux-a4e6a45e54e10567aaa7a501e3e69bf533440193.tar.gz
kernel-qcow2-util-linux-a4e6a45e54e10567aaa7a501e3e69bf533440193.tar.xz
kernel-qcow2-util-linux-a4e6a45e54e10567aaa7a501e3e69bf533440193.zip
libfdisk: add docs for BSD functions
Diffstat (limited to 'libfdisk/src/bsd.c')
-rw-r--r--libfdisk/src/bsd.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c
index 28b37babd..ab8cecfb8 100644
--- a/libfdisk/src/bsd.c
+++ b/libfdisk/src/bsd.c
@@ -23,6 +23,14 @@
#include "pt-bsd.h"
#include "all-io.h"
+
+/**
+ * SECTION: bsd
+ * @title: BSD functions
+ * @short_description: BSD disklabel specific libfdisk functions
+ *
+ */
+
static const char *bsd_dktypenames[] = {
"unknown",
"SMD",
@@ -527,6 +535,14 @@ static uint16_t ask_uint16(struct fdisk_context *cxt,
return dflt;
}
+/**
+ * fdisk_bsd_edit_disklabel:
+ * @cxt: context
+ *
+ * Edits fields in BSD disk label.
+ *
+ * Returns: 0 on success, <0 on error
+ */
int fdisk_bsd_edit_disklabel(struct fdisk_context *cxt)
{
struct bsd_disklabel *d = self_disklabel(cxt);
@@ -579,6 +595,12 @@ static int bsd_get_bootstrap(struct fdisk_context *cxt,
return 0;
}
+/**
+ * fdisk_bsd_write_bootstrap:
+ * @cxt: context
+ *
+ * Install bootstrap file to the BSD device
+ */
int fdisk_bsd_write_bootstrap(struct fdisk_context *cxt)
{
struct bsd_disklabel dl, *d = self_disklabel(cxt);
@@ -847,8 +869,13 @@ static int bsd_translate_fstype (int linux_type)
return BSD_FS_OTHER;
}
-/*
- * link partition from parent (DOS) to nested BSD partition table
+/**
+ * fdisk_bsd_link_partition:
+ * @cxt: context
+ *
+ * Links partition from parent (DOS) to nested BSD partition table.
+ *
+ * Returns: 0 on success, <0 on error
*/
int fdisk_bsd_link_partition(struct fdisk_context *cxt)
{