1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-23 10:50:34 +03:00

cleanup: match function prototype with definition

Match variable name in function definition with
its prototype. Pick the name which better fits
the usage.

No functional change.
This commit is contained in:
Zdenek Kabelac 2025-02-14 15:28:16 +01:00
parent a6b2ce6299
commit 924221765e
28 changed files with 101 additions and 100 deletions

View File

@ -193,10 +193,10 @@ bool radix_tree_remove(struct radix_tree *rt, const void *key, size_t keylen)
return true;
}
unsigned radix_tree_remove_prefix(struct radix_tree *rt, const void *key, size_t keylen)
unsigned radix_tree_remove_prefix(struct radix_tree *rt, const void *prefix, size_t prefix_len)
{
const uint8_t *kb = key;
const uint8_t *ke = kb + keylen;
const uint8_t *kb = prefix;
const uint8_t *ke = kb + prefix_len;
struct node **pn;
unsigned count = 0;

View File

@ -73,10 +73,10 @@ int dm_event_handler_set_dso(struct dm_event_handler *dmevh, const char *path);
int dm_event_handler_set_dmeventd_path(struct dm_event_handler *dmevh, const char *dmeventd_path);
/*
* Identify the device to monitor by exactly one of device_name, uuid or
* Identify the device to monitor by exactly one of dev_name, uuid or
* device number. String arguments are duplicated, see above.
*/
int dm_event_handler_set_dev_name(struct dm_event_handler *dmevh, const char *device_name);
int dm_event_handler_set_dev_name(struct dm_event_handler *dmevh, const char *dev_name);
int dm_event_handler_set_uuid(struct dm_event_handler *dmevh, const char *uuid);

View File

@ -112,7 +112,7 @@ static int _remove_failed_devices(const char *cmd_lvconvert, const char *device)
}
void process_event(struct dm_task *dmt,
enum dm_event_mask event __attribute__((unused)),
enum dm_event_mask evmask __attribute__((unused)),
void **user)
{
struct dso_state *state = *user;

View File

@ -114,7 +114,7 @@ out:
}
void process_event(struct dm_task *dmt,
enum dm_event_mask event __attribute__((unused)),
enum dm_event_mask evmask __attribute__((unused)),
void **user)
{
struct dso_state *state = *user;

View File

@ -163,7 +163,7 @@ static void _umount(const char *device, int major, int minor)
}
void process_event(struct dm_task *dmt,
enum dm_event_mask event __attribute__((unused)),
enum dm_event_mask evmask __attribute__((unused)),
void **user)
{
struct dso_state *state = *user;

View File

@ -155,7 +155,7 @@ static int _wait_for_pid(struct dso_state *state)
}
void process_event(struct dm_task *dmt,
enum dm_event_mask event __attribute__((unused)),
enum dm_event_mask evmask,
void **user)
{
const char *device = dm_task_get_name(dmt);
@ -179,7 +179,7 @@ void process_event(struct dm_task *dmt,
return;
}
if (event & DM_EVENT_DEVICE_ERROR) {
if (evmask & DM_EVENT_DEVICE_ERROR) {
/* Error -> no need to check and do instant resize */
state->data_percent = state->metadata_percent = 0;
if (_use_policy(dmt, state))

View File

@ -146,7 +146,7 @@ static int _wait_for_pid(struct dso_state *state)
}
void process_event(struct dm_task *dmt,
enum dm_event_mask event __attribute__((unused)),
enum dm_event_mask evmask __attribute__((unused)),
void **user)
{
const char *device = dm_task_get_name(dmt);
@ -169,7 +169,7 @@ void process_event(struct dm_task *dmt,
return;
}
if (event & DM_EVENT_DEVICE_ERROR) {
if (evmask & DM_EVENT_DEVICE_ERROR) {
#if VDO_DEBUG
log_debug("VDO event error.");
#endif

View File

@ -93,7 +93,7 @@ struct lvmpolld_thread_data {
struct lvmpolld_lv *pdlv;
};
char *construct_id(const char *sysdir, const char *lvid);
char *construct_id(const char *sysdir, const char *uuid);
/* LVMPOLLD_LV_T section */

View File

@ -191,7 +191,7 @@ struct dm_versions {
int dm_get_library_version(char *version, size_t size);
int dm_task_get_driver_version(struct dm_task *dmt, char *version, size_t size);
int dm_task_get_info(struct dm_task *dmt, struct dm_info *dmi);
int dm_task_get_info(struct dm_task *dmt, struct dm_info *info);
/*
* This function returns dm device's UUID based on the value
@ -1051,7 +1051,7 @@ int dm_tree_node_add_vdo_target(struct dm_tree_node *node,
const char *vdo_pool_name,
const char *data_uuid,
uint64_t data_size,
const struct dm_vdo_target_params *param);
const struct dm_vdo_target_params *vtp);
/*
* FIXME Add individual cache policy pairs <key> = value, like:
@ -1178,9 +1178,9 @@ void dm_tree_node_set_presuspend_node(struct dm_tree_node *node,
struct dm_tree_node *presuspend_node);
int dm_tree_node_add_target_area(struct dm_tree_node *node,
const char *dev_name,
const char *dlid,
uint64_t offset);
const char *dev_name,
const char *uuid,
uint64_t offset);
/*
* Only for temporarily-missing raid devices where changes are tracked.
@ -1590,9 +1590,9 @@ int dm_fclose(FILE *stream);
* Pointer to the buffer is stored in *buf.
* Returns -1 on failure leaving buf undefined.
*/
int dm_asprintf(char **buf, const char *format, ...)
int dm_asprintf(char **result, const char *format, ...)
__attribute__ ((format(printf, 2, 3)));
int dm_vasprintf(char **buf, const char *format, va_list ap)
int dm_vasprintf(char **result, const char *format, va_list aq)
__attribute__ ((format(printf, 2, 0)));
/*
@ -1941,7 +1941,7 @@ void dm_report_free(struct dm_report *rh);
* Prefix added to each field name with DM_REPORT_OUTPUT_FIELD_NAME_PREFIX
*/
int dm_report_set_output_field_name_prefix(struct dm_report *rh,
const char *report_prefix);
const char *output_field_name_prefix);
int dm_report_set_selection(struct dm_report *rh, const char *selection);
@ -2081,7 +2081,7 @@ int dm_config_write_one_node_out(const struct dm_config_node *cn, const struct d
struct dm_config_node *dm_config_find_node(const struct dm_config_node *cn, const char *path);
int dm_config_has_node(const struct dm_config_node *cn, const char *path);
int dm_config_remove_node(struct dm_config_node *parent, struct dm_config_node *remove);
int dm_config_remove_node(struct dm_config_node *parent, struct dm_config_node *rem_node);
const char *dm_config_find_str(const struct dm_config_node *cn, const char *path, const char *fail);
const char *dm_config_find_str_allow_empty(const struct dm_config_node *cn, const char *path, const char *fail);
int dm_config_find_int(const struct dm_config_node *cn, const char *path, int fail);
@ -2113,7 +2113,7 @@ unsigned dm_config_maybe_section(const char *str, unsigned len);
const char *dm_config_parent_name(const struct dm_config_node *n);
struct dm_config_node *dm_config_clone_node_with_mem(struct dm_pool *mem, const struct dm_config_node *node, int siblings);
struct dm_config_node *dm_config_clone_node_with_mem(struct dm_pool *mem, const struct dm_config_node *cn, int siblings);
struct dm_config_node *dm_config_create_node(struct dm_config_tree *cft, const char *key);
struct dm_config_value *dm_config_create_value(struct dm_config_tree *cft);
struct dm_config_node *dm_config_clone_node(struct dm_config_tree *cft, const struct dm_config_node *cn, int siblings);

View File

@ -1461,9 +1461,9 @@ struct dm_config_node *dm_config_clone_node_with_mem(struct dm_pool *mem, const
return new_cn;
}
struct dm_config_node *dm_config_clone_node(struct dm_config_tree *cft, const struct dm_config_node *node, int sib)
struct dm_config_node *dm_config_clone_node(struct dm_config_tree *cft, const struct dm_config_node *cn, int sib)
{
return dm_config_clone_node_with_mem(cft->mem, node, sib);
return dm_config_clone_node_with_mem(cft->mem, cn, sib);
}
struct dm_config_node *dm_config_create_node(struct dm_config_tree *cft, const char *key)

View File

@ -98,7 +98,7 @@ struct lvmcache_info *lvmcache_info_from_pvid(const char *pvid, struct device *d
struct lvmcache_info *lvmcache_info_from_pv_id(const struct id *pv_id, struct device *dev, int valid_only);
const char *lvmcache_vgname_from_vgid(struct dm_pool *mem, const char *vgid);
const char *lvmcache_vgid_from_vgname(struct cmd_context *cmd, const char *vgname);
struct device *lvmcache_device_from_pv_id(struct cmd_context *cmd, const struct id *pv_id, uint64_t *label_sector);
struct device *lvmcache_device_from_pv_id(struct cmd_context *cmd, const struct id *pvid, uint64_t *label_sector);
const char *lvmcache_vgname_from_info(struct lvmcache_info *info);
const struct format_type *lvmcache_fmt_from_info(struct lvmcache_info *info);

View File

@ -108,7 +108,7 @@ static inline int _is_file_based_config_source(config_source_t source)
*/
struct dm_config_tree *config_open(config_source_t source,
const char *filename,
int unused)
int keep_open __attribute__((unused)))
{
struct dm_config_tree *cft = dm_config_create();
struct config_source *cs;

View File

@ -243,7 +243,7 @@ struct dm_config_tree *config_open(config_source_t source, const char *filename,
int config_file_read_fd(struct dm_config_tree *cft, struct device *dev, dev_io_reason_t reason,
off_t offset, size_t size, off_t offset2, size_t size2,
checksum_fn_t checksum_fn, uint32_t checksum,
int skip_parse, int no_dup_node_check, int only_pv_summary);
int checksum_only, int no_dup_node_check, int only_pv_summary);
int config_file_read_from_file(struct dm_config_tree *cft);
struct dm_config_tree *config_file_open_and_read(const char *config_file, config_source_t source,
struct cmd_context *cmd);

View File

@ -64,7 +64,7 @@ struct block {
/*
* Ownership of engine passes. Engine will be destroyed even if this fails.
*/
struct bcache *bcache_create(sector_t block_size, unsigned nr_cache_blocks,
struct bcache *bcache_create(sector_t block_sectors, unsigned nr_cache_blocks,
struct io_engine *engine);
void bcache_destroy(struct bcache *cache);

View File

@ -58,10 +58,10 @@ const char *dev_subsystem_name(struct dev_types *dt, struct device *dev);
int major_is_scsi_device(struct dev_types *dt, int major);
/* Signature/superblock recognition with position returned where found. */
int dev_is_md_component(struct cmd_context *cmd, struct device *dev, uint64_t *sb, int full);
int dev_is_mpath_component(struct cmd_context *cmd, struct device *dev, dev_t *mpath_devno);
int dev_is_swap(struct cmd_context *cmd, struct device *dev, uint64_t *signature, int full);
int dev_is_luks(struct cmd_context *cmd, struct device *dev, uint64_t *signature, int full);
int dev_is_md_component(struct cmd_context *cmd, struct device *dev, uint64_t *offset_found, int full);
int dev_is_mpath_component(struct cmd_context *cmd, struct device *dev, dev_t *holder_devno);
int dev_is_swap(struct cmd_context *cmd, struct device *dev, uint64_t *offset_found, int full);
int dev_is_luks(struct cmd_context *cmd, struct device *dev, uint64_t *offset_found, int full);
int dasd_is_cdl_formatted(struct device *dev);
const char *dev_mpath_component_wwid(struct cmd_context *cmd, struct device *dev);

View File

@ -16,11 +16,11 @@
#include "lib/misc/lib.h"
#include "lib/device/device.h"
int device_id_list_remove(struct dm_list *list, struct device *dev)
int device_id_list_remove(struct dm_list *devices, struct device *dev)
{
struct device_id_list *dil;
dm_list_iterate_items(dil, list) {
dm_list_iterate_items(dil, devices) {
if (dil->dev == dev) {
dm_list_del(&dil->list);
return 1;
@ -29,22 +29,22 @@ int device_id_list_remove(struct dm_list *list, struct device *dev)
return 0;
}
struct device_id_list *device_id_list_find_dev(struct dm_list *list, struct device *dev)
struct device_id_list *device_id_list_find_dev(struct dm_list *devices, struct device *dev)
{
struct device_id_list *dil;
dm_list_iterate_items(dil, list) {
dm_list_iterate_items(dil, devices) {
if (dil->dev == dev)
return dil;
}
return NULL;
}
int device_list_remove(struct dm_list *list, struct device *dev)
int device_list_remove(struct dm_list *devices, struct device *dev)
{
struct device_list *devl;
dm_list_iterate_items(devl, list) {
dm_list_iterate_items(devl, devices) {
if (devl->dev == dev) {
dm_list_del(&devl->list);
return 1;
@ -53,11 +53,11 @@ int device_list_remove(struct dm_list *list, struct device *dev)
return 0;
}
struct device_list *device_list_find_dev(struct dm_list *list, struct device *dev)
struct device_list *device_list_find_dev(struct dm_list *devices, struct device *dev)
{
struct device_list *devl;
dm_list_iterate_items(devl, list) {
dm_list_iterate_items(devl, devices) {
if (devl->dev == dev)
return devl;
}

View File

@ -17,9 +17,9 @@
#define _LVM_DEVICE_ID_H
void free_du(struct dev_use *du);
void free_dus(struct dm_list *list);
void free_dus(struct dm_list *dus);
void free_did(struct dev_id *did);
void free_dids(struct dm_list *list);
void free_dids(struct dm_list *ids);
const char *idtype_to_str(uint16_t idtype);
uint16_t idtype_from_str(const char *str);
const char *dev_idtype_for_metadata(struct cmd_context *cmd, struct device *dev);
@ -69,8 +69,8 @@ int read_sys_block_binary(struct cmd_context *cmd, struct device *dev,
int dev_has_mpath_uuid(struct cmd_context *cmd, struct device *dev, char **idname_out);
int scsi_type_to_idtype(int wwid_type);
int nvme_type_to_idtype(int wwid_type);
int scsi_type_to_idtype(int scsi_type);
int nvme_type_to_idtype(int nvme_type);
int idtype_to_scsi_type(int idtype);
int idtype_to_nvme_type(int idtype);
void free_wwids(struct dm_list *ids);

View File

@ -27,7 +27,7 @@ struct dev_filter *md_filter_create(struct cmd_context *cmd, struct dev_types *d
struct dev_filter *fwraid_filter_create(struct dev_types *dt);
struct dev_filter *mpath_filter_create(struct dev_types *dt);
struct dev_filter *partitioned_filter_create(struct dev_types *dt);
struct dev_filter *persistent_filter_create(struct dev_types *dt, struct dev_filter *f);
struct dev_filter *persistent_filter_create(struct dev_types *dt, struct dev_filter *real);
struct dev_filter *sysfs_filter_create(const char *sysfs_dir);
struct dev_filter *signature_filter_create(struct dev_types *dt);
struct dev_filter *deviceid_filter_create(struct cmd_context *cmd);

View File

@ -70,7 +70,7 @@ int print_segtype_lvflags(char *buffer, size_t size, uint64_t status);
int read_lvflags(uint64_t *status, const char *flags_str);
int text_vg_export_file(struct volume_group *vg, const char *desc, FILE *fp);
size_t text_vg_export_raw(struct volume_group *vg, const char *desc, char **buf, uint32_t *alloc_size);
size_t text_vg_export_raw(struct volume_group *vg, const char *desc, char **buf, uint32_t *buf_size);
struct volume_group *text_read_metadata_file(struct format_instance *fid,
const char *file,
time_t *when, char **desc);

View File

@ -814,7 +814,7 @@ struct wipe_params {
};
/* Zero out LV and/or wipe signatures */
int wipe_lv(struct logical_volume *lv, struct wipe_params params);
int wipe_lv(struct logical_volume *lv, struct wipe_params wp);
/* Wipe any signatures and zero first sector on @lv */
int activate_and_wipe_lv(struct logical_volume *lv, int commit);

View File

@ -69,7 +69,7 @@ int lvm_fclose(FILE *fp, const char *filename);
* Convert stat->st_ctim status of last change in nanoseconds
* uses st_ctime when not available.
*/
void lvm_stat_ctim(struct timespec *ts, const struct stat *buf);
void lvm_stat_ctim(struct timespec *ctim, const struct stat *buf);
/* Inspired by <sys/time.h> timercmp() macro for timeval */
#define timespeccmp(tsp, usp, cmp)\

View File

@ -82,12 +82,12 @@ static int _type_interesting(log_state *s, int type) {
return 0;
}
void daemon_logf(log_state *s, int type, const char *fmt, ...) {
void daemon_logf(log_state *s, int type, const char *format, ...) {
char *buf;
va_list ap;
va_start(ap, fmt);
if (dm_vasprintf(&buf, fmt, ap) >= 0) {
va_start(ap, format);
if (dm_vasprintf(&buf, format, ap) >= 0) {
daemon_log(s, type, buf);
free(buf);
} /* else return_0 */
@ -116,7 +116,7 @@ void daemon_log_cft(log_state *s, int type, const char *prefix, const struct dm_
(void) dm_config_write_node(n, &_log_line, &b);
}
void daemon_log_multi(log_state *s, int type, const char *prefix, const char *msg)
void daemon_log_multi(log_state *s, int type, const char *prefix, const char *message)
{
struct log_line_baton b = { .s = s, .type = type, .prefix = prefix };
char *buf;
@ -125,7 +125,7 @@ void daemon_log_multi(log_state *s, int type, const char *prefix, const char *ms
if (!_type_interesting(s, type))
return;
buf = strdup(msg);
buf = strdup(message);
pos = buf;
if (!buf)

View File

@ -183,7 +183,7 @@ struct dm_versions {
int dm_get_library_version(char *version, size_t size);
int dm_task_get_driver_version(struct dm_task *dmt, char *version, size_t size);
int dm_task_get_info(struct dm_task *dmt, struct dm_info *dmi);
int dm_task_get_info(struct dm_task *dmt, struct dm_info *info);
/*
* This function returns dm device's UUID based on the value
@ -1261,7 +1261,7 @@ const char *dm_stats_get_current_region_aux_data(const struct dm_stats *dms);
* be expressed as "M-N", where M and N are the start and end region_id
* values for the range.
*/
int dm_stats_create_group(struct dm_stats *dms, const char *group,
int dm_stats_create_group(struct dm_stats *dms, const char *members,
const char *alias, uint64_t *group_id);
/*
@ -2046,9 +2046,9 @@ void dm_tree_node_set_presuspend_node(struct dm_tree_node *node,
struct dm_tree_node *presuspend_node);
int dm_tree_node_add_target_area(struct dm_tree_node *node,
const char *dev_name,
const char *dlid,
uint64_t offset);
const char *dev_name,
const char *uuid,
uint64_t offset);
/*
* Only for temporarily-missing raid devices where changes are tracked.
@ -2779,9 +2779,9 @@ int dm_fclose(FILE *stream);
* Pointer to the buffer is stored in *buf.
* Returns -1 on failure leaving buf undefined.
*/
int dm_asprintf(char **buf, const char *format, ...)
int dm_asprintf(char **result, const char *format, ...)
__attribute__ ((format(printf, 2, 3)));
int dm_vasprintf(char **buf, const char *format, va_list ap)
int dm_vasprintf(char **result, const char *format, va_list aq)
__attribute__ ((format(printf, 2, 0)));
/*
@ -3130,7 +3130,7 @@ void dm_report_free(struct dm_report *rh);
* Prefix added to each field name with DM_REPORT_OUTPUT_FIELD_NAME_PREFIX
*/
int dm_report_set_output_field_name_prefix(struct dm_report *rh,
const char *report_prefix);
const char *output_field_name_prefix);
int dm_report_set_selection(struct dm_report *rh, const char *selection);
@ -3332,7 +3332,7 @@ int dm_stats_get_metric(const struct dm_stats *dms, int metric,
int dm_stats_get_rd_merges_per_sec(const struct dm_stats *dms, double *rrqm,
uint64_t region_id, uint64_t area_id);
int dm_stats_get_wr_merges_per_sec(const struct dm_stats *dms, double *rrqm,
int dm_stats_get_wr_merges_per_sec(const struct dm_stats *dms, double *wrqm,
uint64_t region_id, uint64_t area_id);
int dm_stats_get_reads_per_sec(const struct dm_stats *dms, double *rd_s,
@ -3346,7 +3346,7 @@ int dm_stats_get_read_sectors_per_sec(const struct dm_stats *dms,
uint64_t area_id);
int dm_stats_get_write_sectors_per_sec(const struct dm_stats *dms,
double *wr_s, uint64_t region_id,
double *wsec_s, uint64_t region_id,
uint64_t area_id);
int dm_stats_get_average_request_size(const struct dm_stats *dms,
@ -3584,7 +3584,7 @@ int dm_config_write_one_node_out(const struct dm_config_node *cn, const struct d
struct dm_config_node *dm_config_find_node(const struct dm_config_node *cn, const char *path);
int dm_config_has_node(const struct dm_config_node *cn, const char *path);
int dm_config_remove_node(struct dm_config_node *parent, struct dm_config_node *remove);
int dm_config_remove_node(struct dm_config_node *parent, struct dm_config_node *rem_node);
const char *dm_config_find_str(const struct dm_config_node *cn, const char *path, const char *fail);
const char *dm_config_find_str_allow_empty(const struct dm_config_node *cn, const char *path, const char *fail);
int dm_config_find_int(const struct dm_config_node *cn, const char *path, int fail);
@ -3616,7 +3616,7 @@ unsigned dm_config_maybe_section(const char *str, unsigned len);
const char *dm_config_parent_name(const struct dm_config_node *n);
struct dm_config_node *dm_config_clone_node_with_mem(struct dm_pool *mem, const struct dm_config_node *node, int siblings);
struct dm_config_node *dm_config_clone_node_with_mem(struct dm_pool *mem, const struct dm_config_node *cn, int siblings);
struct dm_config_node *dm_config_create_node(struct dm_config_tree *cft, const char *key);
struct dm_config_value *dm_config_create_value(struct dm_config_tree *cft);
struct dm_config_node *dm_config_clone_node(struct dm_config_tree *cft, const struct dm_config_node *cn, int siblings);

View File

@ -1461,9 +1461,9 @@ struct dm_config_node *dm_config_clone_node_with_mem(struct dm_pool *mem, const
return new_cn;
}
struct dm_config_node *dm_config_clone_node(struct dm_config_tree *cft, const struct dm_config_node *node, int sib)
struct dm_config_node *dm_config_clone_node(struct dm_config_tree *cft, const struct dm_config_node *cn, int sib)
{
return dm_config_clone_node_with_mem(cft->mem, node, sib);
return dm_config_clone_node_with_mem(cft->mem, cn, sib);
}
struct dm_config_node *dm_config_create_node(struct dm_config_tree *cft, const char *key)

View File

@ -3186,9 +3186,9 @@ int dm_stats_get_current_region_len(const struct dm_stats *dms,
}
int dm_stats_get_current_region_area_len(const struct dm_stats *dms,
uint64_t *step)
uint64_t *area_len)
{
return dm_stats_get_region_area_len(dms, step, dms->cur_region);
return dm_stats_get_region_area_len(dms, area_len, dms->cur_region);
}
int dm_stats_get_area_start(const struct dm_stats *dms, uint64_t *start,

View File

@ -20,36 +20,36 @@
//-----------------------------------------------------------------
// Declare the function that adds tests suites here ...
void bcache_tests(struct dm_list *suites);
void bcache_utils_tests(struct dm_list *suites);
void bitset_tests(struct dm_list *suites);
void config_tests(struct dm_list *suites);
void dm_list_tests(struct dm_list *suites);
void dm_hash_tests(struct dm_list *suites);
void dm_status_tests(struct dm_list *suites);
void io_engine_tests(struct dm_list *suites);
void percent_tests(struct dm_list *suites);
void radix_tree_tests(struct dm_list *suites);
void regex_tests(struct dm_list *suites);
void string_tests(struct dm_list *suites);
void vdo_tests(struct dm_list *suites);
void bcache_tests(struct dm_list *all_tests);
void bcache_utils_tests(struct dm_list *all_tests);
void bitset_tests(struct dm_list *all_tests);
void config_tests(struct dm_list *all_tests);
void dm_list_tests(struct dm_list *all_tests);
void dm_hash_tests(struct dm_list *all_tests);
void dm_status_tests(struct dm_list *all_tests);
void io_engine_tests(struct dm_list *all_tests);
void percent_tests(struct dm_list *all_tests);
void radix_tree_tests(struct dm_list *all_tests);
void regex_tests(struct dm_list *all_tests);
void string_tests(struct dm_list *all_tests);
void vdo_tests(struct dm_list *all_tests);
// ... and call it in here.
static inline void register_all_tests(struct dm_list *suites)
static inline void register_all_tests(struct dm_list *all_tests)
{
bcache_tests(suites);
bcache_utils_tests(suites);
bitset_tests(suites);
config_tests(suites);
dm_list_tests(suites);
dm_hash_tests(suites);
dm_status_tests(suites);
io_engine_tests(suites);
percent_tests(suites);
radix_tree_tests(suites);
regex_tests(suites);
string_tests(suites);
vdo_tests(suites);
bcache_tests(all_tests);
bcache_utils_tests(all_tests);
bitset_tests(all_tests);
config_tests(all_tests);
dm_list_tests(all_tests);
dm_hash_tests(all_tests);
dm_status_tests(all_tests);
io_engine_tests(all_tests);
percent_tests(all_tests);
radix_tree_tests(all_tests);
regex_tests(all_tests);
string_tests(all_tests);
vdo_tests(all_tests);
}
//-----------------------------------------------------------------

View File

@ -1228,7 +1228,7 @@ static int _opt_synonym_to_standard(const char *cmd_name, int opt)
return 0;
}
static void _add_getopt_arg(int arg_enum, char **optstrp, struct option **longoptsp);
static void _add_getopt_arg(int opt_enum, char **optstrp, struct option **longoptsp);
/*
* The valid args for a command name in general is a union of

View File

@ -119,7 +119,8 @@ int process_each_vg(struct cmd_context *cmd,
struct processing_handle *handle,
process_single_vg_fn_t process_single_vg);
int process_each_pv(struct cmd_context *cmd, int argc, char **argv, const char *vg_name,
int process_each_pv(struct cmd_context *cmd, int argc, char **argv,
const char *only_this_vgname,
int all_is_set, uint32_t read_flags,
struct processing_handle *handle,
process_single_pv_fn_t process_single_pv);
@ -152,7 +153,7 @@ int process_each_pv_in_vg(struct cmd_context *cmd, struct volume_group *vg,
int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg,
struct dm_list *arg_lvnames, const struct dm_list *tagsl,
struct dm_list *arg_lvnames, const struct dm_list *tags_in,
int stop_on_error, struct processing_handle *handle,
check_single_lv_fn_t check_single_lv,
process_single_lv_fn_t process_single_lv);