]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: fix typo
authorKarel Zak <kzak@redhat.com>
Fri, 21 Nov 2014 08:42:23 +0000 (09:42 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 21 Nov 2014 08:42:23 +0000 (09:42 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/alignment.c
libfdisk/src/context.c
libfdisk/src/label.c
libfdisk/src/partition.c
libfdisk/src/parttype.c
libfdisk/src/script.c
libfdisk/src/table.c
libfdisk/src/utils.c
term-utils/agetty.c

index 09860703bf0502bd07e6eca49bb6d22fe0a82f92..90f21bc6991bfec8a6779280b060440e474e5476 100644 (file)
@@ -193,11 +193,11 @@ static void recount_geometry(struct fdisk_context *cxt)
  * @heads: user specified heads
  * @sectors: user specified sectors
  *
- * Overrides auto-discovery. The function fdisk_reset_device_properties() 
+ * Overrides auto-discovery. The function fdisk_reset_device_properties()
  * restores the original setting.
  *
  * The difference between fdisk_override_geometry() and fdisk_save_user_geometry()
- * is that saved user geometry is persistent setting and it's applied always 
+ * is that saved user geometry is persistent setting and it's applied always
  * when device is assigned to the context or device properties are reseted.
  *
  * Returns: 0 on success, < 0 on error.
@@ -238,7 +238,7 @@ int fdisk_override_geometry(struct fdisk_context *cxt,
  *
  * Save user defined geometry to use it for partitioning.
  *
- * The user properties are applied by fdisk_assign_device() or 
+ * The user properties are applied by fdisk_assign_device() or
  * fdisk_reset_device_properties().
 
  * Returns: <0 on error, 0 on success.
index 5385baaae7861546ecc1f1349439016ded7a501d..698e71d939b02c3855a05ca6248eb8f148d8e6e8 100644 (file)
@@ -197,6 +197,10 @@ void fdisk_ref_context(struct fdisk_context *cxt)
  *
  * If no @name specified then returns the current context label.
  *
+ * The label is allocated and maintained within the context #cxt. There is
+ * nothing like reference counting for labels, you cannot delallocate the
+ * label.
+ *
  * Returns: label struct or NULL in case of error.
  */
 struct fdisk_label *fdisk_get_label(struct fdisk_context *cxt, const char *name)
index 12ad1dc3024f5522a0297ec2d4d840c4daa38666..a12bc838e2dc7a32a6ebd13fcb1397984099d54d 100644 (file)
@@ -10,7 +10,9 @@
  * The fdisk_new_context() initializes all label drivers, and allocate
  * per-label specific data struct. This concept allows to store label specific
  * settings to the label driver independently on the currently active label
- * driver.
+ * driver. Note that lable struct cannot be deallocated, so there is no
+ * reference counting for fdisk_label objects. All is destroyed by
+ * fdisk_unref_context() only.
  *
  * Anyway, all label drives share in-memory first sector. The function
  * fdisk_create_disklabel() overwrites the sector. But it's possible that
index ee33d7bdf1c3e4be7ec964760f76785774197c36..1af3cf245aa578d612d2ca114f2f933577a4c728 100644 (file)
@@ -4,6 +4,18 @@
 
 #include "fdiskP.h"
 
+/**
+ * SECTION: partition
+ * @title: partition abstraction
+ * @short_description: generic label independent partition
+ *
+ * The fdisk_partition provides label independent abstraction. The partitions
+ * are not directly connected with partition table (label) data. Any change to
+ * fdisk_partition does not affects in-memory or on-disk label data.
+ *
+ * The fdisk_partition is possible to use as a template for
+ * fdisk_add_partition() or fdisk_set_partition() operations.
+ */
 
 static void init_partition(struct fdisk_partition *pa)
 {
index 2bcf69d6f565e29705835b0ea0acd24f4422e99c..1e39eff104d9e05baf04cb556b80070d963f8106 100644 (file)
@@ -2,9 +2,16 @@
 #include <ctype.h>
 
 #include "nls.h"
-
 #include "fdiskP.h"
 
+/**
+ * SECTION: parttypw
+ * @title: Partition types
+ * @short_description: abstraction to partition types
+ *
+ * There are two basic types of parttypes, string based (e.g. GPT)
+ * and code/hex based (e.g. MBR).
+ */
 
 /**
  * fdisk_new_parttype:
index 5047461d5afa51f66825c64d331cf46279ad8fb9..2353cb8a22eca760723070140c8ffd50d723fbf1 100644 (file)
@@ -2,6 +2,18 @@
 #include "fdiskP.h"
 #include "strutils.h"
 
+/**
+ * SECTION: script
+ * @title: Partition table script
+ * @short_description: text based description of partition table
+ *
+ * The libfdisk scripts are based on original sfdisk script (dumps).  Each
+ * script has two parts: script headers and partition table entries
+ * (partitions).
+ *
+ * For more details about script format see sfdisk man page.
+ */
+
 /* script header (e.g. unit: sectors) */
 struct fdisk_scriptheader {
        struct list_head        headers;
index 63531f24387c8f64261e2167b04c4ecf19384d07..3a78e9e024f3635f3a905d3244248edded71937e 100644 (file)
@@ -1,6 +1,16 @@
 
 #include "fdiskP.h"
 
+/**
+ * SECTION: table
+ * @title: table
+ * @short_description: container for fdisk partitions
+ *
+ * The fdisk_table is simple container for fdisk_partitions. The table is no
+ * directly connected to label data (partition table), and table changes don't
+ * affect in-memory or on-disk data.
+ */
+
 /**
  * fdisk_new_table:
  *
index da6b01c2b482da6efd20f9ea5a90ab2dd733dce0..b705f9eb4ab3cb580a21878c40152248e4db3d3d 100644 (file)
@@ -4,6 +4,12 @@
 
 #include <ctype.h>
 
+/**
+ * SECTION: utils
+ * @title: Misc utils
+ * @short_description: misc fdisk functions
+ */
+
 /*
  * Zeros in-memory first sector buffer
  */
@@ -74,7 +80,7 @@ int fdisk_read_firstsector(struct fdisk_context *cxt)
  * dev: device name
  * @partno: partition name
  *
- * Return: allocated buffer with partition name
+ * Return: allocated buffer with partition name, use free() to deallocate.
  */
 char *fdisk_partname(const char *dev, size_t partno)
 {
index 34ad7f230d07906f735c2c90bab0de3f0393563e..f7ae570fbf84e020e731ce3b434f8a2ea2e967ee 100644 (file)
@@ -390,7 +390,7 @@ int main(int argc, char **argv)
        /* Default is to follow the current line speend and then default to 9600 */
        if ((options.flags & F_VCONSOLE) == 0 && options.numspeed == 0) {
                options.speeds[options.numspeed++] = bcode("9600");
-               options.flags |= F_KEEPSPEED
+               options.flags |= F_KEEPSPEED;
        }
 
        /* Initialize the termios settings (raw mode, eight-bit, blocking i/o). */