/*
* Same as loopcxt_set_device, but also checks if the device is
- * associeted with any file.
+ * associated with any file.
*
* Returns: <0 on error, 0 on success, 1 device does not match with
* LOOPITER_FL_{USED,FREE} flags.
if (sysfs)
/*
- * This is always preffered, the loop_info64
+ * This is always preferred, the loop_info64
* has too small buffer for the filename.
*/
ul_path_read_string(sysfs, &res, "loop/backing_file");
/*
* Returns number of loop devices associated with @file, if only one loop
- * device is associeted with the given @filename and @loopdev is not NULL then
+ * device is associated with the given @filename and @loopdev is not NULL then
* @loopdev returns name of the device.
*/
int loopdev_count_by_backing_file(const char *filename, char **loopdev)
if (rc < 0 || !str)
return rc;;
- /* Remove tailing newline (usuall in sysfs) */
+ /* Remove tailing newline (usual in sysfs) */
if (rc > 0 && *(buf + rc - 1) == '\n')
--rc;
if (rc < 0)
return rc;;
- /* Remove tailing newline (usuall in sysfs) */
+ /* Remove tailing newline (usual in sysfs) */
if (rc > 0 && *(buf + rc - 1) == '\n')
--rc;
* </programlisting>
* </example>
*
- * See also blkid_probe_step_back() if you cannot use this build-in wipe
+ * See also blkid_probe_step_back() if you cannot use this built-in wipe
* function, but you want to use libblkid probing as a source for wiping.
*
* Returns: 0 on success, and -1 in case of error.
*
*
* Libfdisk sample to create partitions by specify all required partition
- * properties (partno, start and size). The defauls is only partition type
+ * properties (partno, start and size). The default is only partition type
* (except MBR where 4th partition is extended).
*/
#include <stdlib.h>
int rc = 0;
if (cxt->label && cxt->label->op->reset_alignment) {
- DBG(CXT, ul_debugobj(cxt, "appling label device properties..."));
+ DBG(CXT, ul_debugobj(cxt, "applying label device properties..."));
rc = cxt->label->op->reset_alignment(cxt);
}
return rc;
* @FDISK_ASKTYPE_OFFSET: ask for offset
* @FDISK_ASKTYPE_WARN: print warning message and errno
* @FDISK_ASKTYPE_WARNX: print warning message
- * @FDISK_ASKTYPE_INFO: print infor message
+ * @FDISK_ASKTYPE_INFO: print info message
* @FDISK_ASKTYPE_YESNO: ask Yes/No question
* @FDISK_ASKTYPE_STRING: ask for string
* @FDISK_ASKTYPE_MENU: ask for menu item
* @BSD_LABELITEM_TYPE: type
* @BSD_LABELITEM_DISK: disk
* @BSD_LABELITEM_PACKNAME: packname
- * @BSD_LABELITEM_FLAGS: flags (removeable, ecc, badsect)
+ * @BSD_LABELITEM_FLAGS: flags (removable, ecc, badsect)
* @BSD_LABELITEM_SECSIZE: Bytes/Sector
* @BSD_LABELITEM_NTRACKS: Tracks/Cylinder
* @BSD_LABELITEM_SECPERCYL: Sectors/Cylinder
* @GPT_LABELITEM_FIRSTLBA: First Usable LBA
* @GPT_LABELITEM_LASTLBA: Usable LBA
* @GPT_LABELITEM_ALTLBA: Alternative LBA (backup header LBA)
- * @GPT_LABELITEM_ENTRIESLBA: Partitions entires array LBA
+ * @GPT_LABELITEM_ENTRIESLBA: Partitions entries array LBA
* @GPT_LABELITEM_ENTRIESALLOC: Number of allocated entries in entries array
*
* GPT specific label items.
* and @data is specified then a new header is added.
*
* Note that libfdisk allows to specify arbitrary custom header, the default
- * build-in headers are "unit" and "label", and some label specific headers
+ * built-in headers are "unit" and "label", and some label specific headers
* (for example "uuid" and "name" for GPT).
*
* Returns: 0 on success, <0 on error
add_to_freelist(cxt, start, lastblock);
}
/*
- * Done with arithmetics. Go for details now.
+ * Done with arithmetic. Go for details now.
*/
if (verbose) {
if (sgi_get_bootpartition(cxt) < 0
free(res);
- /* check for partition seperator "p" */
+ /* check for partition separator "p" */
if (asprintf(&res, "%.*sp%zu", w, dev, partno) <= 0)
res = NULL;
if (res && access(res, F_OK) == 0)
#define Table_find_tag_HELP "find_tag(tag, val, [direction])\n\n" \
"Try to lookup an entry in given tab, first attempt is lookup by tag and\n" \
"val, for the second attempt the tag is evaluated (converted to the device\n" \
- "name) and Tab.find_srcpath() is preformed. The second attempt is not\n" \
+ "name) and Tab.find_srcpath() is performed. The second attempt is not\n" \
"performed when tb cache is not set (not implemented yet).\n" \
"\n" \
"Returns a tab entry or NULL."
groups_fix_members_order(ln);
}
- /* If group child is memeber of another group *
+ /* If group child is member of another group *
scols_reset_iter(&itr, SCOLS_ITER_FORWARD);
while (scols_table_next_group(tb, &itr, &gr) == 0) {
struct libscols_iter xitr;
*/
static void grpset_apply_group_state(struct libscols_group **xx, int state, struct libscols_group *gr)
{
- DBG(GROUP, ul_debugobj(gr, " appling state to grpset"));
+ DBG(GROUP, ul_debugobj(gr, " applying state to grpset"));
/* gr->state holds the old state, @state is the new state
*/
break;
case SCOLS_FMT_JSON:
if (tb->format == SCOLS_FMT_JSON)
- extra_bufsz += tb->nlines * 3; /* indention */
+ extra_bufsz += tb->nlines * 3; /* indentation */
/* fallthrough */
case SCOLS_FMT_EXPORT:
{
struct libscols_symbols *symbols;
struct libscols_cell title; /* optional table title (for humans) */
- int indent; /* indention counter */
+ int indent; /* indentation counter */
int indent_last_sep;/* last printed has been line separator */
int format; /* SCOLS_FMT_* */
columns[ncolumns++] = i;
} else if (ncolumns == 2) {
- /* default colummns */
+ /* default columns */
add_column(columns, ncolumns++, COL_NPROCS);
add_column(columns, ncolumns++, COL_PWDLOCK);
add_column(columns, ncolumns++, COL_PWDDENY);
}
#endif
- /* user overwrites build-in SD-ELEMENT */
+ /* user overwrites built-in SD-ELEMENT */
if (has_structured_data_id(get_user_structured_data(&ctl), "timeQuality"))
ctl.rfc5424_tq = 0;
#define device_is_partition(_x) ((_x)->wholedisk != NULL)
/*
- * Note that lsblk tree uses botton devices (devices without slaves) as root
+ * Note that lsblk tree uses bottom devices (devices without slaves) as root
* of the tree, and partitions are interpreted as a dependence too; it means:
* sda -> sda1 -> md0
*
lookup(arg, ls, want);
/*
* The lookup mask ("want") is cumulative and it's
- * resetable only when it has been already used.
+ * resettable only when it has been already used.
*
* whereis -b -m foo :'foo' mask=BIN|MAN
* whereis -b foo bar :'foo' and 'bar' mask=BIN|MAN
struct timeval time_start, time_stop;
int time_elapsed;
- /* Try to open the CDROM tray and measure the time therefor
+ /* Try to open the CDROM tray and measure the time therefore
* needed. In my experience the function needs less than 0.05
* seconds if the tray was already open, and at least 1.5 seconds
* if it was closed. */
* later on.
*/
- /* The defaul is set c_iflag in termio_final() according to chardata.
+ /* The default is set c_iflag in termio_final() according to chardata.
* Unfortunately, the chardata are not set according to the serial line
* if --autolog is enabled. In this case we do not read from the line
* at all. The best what we can do in this case is to keep c_iflag