1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-18 10:04:20 +03:00

Some const cleanups

Minor const warning fixes and internal API updates.
This commit is contained in:
Zdenek Kabelac 2010-12-20 13:19:13 +00:00
parent 9366d4e391
commit ba96eb24fa
5 changed files with 6 additions and 6 deletions

View File

@ -239,8 +239,8 @@ int read_config_fd(struct config_tree *cft, struct device *dev,
} }
if (checksum_fn && checksum != if (checksum_fn && checksum !=
(checksum_fn(checksum_fn(INITIAL_CRC, (uint8_t *)p->fb, size), (checksum_fn(checksum_fn(INITIAL_CRC, (const uint8_t *)p->fb, size),
(uint8_t *)(p->fb + size), size2))) { (const uint8_t *)(p->fb + size), size2))) {
log_error("%s: Checksum error", dev_name(dev)); log_error("%s: Checksum error", dev_name(dev));
goto out; goto out;
} }

View File

@ -103,7 +103,7 @@ int btree_insert(struct btree *t, uint32_t k, void *data)
void *btree_get_data(const struct btree_iter *it) 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) static struct node *_left(struct node *n)

View File

@ -75,7 +75,7 @@ static struct user_subpool *_build_usp(struct dm_list *pls, struct dm_pool *mem,
return usp; 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; int i;
unsigned j; unsigned j;

View File

@ -131,7 +131,7 @@ struct volume_group *text_vg_import_file(struct format_instance *fid,
when, desc); 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 format_instance *fid)
{ {
struct volume_group *vg = NULL; struct volume_group *vg = NULL;

View File

@ -386,7 +386,7 @@ void lv_calculate_readahead(const struct logical_volume *lv, uint32_t *read_ahea
* For internal metadata caching. * For internal metadata caching.
*/ */
int export_vg_to_buffer(struct volume_group *vg, char **buf); 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); struct format_instance *fid);
/* /*