|
From: Steve D. <ste...@us...> - 2009-01-16 15:58:33
|
Update of /cvsroot/evms/evms2/engine/plugins/lvm In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19857 Modified Files: lvm_groups.c lvm_info.c lvm_io.c lvm_move.c lvm_options.c lvm_pv.c lvm_pv.h lvm_volumes.c lvmregmgr.c lvmregmgr.h Log Message: Cleanup compiler warnings. Added bonus: My editor cleans up trailing whitespace. Index: lvm_options.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_options.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- lvm_options.c 13 Jan 2005 18:27:02 -0000 1.35 +++ lvm_options.c 16 Jan 2009 15:58:28 -0000 1.36 @@ -47,7 +47,8 @@ char * vg_name, u_int32_t * pe_size) { - int i, rc = 0; + uint i; + int rc = 0; LOG_ENTRY(); @@ -182,7 +183,7 @@ * on which objects are selected. **/ int lvm_create_container_set_objects(task_context_t * context, - list_anchor_t declined_objects, + list_anchor_t UNUSED(declined_objects), task_effect_t * effect) { storage_object_t * segment; @@ -305,7 +306,8 @@ lvm_physical_volume_t * pv_entries[], lvm_volume_group_t * group) { - int i, rc = 0; + uint i; + int rc = 0; LOG_ENTRY(); @@ -341,7 +343,8 @@ lvm_volume_group_t * group, lvm_lv_create_options_t * lv_opts) { - int i, rc; + uint i; + int rc; LOG_ENTRY(); @@ -627,7 +630,7 @@ * declined_objects. **/ int lvm_create_region_set_objects(task_context_t * context, - list_anchor_t declined_objects, + list_anchor_t UNUSED(declined_objects), task_effect_t * effect) { lvm_logical_volume_t * freespace; @@ -717,7 +720,8 @@ u_int32_t extents = 0; u_int32_t lv_size = 0; u_int32_t stripes = 1; - int i, rc = 0; + uint i; + int rc = 0; LOG_ENTRY(); @@ -869,7 +873,8 @@ lvm_logical_volume_t * volume, lvm_lv_expand_options_t * lv_opts) { - int i, j, rc = 0; + uint i, j; + int rc = 0; LOG_ENTRY(); @@ -1161,7 +1166,8 @@ u_int32_t add_extents = 0; u_int32_t add_size = 0; sector_count_t add_sectors; - int i, rc = 0; + uint i; + int rc = 0; LOG_ENTRY(); @@ -1333,7 +1339,8 @@ { u_int32_t extents = 0; u_int32_t size = 0; - int i, rc; + uint i; + int rc; LOG_ENTRY(); @@ -1742,8 +1749,8 @@ * declined_objects. **/ int lvm_expand_container_set_objects(task_context_t * context, - list_anchor_t declined_objects, - task_effect_t * effect) + list_anchor_t UNUSED(declined_objects), + task_effect_t * UNUSED(effect)) { lvm_volume_group_t * group = context->container->private_data; storage_object_t * segment; @@ -1789,10 +1796,10 @@ * This is a helper function for lvm_set_option. Since there are no options * for container expansion, this function is mostly a no-op. **/ -void lvm_expand_container_set_option(task_context_t * context, - u_int32_t index, - value_t * value, - task_effect_t * effect) +void lvm_expand_container_set_option(task_context_t * UNUSED(context), + u_int32_t UNUSED(index), + value_t * UNUSED(value), + task_effect_t * UNUSED(effect)) { LOG_ENTRY(); LOG_EXIT_VOID(); @@ -1860,13 +1867,14 @@ * declined_objects. **/ int lvm_shrink_container_set_objects(task_context_t * context, - list_anchor_t declined_objects, - task_effect_t * effect) + list_anchor_t UNUSED(declined_objects), + task_effect_t * UNUSED(effect)) { lvm_volume_group_t * group = context->container->private_data; storage_object_t * segment; list_element_t itr; - int rc, count; + int rc; + uint count; LOG_ENTRY(); @@ -1901,10 +1909,10 @@ * This is a helper function for lvm_set_option. Since there are no options * for container shrink, this function is mostly a no-op. **/ -void lvm_shrink_container_set_option(task_context_t * context, - u_int32_t index, - value_t * value, - task_effect_t * effect) +void lvm_shrink_container_set_option(task_context_t * UNUSED(context), + u_int32_t UNUSED(index), + value_t * UNUSED(value), + task_effect_t * UNUSED(effect)) { LOG_ENTRY(); LOG_EXIT_VOID(); @@ -1958,7 +1966,7 @@ int lvm_set_volume_info_set_option(task_context_t * context, u_int32_t index, value_t * value, - task_effect_t * effect) + task_effect_t * UNUSED(effect)) { option_desc_array_t *od = context->option_descriptors; storage_object_t *region = context->object; @@ -1993,7 +2001,7 @@ * * Parse the option-values from the option-array. **/ -void lvm_set_volume_info_parse_options(lvm_logical_volume_t *volume, +void lvm_set_volume_info_parse_options(lvm_logical_volume_t * UNUSED(volume), option_array_t *options, char **lv_name) { @@ -2091,7 +2099,7 @@ int lvm_set_group_info_set_option(task_context_t * context, u_int32_t index, value_t * value, - task_effect_t * effect) + task_effect_t * UNUSED(effect)) { option_desc_array_t *od = context->option_descriptors; int rc; @@ -2124,7 +2132,7 @@ * * Parse the option-values from the option-array. **/ -void lvm_set_group_info_parse_options(lvm_volume_group_t *group, +void lvm_set_group_info_parse_options(lvm_volume_group_t * UNUSED(group), option_array_t *options, char **vg_name) { @@ -2167,7 +2175,7 @@ * * Verify that these options are valid for setting info for this volume. **/ -int lvm_set_group_info_validate_options(lvm_volume_group_t *group, +int lvm_set_group_info_validate_options(lvm_volume_group_t * UNUSED(group), char *vg_name) { int rc; Index: lvm_groups.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_groups.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- lvm_groups.c 20 Aug 2008 23:51:13 -0000 1.26 +++ lvm_groups.c 16 Jan 2009 15:58:28 -0000 1.27 @@ -387,7 +387,7 @@ pv_entry->segment->geometry.block_size); group->geometry.bytes_per_sector = max(group->geometry.bytes_per_sector, pv_entry->segment->geometry.bytes_per_sector); - + LOG_DETAILS("Added object %s to container %s\n", segment->name, group->container->name); @@ -692,7 +692,7 @@ /* Get a new number for this group. */ vg->vg_number = lvm_find_free_vg_number(); - if (vg->vg_number < 0) { + if ((int) vg->vg_number < 0) { EngFncs->engine_free(vg); vg = NULL; goto out; @@ -711,7 +711,7 @@ vg->vgda = 0; vg->pe_size = pe_size; vg->pe_total = 0; - vg->pe_allocated= 0; + vg->pe_allocated= 0; vg->pvg_total = 0; out: @@ -975,7 +975,7 @@ goto out; } group = container->private_data; - + /* Make sure this PV isn't the last one in the group. To take the last * PV out, use the lvm_destroy_container function. We don't want empty * groups hanging around. Index: lvmregmgr.h =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvmregmgr.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- lvmregmgr.h 22 Feb 2006 20:21:25 -0000 1.41 +++ lvmregmgr.h 16 Jan 2009 15:58:28 -0000 1.42 @@ -47,7 +47,7 @@ #endif #define MAX_VG 99 #define MAX_LV 256 -#define MAX_PV 256 +#define MAX_PV 256 #define NAME_LEN 128 #define UUID_LEN 32 #define LVM_BLK_MAJOR 58 @@ -174,7 +174,7 @@ uint32_t pe_size; uint32_t pe_total; uint32_t pe_allocated; - + /* New in struct version 2 */ uint32_t pe_start; /* in sectors */ @@ -190,7 +190,7 @@ uint8_t vg_name[NAME_LEN]; uint32_t lv_access; uint32_t lv_status; - uint32_t lv_open; + uint32_t lv_open; uint32_t lv_dev; uint32_t lv_number; uint32_t lv_mirror_copies; @@ -375,8 +375,8 @@ lvm_logical_volume_t * freespace; geometry_t geometry; u_int32_t move_extents; - int pv_count; - int volume_count; + uint pv_count; + uint volume_count; int flags; } lvm_volume_group_t; Index: lvmregmgr.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvmregmgr.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- lvmregmgr.c 22 Feb 2006 20:21:25 -0000 1.94 +++ lvmregmgr.c 16 Jan 2009 15:58:28 -0000 1.95 @@ -245,7 +245,7 @@ * or a compatibility volume. **/ static int lvm_can_set_volume(storage_object_t * region, - boolean flag) + boolean UNUSED(flag)) { int rc = 0; @@ -435,7 +435,7 @@ * the appropriate freespace region. **/ static int lvm_delete(storage_object_t * region, - list_anchor_t children) + list_anchor_t UNUSED(children)) { lvm_logical_volume_t * volume; lvm_volume_group_t * group; @@ -488,7 +488,7 @@ **/ static int lvm_expand(storage_object_t * region, storage_object_t * expand_object, - list_anchor_t input_objects, + list_anchor_t UNUSED(input_objects), option_array_t * options) { lvm_volume_group_t * group; @@ -590,7 +590,7 @@ **/ static int lvm_shrink(storage_object_t * region, storage_object_t * shrink_object, - list_anchor_t input_objects, + list_anchor_t UNUSED(input_objects), option_array_t * options) { lvm_volume_group_t * group; @@ -674,8 +674,8 @@ /** * lvm_set_volume **/ -static void lvm_set_volume(storage_object_t * region, - boolean flag) +static void lvm_set_volume(storage_object_t * UNUSED(region), + boolean UNUSED(flag)) { LOG_ENTRY(); LOG_DEBUG("That's nice. :)\n"); @@ -735,8 +735,8 @@ * * All commit operations are done in commit_container_changes. **/ -static int lvm_commit_changes(storage_object_t * region, - unsigned int phase) +static int lvm_commit_changes(storage_object_t * UNUSED(region), + unsigned int UNUSED(phase)) { LOG_ENTRY(); LOG_DEBUG("That's nice. :)\n"); @@ -747,7 +747,7 @@ /** * lvm_can_activate **/ -static int lvm_can_activate(storage_object_t * region) +static int lvm_can_activate(storage_object_t * UNUSED(region)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -790,7 +790,7 @@ /** * lvm_can_deactivate **/ -static int lvm_can_deactivate(storage_object_t * region) +static int lvm_can_deactivate(storage_object_t * UNUSED(region)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -927,7 +927,7 @@ rc = EINVAL; break; } - + lvm_expand_container_allocate_option_descriptor(context->option_descriptors); rc = lvm_expand_container_get_acceptable(context->container, context->acceptable_objects); @@ -1178,7 +1178,7 @@ name); rc = EINVAL; } - + LOG_EXIT_INT(rc); return rc; } @@ -1234,7 +1234,7 @@ extended_info_array_t * info = NULL; char buffer[50] = {0}; int i = 0, rc = 0; - + LOG_ENTRY(); if (!name) { @@ -1504,7 +1504,7 @@ **/ static int lvm_region_function(storage_object_t * region, task_action_t action, - list_anchor_t objects, + list_anchor_t UNUSED(objects), option_array_t * options) { lvm_logical_volume_t * volume = region->private_data; @@ -1652,9 +1652,9 @@ * * PVs can expand by any amount. **/ -static int lvm_can_expand_container_by(storage_container_t *container, - storage_object_t *consumed_object, - sector_count_t *delta_size) +static int lvm_can_expand_container_by(storage_container_t * UNUSED(container), + storage_object_t * UNUSED(consumed_object), + sector_count_t * UNUSED(delta_size)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -1914,7 +1914,7 @@ **/ static int lvm_add_object(storage_object_t * object, storage_container_t * container, - option_array_t * options) + option_array_t * UNUSED(options)) { lvm_volume_group_t * group = container->private_data; lvm_physical_volume_t * pv_entry; @@ -1941,7 +1941,7 @@ if (rc) { goto out; } - + /* Create a new physical volume for the segment. */ pv_entry = lvm_create_pv_from_segment(object); if (!pv_entry) { Index: lvm_info.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_info.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- lvm_info.c 22 Feb 2006 20:21:25 -0000 1.20 +++ lvm_info.c 16 Jan 2009 15:58:28 -0000 1.21 @@ -126,7 +126,7 @@ info->info[i].value.ui32 = volume->lv->lv_stripesize; i++; } - + if (volume->flags & LVM_LV_FLAG_INCOMPLETE) { info->info[i].name = EngFncs->engine_strdup("Incomplete_LV"); info->info[i].title = EngFncs->engine_strdup(_("INCOMPLETE REGION!!!")); @@ -201,7 +201,7 @@ int printed_dots = FALSE; int consecutive_run = FALSE; int info_line = 0; - int j, i = 0; + uint j, i = 0; LOG_ENTRY(); @@ -627,7 +627,7 @@ * If this is the last PE on the PV, the "next" PE is not consecutive. **/ static inline int is_next_pe_consecutive(lvm_physical_volume_t * pv_entry, - int this_pe) + uint this_pe) { lvm_physical_extent_t * pe_map = pv_entry->pe_map; int rc = TRUE; @@ -664,7 +664,7 @@ int consecutive_run = FALSE; int printed_dots = FALSE; int info_line = 1; - int j, i = 0; + uint j, i = 0; LOG_ENTRY(); Index: lvm_pv.h =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_pv.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- lvm_pv.h 18 Aug 2004 15:47:08 -0000 1.11 +++ lvm_pv.h 16 Jan 2009 15:58:28 -0000 1.12 @@ -3,21 +3,21 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Module: LVM Region Manager * File: evms2/engine/plugins/lvm/lvm_pv.h - */ + */ /* Functions exported from lvm_pv.c */ extern u_int64_t lvm_get_pe_start(lvm_physical_volume_t * pv_entry); @@ -35,7 +35,7 @@ extern int lvm_update_pv_for_group(lvm_physical_volume_t * pv_entry, lvm_volume_group_t * group); extern void lvm_update_pv_for_no_group(lvm_physical_volume_t * pv_entry); -extern int lvm_get_available_stripes(lvm_volume_group_t * group); +extern uint lvm_get_available_stripes(lvm_volume_group_t * group); extern lvm_physical_volume_t * lvm_get_selected_segment(list_anchor_t list); extern inline int lvm_pv_has_available_extents(lvm_physical_volume_t * pv_entry); extern inline int lvm_pv_num_available_extents(lvm_physical_volume_t * pv_entry); Index: lvm_move.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_move.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- lvm_move.c 13 Jan 2005 18:27:02 -0000 1.49 +++ lvm_move.c 16 Jan 2009 15:58:28 -0000 1.50 @@ -356,7 +356,8 @@ int lvm_commit_move_extents(lvm_volume_group_t * group) { lvm_logical_volume_t * volume; - int i, j, rc = 0; + uint i, j; + int rc = 0; LOG_ENTRY(); @@ -572,7 +573,7 @@ u_int32_t * le, u_int32_t * pe) { - int i; + uint i; LOG_ENTRY(); @@ -706,7 +707,8 @@ list_element_t itr, itr2; u_int32_t free_extents_striped[MAX_PV+1] = {0}; u_int32_t extents_per_pv; - int i, j, rc; + uint i, j; + int rc; LOG_ENTRY(); @@ -822,7 +824,8 @@ storage_object_t * region; lvm_logical_volume_t * volume; list_element_t itr; - int rc, i, j = 0; + int rc; + uint i, j = 0; LOG_ENTRY(); @@ -1079,7 +1082,7 @@ * initializing the option-descriptor. **/ int lvm_move_pv_set_objects(task_context_t * context, - list_anchor_t declined_objects, + list_anchor_t UNUSED(declined_objects), task_effect_t * effect) { option_desc_array_t * od = context->option_descriptors; @@ -1147,7 +1150,8 @@ value_list_t * pv_list; char * maintain_stripes_string; int maintain_stripes; - int i, rc; + uint i; + int rc; LOG_ENTRY(); @@ -1226,7 +1230,8 @@ lvm_volume_group_t * group, int * maintain_stripes) { - int i, rc = 0; + uint i; + int rc = 0; LOG_ENTRY(); @@ -1347,7 +1352,7 @@ lvm_physical_volume_t * pv_entry; list_element_t itr, itr2; int extents_per_pv; - int i, j = 0, k = 0; + uint i, j = 0, k = 0; int rc; LOG_ENTRY(); @@ -1534,7 +1539,8 @@ storage_object_t * region; lvm_logical_volume_t * volume; list_element_t itr; - int i, j = 0, k = 0, rc; + uint i, j = 0, k = 0; + int rc; LOG_ENTRY(); Index: lvm_volumes.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_volumes.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- lvm_volumes.c 20 Aug 2008 23:51:13 -0000 1.57 +++ lvm_volumes.c 16 Jan 2009 15:58:28 -0000 1.58 @@ -169,7 +169,7 @@ out2: lvm_deallocate_logical_volume(new_volume); new_volume = NULL; - + out: LOG_EXIT_PTR(new_volume); return new_volume; @@ -409,7 +409,7 @@ lvm_physical_extent_t * pe_map; u_int32_t lv_number, le_number; u_int32_t freespace_current_le = 0; - int i, j; + uint i, j; LOG_ENTRY(); @@ -482,7 +482,7 @@ boolean final_call) { lvm_logical_volume_t * volume; - int i, j, count; + uint i, j, count; LOG_ENTRY(); LOG_DETAILS("Verifying LE maps for container %s.\n", @@ -1169,7 +1169,7 @@ u_int32_t desired_extents, lvm_physical_volume_t * pv_entries[]) { - int available_extents = 0; + uint available_extents = 0; int rc = 0; int i = 0; @@ -1362,7 +1362,8 @@ lvm_volume_group_t * group = volume->group; lvm_physical_volume_t * pv_entry; u_int32_t current_le = 0; - int used_this_pv, i, j, rc = 0; + uint used_this_pv, i, j; + int rc = 0; LOG_ENTRY(); @@ -1422,7 +1423,8 @@ lvm_physical_volume_t * pv_entry; u_int32_t current_le = volume->lv->lv_allocated_le; u_int32_t le_total = current_le + expand_extents; - int used_this_pv, i, j, rc = 0; + uint used_this_pv, i, j; + int rc = 0; LOG_ENTRY(); @@ -1493,7 +1495,8 @@ u_int32_t extents_per_stripe = extents / stripes; u_int32_t stripes_found = 0; u_int32_t current_le = 0; - int i, j, k, rc = 0; + uint i, j, k; + int rc = 0; LOG_ENTRY(); @@ -1555,7 +1558,8 @@ lvm_physical_volume_t * pv_entry; u_int32_t extents_per_stripe = add_extents / volume->lv->lv_stripes; u_int32_t le, new_le; - int i, j, rc = 0; + u_int32_t i, j; + int rc = 0; LOG_ENTRY(); @@ -1661,7 +1665,7 @@ { lvm_physical_volume_t * pv_entry; u_int32_t pe_number; - int i; + uint32_t i; LOG_ENTRY(); @@ -1721,7 +1725,7 @@ **/ void lvm_discard_extents_from_volume(lvm_logical_volume_t * volume) { - int i; + uint32_t i; LOG_ENTRY(); @@ -1750,7 +1754,7 @@ u_int32_t current_extents_per_stripe; u_int32_t new_extents_per_stripe; u_int32_t le, new_le, i; - + LOG_ENTRY(); current_extents_per_stripe = volume->lv->lv_allocated_le / volume->lv->lv_stripes; @@ -1876,7 +1880,8 @@ unsigned long num_le = stripes; dm_target_type type = (stripes==1) ? DM_TARGET_LINEAR : DM_TARGET_STRIPE; - int i, j, k, rc = 0; + unsigned long i, j, k; + int rc = 0; LOG_ENTRY(); @@ -1937,7 +1942,7 @@ **/ inline int lvm_le_is_valid(lvm_logical_volume_t * volume, u_int32_t le) { - return (le >= 0 && le < volume->lv->lv_allocated_le); + return (le < volume->lv->lv_allocated_le); } /** Index: lvm_pv.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_pv.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- lvm_pv.c 22 Feb 2006 20:21:25 -0000 1.22 +++ lvm_pv.c 16 Jan 2009 15:58:28 -0000 1.23 @@ -505,7 +505,7 @@ lvm_check_pe_size(pe_size); rc = ENOSPC; } - + LOG_EXIT_INT(rc); return rc; } @@ -656,9 +656,9 @@ * Return the number of PVs in this group that still have extents which * can be allocated to new LVs. **/ -int lvm_get_available_stripes(lvm_volume_group_t * group) +uint lvm_get_available_stripes(lvm_volume_group_t * group) { - int pvs = 0; + uint pvs = 0; int i; LOG_ENTRY(); @@ -730,7 +730,7 @@ **/ inline int lvm_pe_is_valid(lvm_physical_volume_t * pv_entry, u_int32_t pe) { - return (pe >= 0 && pe < pv_entry->pv->pe_total); + return (pe < pv_entry->pv->pe_total); } /** Index: lvm_io.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_io.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- lvm_io.c 13 Jan 2005 18:27:01 -0000 1.16 +++ lvm_io.c 16 Jan 2009 15:58:28 -0000 1.17 @@ -3,16 +3,16 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Module: LVM Region Manager @@ -22,7 +22,7 @@ * the LVM region manager plugin. This file should be the only * location of calls to READ and WRITE (except the lvm_read and * lvm_write API calls). - */ + */ #include <stdlib.h> #include <stdio.h> @@ -95,7 +95,7 @@ rc = ENOMEM; goto out; } - + /* Read the first sector. */ rc = READ(segment, bytes_to_sectors(LVM_PV_DISK_BASE), bytes_to_sectors(LVM_PV_DISK_SIZE), pv_buffer); @@ -349,7 +349,7 @@ LOG_SERIOUS("Error writing VG metadata to object %s\n", segment->name); } - + EngFncs->engine_free(vg_buffer); out: @@ -375,7 +375,8 @@ lvm_volume_group_t * group) { char * uuid_buffer = NULL; - int uuid_sectors, i, rc = 0; + uint uuid_sectors, i; + int rc = 0; LOG_ENTRY(); @@ -450,7 +451,8 @@ storage_object_t * segment = pv_entry->segment; pv_disk_t * pv = pv_entry->pv; char * uuid_buffer; - int uuid_sectors, i, rc; + uint uuid_sectors, i; + int rc; LOG_ENTRY(); @@ -644,7 +646,7 @@ static inline void lvm_endian_convert_pe_map(pe_disk_t * pe_map, u_int32_t pe_total) { - int i; + uint i; LOG_ENTRY(); for (i = 0; i < pe_total; i++) { pe_map[i].lv_num = DISK_TO_CPU16(pe_map[i].lv_num); |