summaryrefslogtreecommitdiffstats
path: root/libfdisk
diff options
context:
space:
mode:
authorSebastian Rasmussen2016-05-29 23:11:53 +0200
committerSebastian Rasmussen2016-05-31 23:40:21 +0200
commit9e93004171eb0c4c288051b2d7bb37f97a0ae430 (patch)
tree369493906bb3c1c6f2554609c737ada0230f4b2e /libfdisk
parentdocs: Fix various typos (diff)
downloadkernel-qcow2-util-linux-9e93004171eb0c4c288051b2d7bb37f97a0ae430.tar.gz
kernel-qcow2-util-linux-9e93004171eb0c4c288051b2d7bb37f97a0ae430.tar.xz
kernel-qcow2-util-linux-9e93004171eb0c4c288051b2d7bb37f97a0ae430.zip
misc: Fix various typos
Fix various typos in error messages, warnings, debug strings, comments and names of static functions. Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
Diffstat (limited to 'libfdisk')
-rw-r--r--libfdisk/src/alignment.c14
-rw-r--r--libfdisk/src/ask.c14
-rw-r--r--libfdisk/src/bsd.c4
-rw-r--r--libfdisk/src/context.c16
-rw-r--r--libfdisk/src/dos.c16
-rw-r--r--libfdisk/src/fdiskP.h10
-rw-r--r--libfdisk/src/field.c4
-rw-r--r--libfdisk/src/gpt.c14
-rw-r--r--libfdisk/src/init.c2
-rw-r--r--libfdisk/src/item.c6
-rw-r--r--libfdisk/src/label.c12
-rw-r--r--libfdisk/src/partition.c12
-rw-r--r--libfdisk/src/parttype.c12
-rw-r--r--libfdisk/src/script.c16
-rw-r--r--libfdisk/src/sgi.c2
-rw-r--r--libfdisk/src/sun.c4
-rw-r--r--libfdisk/src/table.c8
17 files changed, 83 insertions, 83 deletions
diff --git a/libfdisk/src/alignment.c b/libfdisk/src/alignment.c
index aa082e189..58acefb89 100644
--- a/libfdisk/src/alignment.c
+++ b/libfdisk/src/alignment.c
@@ -215,7 +215,7 @@ static void recount_geometry(struct fdisk_context *cxt)
*
* The difference between fdisk_override_geometry() and fdisk_save_user_geometry()
* 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.
+ * when device is assigned to the context or device properties are reset.
*
* Returns: 0 on success, < 0 on error.
*/
@@ -287,7 +287,7 @@ int fdisk_save_user_geometry(struct fdisk_context *cxt,
* fdisk_save_user_sector_size:
* @cxt: context
* @phy: physical sector size
- * @log: logicla sector size
+ * @log: logical sector size
*
* Save user defined sector sizes to use it for partitioning.
*
@@ -331,7 +331,7 @@ int fdisk_apply_user_device_properties(struct fdisk_context *cxt)
if (!cxt)
return -EINVAL;
- DBG(CXT, ul_debugobj(cxt, "appling user device properties"));
+ DBG(CXT, ul_debugobj(cxt, "applying user device properties"));
if (cxt->user_pyh_sector)
cxt->phy_sector_size = cxt->user_pyh_sector;
@@ -403,7 +403,7 @@ int fdisk_reset_device_properties(struct fdisk_context *cxt)
if (!cxt)
return -EINVAL;
- DBG(CXT, ul_debugobj(cxt, "*** reseting device properties"));
+ DBG(CXT, ul_debugobj(cxt, "*** resetting device properties"));
fdisk_zeroize_device_properties(cxt);
fdisk_discover_topology(cxt);
@@ -546,7 +546,7 @@ static fdisk_sector_t topology_get_first_lba(struct fdisk_context *cxt)
* a2) alignment offset
* a1) or physical sector (minimal_io_size, aka "grain")
*
- * b) or default to 1MiB (2048 sectrors, Windows Vista default)
+ * b) or default to 1MiB (2048 sectors, Windows Vista default)
*
* c) or for very small devices use 1 phy.sector
*/
@@ -608,7 +608,7 @@ int fdisk_reset_alignment(struct fdisk_context *cxt)
if (!cxt)
return -EINVAL;
- DBG(CXT, ul_debugobj(cxt, "reseting alignment..."));
+ DBG(CXT, ul_debugobj(cxt, "resetting alignment..."));
/* default */
cxt->grain = topology_get_grain(cxt);
@@ -619,7 +619,7 @@ int fdisk_reset_alignment(struct fdisk_context *cxt)
if (cxt->label && cxt->label->op->reset_alignment)
rc = cxt->label->op->reset_alignment(cxt);
- DBG(CXT, ul_debugobj(cxt, "alignment reseted to: "
+ DBG(CXT, ul_debugobj(cxt, "alignment reset to: "
"first LBA=%ju, last LBA=%ju, grain=%lu [rc=%d]",
(uintmax_t) cxt->first_lba, (uintmax_t) cxt->last_lba,
cxt->grain, rc));
diff --git a/libfdisk/src/ask.c b/libfdisk/src/ask.c
index cbf5e9738..5a0952271 100644
--- a/libfdisk/src/ask.c
+++ b/libfdisk/src/ask.c
@@ -62,7 +62,7 @@ void fdisk_reset_ask(struct fdisk_ask *ask)
* fdisk_ref_ask:
* @ask: ask instance
*
- * Incremparts reference counter.
+ * Increments reference counter.
*/
void fdisk_ref_ask(struct fdisk_ask *ask)
{
@@ -75,7 +75,7 @@ void fdisk_ref_ask(struct fdisk_ask *ask)
* fdisk_unref_ask:
* @ask: ask instance
*
- * De-incremparts reference counter, on zero the @ask is automatically
+ * Decrements reference counter, on zero the @ask is automatically
* deallocated.
*/
void fdisk_unref_ask(struct fdisk_ask *ask)
@@ -318,7 +318,7 @@ int fdisk_ask_number_is_relative(struct fdisk_ask *ask)
*
* Inform libfdisk that user specified number in relative notation rather than
* by explicit number. This info allows to fdisk do some optimization (e.g.
- * align end of partiton, etc.)
+ * align end of partition, etc.)
*
* Returns: 0 on success, <0 on error
*/
@@ -467,7 +467,7 @@ int fdisk_ask_partnum(struct fdisk_context *cxt, size_t *partnum, int wantnew)
if (!rc && !wantnew && num->low == num->hig) {
if (num->low > 0) {
- /* only one existing partiton, don't ask, return the number */
+ /* only one existing partition, don't ask, return the number */
fdisk_ask_number_set_result(ask, num->low);
fdisk_info(cxt, _("Selected partition %ju"), num->low);
@@ -627,7 +627,7 @@ int fdisk_ask_string(struct fdisk_context *cxt,
* @query: question string
* @result: returns 0 (no) or 1 (yes)
*
- * Hight-level API to ask Yes/No questions
+ * High-level API to ask Yes/No questions
*
* Returns: 0 on success, <0 on error
*/
@@ -919,7 +919,7 @@ static int do_vprint(struct fdisk_context *cxt, int errnum, int type,
* fdisk_info:
* @cxt: context
* @fmt: printf-like formatted string
- * @...: variable parametrs
+ * @...: variable parameters
*
* High-level API to print info messages,
*
@@ -941,7 +941,7 @@ int fdisk_info(struct fdisk_context *cxt, const char *fmt, ...)
* fdisk_info:
* @cxt: context
* @fmt: printf-like formatted string
- * @...: variable parametrs
+ * @...: variable parameters
*
* High-level API to print warning message (errno expected)
*
diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c
index 099a8cc13..ad0a54f6f 100644
--- a/libfdisk/src/bsd.c
+++ b/libfdisk/src/bsd.c
@@ -191,7 +191,7 @@ static int bsd_probe_label(struct fdisk_context *cxt)
int rc = 0;
if (cxt->parent)
- rc = bsd_assign_dos_partition(cxt); /* nested BSD partiotn table */
+ rc = bsd_assign_dos_partition(cxt); /* nested BSD partition table */
if (!rc)
rc = bsd_readlabel(cxt);
if (!rc)
@@ -524,7 +524,7 @@ static int bsd_get_disklabel_item(struct fdisk_context *cxt, struct fdisk_labeli
break;
default:
if (item->id < __FDISK_NLABELITEMS)
- rc = 1; /* unssupported generic item */
+ rc = 1; /* unsupported generic item */
else
rc = 2; /* out of range */
break;
diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c
index ab4709c4a..1c949432e 100644
--- a/libfdisk/src/context.c
+++ b/libfdisk/src/context.c
@@ -206,7 +206,7 @@ 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
+ * nothing like reference counting for labels, you cannot deallocate the
* label.
*
* Returns: label struct or NULL in case of error.
@@ -613,7 +613,7 @@ int fdisk_assign_device(struct fdisk_context *cxt,
if (fdisk_read_firstsector(cxt) < 0)
goto fail;
- /* detect labels and apply labes specific stuff (e.g geomery)
+ /* detect labels and apply labels specific stuff (e.g geometry)
* to the context */
fdisk_probe_labels(cxt);
@@ -732,7 +732,7 @@ void fdisk_unref_context(struct fdisk_context *cxt)
/**
* fdisk_enable_details:
* @cxt: context
- * @enable: true/flase
+ * @enable: true/false
*
* Enables or disables "details" display mode. This function has effect to
* fdisk_partition_to_string() function.
@@ -761,7 +761,7 @@ int fdisk_is_details(struct fdisk_context *cxt)
/**
* fdisk_enable_listonly:
* @cxt: context
- * @enable: true/flase
+ * @enable: true/false
*
* Just list partition only, don't care about another details, mistakes, ...
*
@@ -795,7 +795,7 @@ int fdisk_is_listonly(struct fdisk_context *cxt)
* This is pure shit, unfortunately for example Sun addresses begin of the
* partition by cylinders...
*
- * Returns: 0 on succes, <0 on error.
+ * Returns: 0 on success, <0 on error.
*/
int fdisk_set_unit(struct fdisk_context *cxt, const char *str)
{
@@ -961,7 +961,7 @@ fdisk_sector_t fdisk_get_first_lba(struct fdisk_context *cxt)
* @lba: first possible logical sector for data
*
* It's strongly recommended to use the default library setting. The first LBA
- * is always reseted by fdisk_assign_device(), fdisk_override_geometry()
+ * is always reset by fdisk_assign_device(), fdisk_override_geometry()
* and fdisk_reset_alignment(). This is very low level function and library
* does not check if your setting makes any sense.
*
@@ -999,7 +999,7 @@ fdisk_sector_t fdisk_get_last_lba(struct fdisk_context *cxt)
* @lba: last possible logical sector
*
* It's strongly recommended to use the default library setting. The last LBA
- * is always reseted by fdisk_assign_device(), fdisk_override_geometry() and
+ * is always reset by fdisk_assign_device(), fdisk_override_geometry() and
* fdisk_reset_alignment().
*
* The default is number of sectors on the device, but maybe modified by the
@@ -1076,7 +1076,7 @@ const char *fdisk_get_devname(struct fdisk_context *cxt)
* fdisk_get_devfd:
* @cxt: context
*
- * Retruns: device file descriptor.
+ * Returns: device file descriptor.
*/
int fdisk_get_devfd(struct fdisk_context *cxt)
{
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
index 68cadcdd7..b2e1c6038 100644
--- a/libfdisk/src/dos.c
+++ b/libfdisk/src/dos.c
@@ -404,7 +404,7 @@ static int dos_delete_partition(struct fdisk_context *cxt, size_t partnum)
if (!pe)
return -EINVAL;
- DBG(LABEL, ul_debug("DOS: delete partiton %zu (max=%zu)", partnum,
+ DBG(LABEL, ul_debug("DOS: delete partition %zu (max=%zu)", partnum,
cxt->label->nparts_max));
l = self_label(cxt);
@@ -743,7 +743,7 @@ static int dos_reset_alignment(struct fdisk_context *cxt)
/* overwrite necessary stuff by DOS deprecated stuff */
if (is_dos_compatible(cxt)) {
- DBG(LABEL, ul_debug("DOS: reseting alignemnt for DOS-comaptiblem PT"));
+ DBG(LABEL, ul_debug("DOS: resetting alignment for DOS-compatible PT"));
if (cxt->geom.sectors)
cxt->first_lba = cxt->geom.sectors; /* usually 63 */
@@ -908,7 +908,7 @@ static int get_start_from_user( struct fdisk_context *cxt,
{
assert(start);
- /* try to use tepmlate from 'pa' */
+ /* try to use template from 'pa' */
if (pa && pa->start_follow_default)
*start = dflt;
@@ -1529,7 +1529,7 @@ static int dos_add_partition(struct fdisk_context *cxt,
/* pa specifies that extended partition is wanted */
} else if (pa && pa->type && IS_EXTENDED(pa->type->code)) {
- DBG(LABEL, ul_debug("DOS: pa template %p: add extened", pa));
+ DBG(LABEL, ul_debug("DOS: pa template %p: add extended", pa));
if (l->ext_offset) {
fdisk_warnx(cxt, _("Extended partition already exists."));
return -EINVAL;
@@ -1703,7 +1703,7 @@ static int write_sector(struct fdisk_context *cxt, fdisk_sector_t secno,
return rc;
}
- DBG(LABEL, ul_debug("DOS: writting to sector %ju", (uintmax_t) secno));
+ DBG(LABEL, ul_debug("DOS: writing to sector %ju", (uintmax_t) secno));
if (write(cxt->dev_fd, buf, cxt->sector_size) != (ssize_t) cxt->sector_size)
return -errno;
@@ -1734,7 +1734,7 @@ static int dos_write_disklabel(struct fdisk_context *cxt)
}
}
if (mbr_changed) {
- DBG(LABEL, ul_debug("DOS: MBR changed, writting"));
+ DBG(LABEL, ul_debug("DOS: MBR changed, writing"));
mbr_set_magic(cxt->firstsector);
rc = write_sector(cxt, 0, cxt->firstsector);
if (rc)
@@ -1859,7 +1859,7 @@ static int dos_get_disklabel_item(struct fdisk_context *cxt, struct fdisk_labeli
}
default:
if (item->id < __FDISK_NLABELITEMS)
- rc = 1; /* unssupported generic item */
+ rc = 1; /* unsupported generic item */
else
rc = 2; /* out of range */
break;
@@ -2096,7 +2096,7 @@ again:
*nxt->pt_entry = tmp;
/* Recount starts according to EBR offsets, the absolute
- * address tas to be still the same! */
+ * address still has to be the same! */
dos_partition_set_start(cur->pt_entry, nxt_start - cur->offset);
dos_partition_set_start(nxt->pt_entry, cur_start - nxt->offset);
diff --git a/libfdisk/src/fdiskP.h b/libfdisk/src/fdiskP.h
index 82561297d..159823c45 100644
--- a/libfdisk/src/fdiskP.h
+++ b/libfdisk/src/fdiskP.h
@@ -20,7 +20,7 @@
#include "c.h"
#include "libfdisk.h"
-#include "nls.h" /* temporary before dialog API will be implamented */
+#include "nls.h" /* temporary before dialog API will be implemented */
#include "list.h"
#include "debug.h"
#include <stdio.h>
@@ -246,7 +246,7 @@ struct fdisk_field {
int flags; /* FDISK_FIELDFL_* */
};
-/* note that the defauls is to display a column always */
+/* note that the defaults is to display a column always */
enum {
FDISK_FIELDFL_DETAIL = (1 << 1), /* only display if fdisk_is_details() */
FDISK_FIELDFL_EYECANDY = (1 << 2), /* don't display if fdisk_is_details() */
@@ -336,7 +336,7 @@ struct fdisk_ask {
} str;
/* FDISK_ASKTYPE_MENU */
struct ask_menu {
- int dfl; /* default meni item */
+ int dfl; /* default menu item */
int result;
struct ask_menuitem *first;
} menu;
@@ -362,7 +362,7 @@ struct fdisk_context {
unsigned int readonly : 1, /* don't write to the device */
display_in_cyl_units : 1, /* for obscure labels */
display_details : 1, /* expert display mode */
- protect_bootbits : 1, /* don't zeroize fll irst sector */
+ protect_bootbits : 1, /* don't zeroize first sector */
listonly : 1; /* list partition, nothing else */
char *collision; /* name of already existing FS/PT */
@@ -373,7 +373,7 @@ struct fdisk_context {
/* alignment */
unsigned long grain; /* alignment unit */
fdisk_sector_t first_lba; /* recommended begin of the first partition */
- fdisk_sector_t last_lba; /* recomennded end of last partition */
+ fdisk_sector_t last_lba; /* recommended end of last partition */
/* geometry */
fdisk_sector_t total_sectors; /* in logical sectors */
diff --git a/libfdisk/src/field.c b/libfdisk/src/field.c
index b9c5930a7..e924cf81f 100644
--- a/libfdisk/src/field.c
+++ b/libfdisk/src/field.c
@@ -6,7 +6,7 @@
* @title: Field
* @short_description: description of the partition fields
*
- * The fdisk fields are static user-freindly descriptions of the partition. The
+ * The fdisk fields are static user-friendly descriptions of the partition. The
* fields are used to avoid label specific stuff in the functions that list disk
* partitions (e.g. fdisk -l). The field Id is the same as Id for fdisk_partition_to_string().
*
@@ -37,7 +37,7 @@
* </informalexample>
*
* This example lists all information about the first partition. It will work
- * for MBR as well as for GPT because fields are not hardcoded in the execmple.
+ * for MBR as well as for GPT because fields are not hardcoded in the example.
*
* See also fdisk_label_get_field_by_name(), fdisk_label_get_fields_ids_all()
* and fdisk_label_get_fields_ids().
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
index 3028a392f..6f163c070 100644
--- a/libfdisk/src/gpt.c
+++ b/libfdisk/src/gpt.c
@@ -674,7 +674,7 @@ static int gpt_mknew_header(struct fdisk_context *cxt,
/* According to EFI standard it's valid to count all the first
* sector into header size, but some tools may have a problem
- * to accept it, so use the header without the zerozied area.
+ * to accept it, so use the header without the zeroed area.
* This does not have any impact to CRC, etc. --kzak Jan-2015
*/
header->size = cpu_to_le32(sizeof(struct gpt_header)
@@ -712,7 +712,7 @@ static int gpt_mknew_header(struct fdisk_context *cxt,
/*
* Checks if there is a valid protective MBR partition table.
* Returns 0 if it is invalid or failure. Otherwise, return
- * GPT_MBR_PROTECTIVE or GPT_MBR_HYBRID, depeding on the detection.
+ * GPT_MBR_PROTECTIVE or GPT_MBR_HYBRID, depending on the detection.
*/
static int valid_pmbr(struct fdisk_context *cxt)
{
@@ -876,7 +876,7 @@ static inline uint32_t gpt_entryarr_count_crc32(struct gpt_header *header, struc
/*
* Recompute header and partition array 32bit CRC checksums.
* This function does not fail - if there's corruption, then it
- * will be reported when checksuming it again (ie: probing or verify).
+ * will be reported when checksumming it again (ie: probing or verify).
*/
static void gpt_recompute_crc(struct gpt_header *header, struct gpt_entry *ents)
{
@@ -1121,7 +1121,7 @@ static int gpt_get_disklabel_item(struct fdisk_context *cxt, struct fdisk_labeli
break;
default:
if (item->id < __FDISK_NLABELITEMS)
- rc = 1; /* unssupported generic item */
+ rc = 1; /* unsupported generic item */
else
rc = 2; /* out of range */
break;
@@ -1171,7 +1171,7 @@ static uint32_t check_too_big_partitions(struct gpt_header *header,
* Check if a partition ends before it begins
* Returns the faulting partition number, otherwise 0.
*/
-static uint32_t check_start_after_end_paritions(struct gpt_header *header,
+static uint32_t check_start_after_end_partitions(struct gpt_header *header,
struct gpt_entry *ents)
{
uint32_t i;
@@ -1930,7 +1930,7 @@ err1:
/*
* Verify data integrity and report any found problems for:
* - primary and backup header validations
- * - paritition validations
+ * - partition validations
*/
static int gpt_verify_disklabel(struct fdisk_context *cxt)
{
@@ -2012,7 +2012,7 @@ static int gpt_verify_disklabel(struct fdisk_context *cxt)
ptnum);
}
- ptnum = check_start_after_end_paritions(gpt->pheader, gpt->ents);
+ ptnum = check_start_after_end_partitions(gpt->pheader, gpt->ents);
if (ptnum) {
nerror++;
fdisk_warnx(cxt, _("Partition %u ends before it starts."),
diff --git a/libfdisk/src/init.c b/libfdisk/src/init.c
index 2bb25c700..438deb7e6 100644
--- a/libfdisk/src/init.c
+++ b/libfdisk/src/init.c
@@ -28,7 +28,7 @@ UL_DEBUG_DEFINE_MASKNAMES(libfdisk) =
/**
* fdisk_init_debug:
- * @mask: debug mask (0xffff to enable full debuging)
+ * @mask: debug mask (0xffff to enable full debugging)
*
* If the @mask is not specified then this function reads
* LIBFDISK_DEBUG environment variable to get the mask.
diff --git a/libfdisk/src/item.c b/libfdisk/src/item.c
index 6da00796d..bdeba2962 100644
--- a/libfdisk/src/item.c
+++ b/libfdisk/src/item.c
@@ -48,7 +48,7 @@ struct fdisk_labelitem *fdisk_new_labelitem(void)
* fdisk_ref_labelitem:
* @li: label item
*
- * Incremparts reference counter.
+ * Increments reference counter.
*
* Since: v2.29
*/
@@ -85,7 +85,7 @@ int fdisk_reset_labelitem(struct fdisk_labelitem *li)
* fdisk_unref_labelitem:
* @li: label item
*
- * De-incremparts reference counter, on zero the @li is automatically
+ * Decrements reference counter, on zero the @li is automatically
* deallocated.
*
* Since: v2.29
@@ -215,7 +215,7 @@ static int test_listitems(struct fdisk_test *ts, int argc, char *argv[])
printf("%s: %ju\n", name, num);
break;
}
- case 1: /* item unssuported by label -- ignore */
+ case 1: /* item unsuported by label -- ignore */
rc = 0;
break;
case 2: /* end (out of range) */
diff --git a/libfdisk/src/label.c b/libfdisk/src/label.c
index 78fc5e78c..5cbbe422e 100644
--- a/libfdisk/src/label.c
+++ b/libfdisk/src/label.c
@@ -15,7 +15,7 @@
* fdisk_unref_context() only.
*
* Anyway, all label drives share in-memory first sector. The function
- * fdisk_create_disklabel() overwrites thi in-memory sector. But it's possible that
+ * fdisk_create_disklabel() overwrites this in-memory sector. But it's possible that
* label driver also uses another buffers, for example GPT reads more sectors
* from the device.
*
@@ -293,7 +293,7 @@ int fdisk_verify_disklabel(struct fdisk_context *cxt)
* The function requires enabled "details" by fdisk_enable_details().
*
* It's recommended to use fdisk_get_disklabel_item() if you need better
- * control on output and formmatting.
+ * control on output and formatting.
*
* Returns: 0 on success, otherwise, a corresponding error.
*/
@@ -336,7 +336,7 @@ int fdisk_list_disklabel(struct fdisk_context *cxt)
*
* Creates a new disk label of type @name. If @name is NULL, then it will
* create a default system label type, either SUN or DOS. The function
- * automaticaly switches the current label driver to @name. The function
+ * automatically switches the current label driver to @name. The function
* fdisk_get_label() returns the current label driver.
*
* The function modifies in-memory data only.
@@ -392,7 +392,7 @@ int fdisk_create_disklabel(struct fdisk_context *cxt, const char *name)
* GPT is composed from two items, PMBR and GPT, n=0 return offset to PMBR and n=1
* return offset to GPT. For more details see 'D' expert fdisk command.
*
- * Returns: 0 on succes, <0 on error, 1 no more items.
+ * Returns: 0 on success, <0 on error, 1 no more items.
*/
int fdisk_locate_disklabel(struct fdisk_context *cxt, int n, const char **name,
uint64_t *offset, size_t *size)
@@ -445,7 +445,7 @@ int fdisk_get_disklabel_id(struct fdisk_context *cxt, char **id)
* until it returns error or 2, the result in @item should be ignored when
* function returns 1. Don't forget to use fdisk_reset_labelitem() or fdisk_unref_labelitem().
*
- * Returns: 0 on success, < 0 on error, 1 on unssupported item, 2 @id out of range
+ * Returns: 0 on success, < 0 on error, 1 on unsupported item, 2 @id out of range
*/
int fdisk_get_disklabel_item(struct fdisk_context *cxt, int id, struct fdisk_labelitem *item)
{
@@ -574,7 +574,7 @@ void fdisk_deinit_label(struct fdisk_label *lb)
* @changed: 0/1
*
* Marks in-memory data as changed, to force fdisk_write_disklabel() to write
- * to device. This should be unnecessar by default, the library keeps track
+ * to device. This should be unnecessary by default, the library keeps track
* about changes.
*/
void fdisk_label_set_changed(struct fdisk_label *lb, int changed)
diff --git a/libfdisk/src/partition.c b/libfdisk/src/partition.c
index a98620b04..5e2de76ee 100644
--- a/libfdisk/src/partition.c
+++ b/libfdisk/src/partition.c
@@ -106,7 +106,7 @@ static struct fdisk_partition *__copy_partition(struct fdisk_partition *o)
* fdisk_ref_partition:
* @pa: partition pointer
*
- * Incremparts reference counter.
+ * Increments reference counter.
*/
void fdisk_ref_partition(struct fdisk_partition *pa)
{
@@ -118,7 +118,7 @@ void fdisk_ref_partition(struct fdisk_partition *pa)
* fdisk_unref_partition:
* @pa: partition pointer
*
- * De-incremparts reference counter, on zero the @pa is automatically
+ * Decrements reference counter, on zero the @pa is automatically
* deallocated.
*/
void fdisk_unref_partition(struct fdisk_partition *pa)
@@ -345,7 +345,7 @@ int fdisk_partition_size_explicit(struct fdisk_partition *pa, int enable)
/**
* fdisk_partition_set_partno:
* @pa: partition
- * @num: partitin number (0 is the first partition, maximal is SIZE_MAX-1)
+ * @num: partition number (0 is the first partition, maximal is SIZE_MAX-1)
*
* Note that zero is valid partno too. Use fdisk_partition_unset_partno() to
* undefine the partno.
@@ -444,7 +444,7 @@ int fdisk_partition_partno_follow_default(struct fdisk_partition *pa, int enable
* @pa: partition
* @type: partition type
*
- * Sets parititon type.
+ * Sets partition type.
*
* Returns: 0 on success, <0 on error.
*/
@@ -808,7 +808,7 @@ done:
* For example
* <informalexample>
* <programlisting>
- * struct fdisk_parition *pa;
+ * struct fdisk_partition *pa;
*
* fdisk_get_partition(cxt, 0, &pa);
* fdisk_partition_to_string(pa, FDISK_FIELD_UUID, &data);
@@ -1310,7 +1310,7 @@ int fdisk_wipe_partition(struct fdisk_context *cxt, size_t partno, int enable)
* @pa: template for the partition (or NULL)
* @partno: NULL or returns new partition number
*
- * If @pa is not specified or any @pa item is missiong the libfdisk will ask by
+ * If @pa is not specified or any @pa item is missing the libfdisk will ask by
* fdisk_ask_ API.
*
* Adds a new partition to disklabel.
diff --git a/libfdisk/src/parttype.c b/libfdisk/src/parttype.c
index 712994efb..8c36fdf3b 100644
--- a/libfdisk/src/parttype.c
+++ b/libfdisk/src/parttype.c
@@ -36,7 +36,7 @@ struct fdisk_parttype *fdisk_new_parttype(void)
* fdisk_ref_parttype:
* @t: partition type
*
- * Incremparts reference counter for allocated types
+ * Increments reference counter for allocated types
*/
void fdisk_ref_parttype(struct fdisk_parttype *t)
{
@@ -48,7 +48,7 @@ void fdisk_ref_parttype(struct fdisk_parttype *t)
* fdisk_unref_parttype
* @t: partition pointer
*
- * De-incremparts reference counter, on zero the @t is automatically
+ * Decrements reference counter, on zero the @t is automatically
* deallocated.
*/
void fdisk_unref_parttype(struct fdisk_parttype *t)
@@ -95,7 +95,7 @@ int fdisk_parttype_set_name(struct fdisk_parttype *t, const char *str)
/**
* fdisk_parttype_set_typestr:
* @t: partition type
- * @str: type identificator (e.g. GUID for GPT)
+ * @str: type identifier (e.g. GUID for GPT)
*
* Sets type string to allocated partition type, for static types
* it returns -EINVAL. Don't use this function for MBR, see
@@ -123,7 +123,7 @@ int fdisk_parttype_set_typestr(struct fdisk_parttype *t, const char *str)
/**
* fdisk_parttype_set_code:
* @t: partition type
- * @code: type identificator (e.g. MBR type codes)
+ * @code: type identifier (e.g. MBR type codes)
*
* Sets type code to allocated partition type, for static types it returns
* -EINVAL. Don't use this function for GPT, see fdisk_parttype_set_typestr().
@@ -291,7 +291,7 @@ struct fdisk_parttype *fdisk_copy_parttype(const struct fdisk_parttype *type)
* @lb: label
* @str: string to parse from
*
- * Parses partition type from @str according to the label. Thefunction returns
+ * Parses partition type from @str according to the label. The function returns
* a pointer to static table of the partition types, or newly allocated
* partition type for unknown types (see fdisk_parttype_is_unknown(). It's
* safe to call fdisk_unref_parttype() for all results.
@@ -397,7 +397,7 @@ const char *fdisk_parttype_get_name(const struct fdisk_parttype *t)
*
* Checks for example result from fdisk_label_parse_parttype().
*
- * Returns: 1 is type is "unknonw" or 0.
+ * Returns: 1 is type is "unknown" or 0.
*/
int fdisk_parttype_is_unknown(const struct fdisk_parttype *t)
{
diff --git a/libfdisk/src/script.c b/libfdisk/src/script.c
index 956d4f52e..0d89fdaf1 100644
--- a/libfdisk/src/script.c
+++ b/libfdisk/src/script.c
@@ -133,7 +133,7 @@ done:
* fdisk_ref_script:
* @dp: script pointer
*
- * Incremparts reference counter.
+ * Increments reference counter.
*/
void fdisk_ref_script(struct fdisk_script *dp)
{
@@ -161,7 +161,7 @@ static void fdisk_reset_script(struct fdisk_script *dp)
* fdisk_unref_script:
* @dp: script pointer
*
- * De-incremparts reference counter, on zero the @dp is automatically
+ * Decrements reference counter, on zero the @dp is automatically
* deallocated.
*/
void fdisk_unref_script(struct fdisk_script *dp)
@@ -656,7 +656,7 @@ static int write_file_sfdisk(struct fdisk_script *dp, FILE *f)
* @dp: script
* @f: output file
*
- * Writes script @dp to the ile @f.
+ * Writes script @dp to the file @f.
*
* Returns: 0 on success, <0 on error.
*/
@@ -714,7 +714,7 @@ static int parse_line_header(struct fdisk_script *dp, char *s)
|| strcmp(name, "first-lba") == 0
|| strcmp(name, "last-lba") == 0
|| strcmp(name, "table-length") == 0) {
- ; /* whatever is posssible */
+ ; /* whatever is possible */
} else
goto done; /* unknown header */
@@ -905,7 +905,7 @@ static int parse_line_nameval(struct fdisk_script *dp, char *s)
} else if (!strncasecmp(p, "type=", 5) ||
- !strncasecmp(p, "Id=", 3)) { /* backward compatiility */
+ !strncasecmp(p, "Id=", 3)) { /* backward compatibility */
char *type;
p += (*p == 'I' ? 3 : 5); /* "Id=" or "type=" */
@@ -1059,7 +1059,7 @@ static int parse_line_valcommas(struct fdisk_script *dp, char *s)
if (*p == ',' || *p == ';' || alone_sign(sign, p)) {
fdisk_partition_end_follow_default(pa, 1);
if (sign == TK_PLUS)
- /* alone '+' means use all possible space, elone '-' means nothing */
+ /* '+' alone means use all possible space, '-' alone means nothing */
pa->resize = FDISK_RESIZE_ENLARGE;
} else {
int pow = 0;
@@ -1174,7 +1174,7 @@ static int fdisk_script_read_buffer(struct fdisk_script *dp, char *s)
* @fn_fgets: callback function
*
* The library uses fgets() function to read the next line from the script.
- * This default maybe overrided to another function. Note that the function has
+ * This default maybe overridden by another function. Note that the function has
* to return the line terminated by \n (for example readline(3) removes \n).
*
* Return: 0 on success, <0 on error
@@ -1327,7 +1327,7 @@ struct fdisk_script *fdisk_get_script(struct fdisk_context *cxt)
* @cxt: context
* @dp: script
*
- * Associte context @cxt with script @dp and creates a new empty disklabel.
+ * Associate context @cxt with script @dp and creates a new empty disklabel.
*
* Returns: 0 on success, <0 on error.
*/
diff --git a/libfdisk/src/sgi.c b/libfdisk/src/sgi.c
index c77724aa2..73f9049f7 100644
--- a/libfdisk/src/sgi.c
+++ b/libfdisk/src/sgi.c
@@ -300,7 +300,7 @@ static int sgi_get_disklabel_item(struct fdisk_context *cxt, struct fdisk_labeli
break;
default:
if (item->id < __FDISK_NLABELITEMS)
- rc = 1; /* unssupported generic item */
+ rc = 1; /* unsupported generic item */
else
rc = 2; /* out of range */
break;
diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c
index a97ecac0a..55ec8773c 100644
--- a/libfdisk/src/sun.c
+++ b/libfdisk/src/sun.c
@@ -56,7 +56,7 @@ static struct fdisk_parttype sun_parttypes[] = {
{ 0, NULL }
};
-/* return poiter buffer with on-disk data */
+/* return pointer buffer with on-disk data */
static inline struct sun_disklabel *self_disklabel(struct fdisk_context *cxt)
{
assert(cxt);
@@ -783,7 +783,7 @@ static int sun_get_disklabel_item(struct fdisk_context *cxt, struct fdisk_labeli
break;
default:
if (item->id < __FDISK_NLABELITEMS)
- rc = 1; /* unssupported generic item */
+ rc = 1; /* unsupported generic item */
else
rc = 2; /* out of range */
break;
diff --git a/libfdisk/src/table.c b/libfdisk/src/table.c
index 6d8cbc25a..755c6c286 100644
--- a/libfdisk/src/table.c
+++ b/libfdisk/src/table.c
@@ -38,7 +38,7 @@ struct fdisk_table *fdisk_new_table(void)
* fdisk_reset_table:
* @tb: tab pointer
*
- * Removes all entries (partitions) from the table. The parititons with zero
+ * Removes all entries (partitions) from the table. The partitions with zero
* reference count will be deallocated. This function does not modify partition
* table.
*
@@ -65,7 +65,7 @@ int fdisk_reset_table(struct fdisk_table *tb)
* fdisk_ref_table:
* @tb: table pointer
*
- * Incremparts reference counter.
+ * Increments reference counter.
*/
void fdisk_ref_table(struct fdisk_table *tb)
{
@@ -77,7 +77,7 @@ void fdisk_ref_table(struct fdisk_table *tb)
* fdisk_unref_table:
* @tb: table pointer
*
- * De-incremparts reference counter, on zero the @tb is automatically
+ * Descrements reference counter, on zero the @tb is automatically
* deallocated.
*/
void fdisk_unref_table(struct fdisk_table *tb)
@@ -682,7 +682,7 @@ int fdisk_table_wrong_order(struct fdisk_table *tb)
* Add partitions from table @tb to the in-memory disk label. See
* fdisk_add_partition(), fdisk_delete_all_partitions(). The partitions
* that does not define start (or does not follow the default start)
- * are ingored.
+ * are ignored.
*
* Returns: 0 on success, <0 on error.
*/