mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Some const cleanups
Minor const warning fixes and internal API updates.
This commit is contained in:
parent
9366d4e391
commit
ba96eb24fa
@ -239,8 +239,8 @@ int read_config_fd(struct config_tree *cft, struct device *dev,
|
||||
}
|
||||
|
||||
if (checksum_fn && checksum !=
|
||||
(checksum_fn(checksum_fn(INITIAL_CRC, (uint8_t *)p->fb, size),
|
||||
(uint8_t *)(p->fb + size), size2))) {
|
||||
(checksum_fn(checksum_fn(INITIAL_CRC, (const uint8_t *)p->fb, size),
|
||||
(const uint8_t *)(p->fb + size), size2))) {
|
||||
log_error("%s: Checksum error", dev_name(dev));
|
||||
goto out;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ int btree_insert(struct btree *t, uint32_t k, void *data)
|
||||
|
||||
void *btree_get_data(const struct btree_iter *it)
|
||||
{
|
||||
return ((struct node *) it)->data;
|
||||
return ((const struct node *) it)->data;
|
||||
}
|
||||
|
||||
static struct node *_left(struct node *n)
|
||||
|
@ -75,7 +75,7 @@ static struct user_subpool *_build_usp(struct dm_list *pls, struct dm_pool *mem,
|
||||
return usp;
|
||||
}
|
||||
|
||||
static int _check_usp(char *vgname, struct user_subpool *usp, int sp_count)
|
||||
static int _check_usp(const char *vgname, struct user_subpool *usp, int sp_count)
|
||||
{
|
||||
int i;
|
||||
unsigned j;
|
||||
|
@ -131,7 +131,7 @@ struct volume_group *text_vg_import_file(struct format_instance *fid,
|
||||
when, desc);
|
||||
}
|
||||
|
||||
struct volume_group *import_vg_from_buffer(char *buf,
|
||||
struct volume_group *import_vg_from_buffer(const char *buf,
|
||||
struct format_instance *fid)
|
||||
{
|
||||
struct volume_group *vg = NULL;
|
||||
|
@ -386,7 +386,7 @@ void lv_calculate_readahead(const struct logical_volume *lv, uint32_t *read_ahea
|
||||
* For internal metadata caching.
|
||||
*/
|
||||
int export_vg_to_buffer(struct volume_group *vg, char **buf);
|
||||
struct volume_group *import_vg_from_buffer(char *buf,
|
||||
struct volume_group *import_vg_from_buffer(const char *buf,
|
||||
struct format_instance *fid);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user