diff options
author | Dominic Sacré <dominic.sacre@gmx.de> | 2015-05-11 17:46:07 +0200 |
---|---|---|
committer | Krzysztof Opasiak <k.opasiak@samsung.com> | 2015-05-19 13:53:23 +0200 |
commit | 23376bbaca25d910d0b85cbcfacc020f4eaf78c0 (patch) | |
tree | cd945a9e229a5237fe531f81fe661cd9cc1a8b1d | |
parent | 223e3b4becf1bf118a370a5360efa0f25ed3532c (diff) | |
download | libusbg-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>
-rw-r--r-- | include/usbg/usbg.h | 24 | ||||
-rw-r--r-- | src/usbg.c | 10 | ||||
-rw-r--r-- | src/usbg_schemes_libconfig.c | 24 |
3 files changed, 29 insertions, 29 deletions
diff --git a/include/usbg/usbg.h b/include/usbg/usbg.h index 39585fc..3d03ea5 100644 --- a/include/usbg/usbg.h +++ b/include/usbg/usbg.h @@ -44,11 +44,11 @@ extern "C" { #define LANG_US_ENG 0x0409 #define DEFAULT_CONFIG_LABEL "config" -/* This one has to be at least 18 bytes to hold network addres */ +/* This one has to be at least 18 bytes to hold network address */ #define USBG_MAX_STR_LENGTH 256 #define USBG_MAX_PATH_LENGTH PATH_MAX #define USBG_MAX_NAME_LENGTH 40 -/* Dev name for ffs is a part of function name, we subtracs 4 char for "ffs." */ +/* Dev name for ffs is a part of function name, we subtract 4 char for "ffs." */ #define USBG_MAX_DEV_LENGTH (USBG_MAX_NAME_LENGTH - 4) /* ConfigFS just like SysFS uses page size as max size of file content */ #define USBG_MAX_FILE_SIZE 4096 @@ -56,7 +56,7 @@ extern "C" { /** * @brief Additional option for usbg_rm_* functions. * @details This option allows to remove all content - * of gadget/config/function recursive. + * of gadget/config/function recursively. */ #define USBG_RM_RECURSE 1 @@ -96,7 +96,7 @@ typedef struct usbg_function usbg_function; typedef struct usbg_binding usbg_binding; /** - * @brief USB device controler + * @brief USB device controller */ typedef struct usbg_udc usbg_udc; @@ -215,7 +215,7 @@ typedef struct { /** * @typedef usbg_f_ffs_attrs * @brief Attributes for function fs based functions - * @details This is read only and virtual attribute it is non present + * @details This is read only and a virtual attribute, it is non present * on config fs. */ typedef struct { @@ -335,7 +335,7 @@ extern void usbg_cleanup(usbg_state *s); * @return Path to configfs or NULL if error occurred * @warning Returned buffer should not be edited! * Returned string is valid as long as passed usbg_state is valid. - * For example path is valid unitill usbg_cleanup() call. + * For example path is valid until usbg_cleanup() call. */ extern const char *usbg_get_configfs_path(usbg_state *s); @@ -479,7 +479,7 @@ extern int usbg_create_gadget(usbg_state *s, const char *name, /** * @brief Get string representing selected gadget attribute - * @param attr code of selected attrobute + * @param attr code of selected attribute * @return String suitable for given attribute or NULL if such * string has not been found */ @@ -726,7 +726,7 @@ extern int usbg_cpy_function_instance(usbg_function *f, char *buf, size_t len); extern const char *usbg_get_function_type_str(usbg_function_type type); /** - * @brief Lookup function type sutable for given name + * @brief Lookup function type suitable for given name * @param name Name of function * @return Function type enum or negative error code */ @@ -950,7 +950,7 @@ extern size_t usbg_get_gadget_udc_len(usbg_gadget *g); extern int usbg_cpy_udc_name(usbg_udc *u, char *buf, size_t len); /** - * @brief Get udc to which gadget is binded + * @brief Get udc to which gadget is bound * @param g Pointer to gadget * @return Pointer to UDC or NULL if gadget is not enabled */ @@ -1167,7 +1167,7 @@ extern int usbg_export_gadget(usbg_gadget *g, FILE *stream); * @brief Imports usb function from file and adds it to given gadget * @param g Gadget where function should be placed * @param stream from which function should be imported - * @param instance name which shuld be used for new function + * @param instance name which should be used for new function * @param f place for pointer to imported function * if NULL this param will be ignored. * @return 0 on success, usbg_error otherwise @@ -1179,7 +1179,7 @@ extern int usbg_import_function(usbg_gadget *g, FILE *stream, * @brief Imports usb configuration from file and adds it to given gadget * @param g Gadget where configuration should be placed * @param stream from which configuration should be imported - * @param id which shuld be used for new configuration + * @param id which should be used for new configuration * @param c place for pointer to imported configuration * if NULL this param will be ignored. * @return 0 on success, usbg_error otherwise @@ -1190,7 +1190,7 @@ extern int usbg_import_config(usbg_gadget *g, FILE *stream, int id, * @brief Imports usb gadget from file * @param s current state of library * @param stream from which gadget should be imported - * @param name which shuld be used for new gadget + * @param name which should be used for new gadget * @param g place for pointer to imported gadget * if NULL this param will be ignored. * @return 0 on success, usbg_error otherwise @@ -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); |