summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDominic Sacré <dominic.sacre@gmx.de>2015-05-11 17:46:07 +0200
committerKrzysztof Opasiak <k.opasiak@samsung.com>2015-05-19 13:53:23 +0200
commit23376bbaca25d910d0b85cbcfacc020f4eaf78c0 (patch)
treecd945a9e229a5237fe531f81fe661cd9cc1a8b1d /src
parent223e3b4becf1bf118a370a5360efa0f25ed3532c (diff)
downloadlibusbg-23376bbaca25d910d0b85cbcfacc020f4eaf78c0.tar.gz
libusbg-23376bbaca25d910d0b85cbcfacc020f4eaf78c0.tar.bz2
libusbg-23376bbaca25d910d0b85cbcfacc020f4eaf78c0.zip
libusbg: Fix several typos
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com> Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/usbg.c10
-rw-r--r--src/usbg_schemes_libconfig.c24
2 files changed, 17 insertions, 17 deletions
diff --git a/src/usbg.c b/src/usbg.c
index 05cc0bf..4d0beed 100644
--- a/src/usbg.c
+++ b/src/usbg.c
@@ -155,7 +155,7 @@ const char *usbg_error_name(usbg_error e)
ret = "USBG_ERROR_MISSING_TAG";
break;
case USBG_ERROR_INVALID_TYPE:
- ret = "USBG_ERROR_INVALUD_TYPE";
+ ret = "USBG_ERROR_INVALID_TYPE";
break;
case USBG_ERROR_INVALID_VALUE:
ret = "USBG_ERROR_INVALID_VALUE";
@@ -731,7 +731,7 @@ static usbg_function *usbg_allocate_function(const char *path,
f->parent = parent;
f->type = type;
- /* only composed funcitons (with subdirs) require this callback */
+ /* only composed functions (with subdirs) require this callback */
switch (usbg_lookup_function_attrs_type(type)) {
case USBG_F_ATTRS_MS:
f->rm_callback = usbg_rm_ms_function;
@@ -1558,7 +1558,7 @@ static int usbg_parse_state(usbg_state *s)
int ret = USBG_SUCCESS;
/*
- * USBG_ERROR_NOT_FOUND is returned if we are runing on machine where
+ * USBG_ERROR_NOT_FOUND is returned if we are running on machine where
* there is no udc support in kernel (no /sys/class/udc dir).
* This check allows to run library on such machine or if we don't
* have rights to read this directory.
@@ -3049,7 +3049,7 @@ static int usbg_set_function_ms_attrs(usbg_function *f,
if (!ret) {
/*
* If we have created a new directory in
- * this funciton let's mark it so we can
+ * this function let's mark it so we can
* cleanup in case of error
*/
new_lun_mask[i] = 1;
@@ -3157,7 +3157,7 @@ int usbg_set_function_attrs(usbg_function *f,
break;
case USBG_F_ATTRS_FFS:
- /* dev_name is a virtual atribute so allow only to use empty
+ /* dev_name is a virtual attribute so allow only to use empty
* empty string which means nop */
ret = f_attrs->attrs.ffs.dev_name && f_attrs->attrs.ffs.dev_name[0] ?
USBG_ERROR_INVALID_PARAM : USBG_SUCCESS;
diff --git a/src/usbg_schemes_libconfig.c b/src/usbg_schemes_libconfig.c
index 1cbf3c4..d7d2907 100644
--- a/src/usbg_schemes_libconfig.c
+++ b/src/usbg_schemes_libconfig.c
@@ -229,8 +229,8 @@ out:
}
-/* This function does not export configuration id because it is a more
- * a porperty of gadget which contains this config than config itself */
+/* This function does not export configuration id because it is more of
+ * a property of gadget which contains this config than config itself */
static int usbg_export_config_prep(usbg_config *c, config_setting_t *root)
{
config_setting_t *node;
@@ -486,8 +486,8 @@ out:
return ret;
}
-/* This function does not import instance name becuase this is more property
- * of a gadget than a function itselt */
+/* This function does not import instance name because this is more property
+ * of a gadget than a function itself */
static int usbg_export_function_prep(usbg_function *f, config_setting_t *root)
{
config_setting_t *node;
@@ -782,7 +782,7 @@ int usbg_export_function(usbg_function *f, FILE *stream)
/* Set format */
config_set_tab_width(&cfg, USBG_TAB_WIDTH);
- /* Allways successful */
+ /* Always successful */
root = config_root_setting(&cfg);
ret = usbg_export_function_prep(f, root);
@@ -809,7 +809,7 @@ int usbg_export_config(usbg_config *c, FILE *stream)
/* Set format */
config_set_tab_width(&cfg, USBG_TAB_WIDTH);
- /* Allways successful */
+ /* Always successful */
root = config_root_setting(&cfg);
ret = usbg_export_config_prep(c, root);
@@ -836,7 +836,7 @@ int usbg_export_gadget(usbg_gadget *g, FILE *stream)
/* Set format */
config_set_tab_width(&cfg, USBG_TAB_WIDTH);
- /* Allways successful */
+ /* Always successful */
root = config_root_setting(&cfg);
ret = usbg_export_gadget_prep(g, root);
@@ -1347,7 +1347,7 @@ static int usbg_import_config_strs_lang(config_setting_t *root, usbg_config *c)
lang = config_setting_get_int(node);
- /* Configuratin string is optional */
+ /* Configuration string is optional */
node = config_setting_get_member(root, "configuration");
if (node) {
if (!usbg_config_is_string(node))
@@ -1774,7 +1774,7 @@ static int usbg_import_gadget_run(usbg_state *s, config_setting_t *root,
}
/* Functions too, because some gadgets may not be fully
- * configured and don't have any funciton or have all functions
+ * configured and don't have any function or have all functions
* defined inline in configurations */
node = config_setting_get_member(root, USBG_FUNCTIONS_TAG);
if (node) {
@@ -1838,7 +1838,7 @@ int usbg_import_function(usbg_gadget *g, FILE *stream, const char *instance,
goto out;
}
- /* Allways successful */
+ /* Always successful */
root = config_root_setting(cfg);
ret = usbg_import_function_run(g, root, instance, &newf);
@@ -1882,7 +1882,7 @@ int usbg_import_config(usbg_gadget *g, FILE *stream, int id, usbg_config **c)
goto out;
}
- /* Allways successful */
+ /* Always successful */
root = config_root_setting(cfg);
ret = usbg_import_config_run(g, root, id, &newc);
@@ -1926,7 +1926,7 @@ int usbg_import_gadget(usbg_state *s, FILE *stream, const char *name,
goto out;
}
- /* Allways successful */
+ /* Always successful */
root = config_root_setting(cfg);
ret = usbg_import_gadget_run(s, root, name, &newg);