1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Use __attribute__ consistently throughout.

This commit is contained in:
Alasdair Kergon 2010-07-09 15:34:40 +00:00
parent 3e404aea3a
commit 08f1ddea6c
89 changed files with 443 additions and 442 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.71 - Version 2.02.71 -
=============================== ===============================
Use __attribute__ consistently throughout.
Fix redundant declarations and always compile with -Wredundant-decls. Fix redundant declarations and always compile with -Wredundant-decls.
Fix possible hang when all mirror images of a mirrored log fail. Fix possible hang when all mirror images of a mirrored log fail.
Do not log backtrace in valid _lv_resume() code path. Do not log backtrace in valid _lv_resume() code path.

View File

@ -32,7 +32,7 @@ static void daemonize(void);
static void init_all(void); static void init_all(void);
static void cleanup_all(void); static void cleanup_all(void);
int main(int argc __attribute((unused)), char *argv[] __attribute((unused))) int main(int argc __attribute__((unused)), char *argv[] __attribute__((unused)))
{ {
daemonize(); daemonize();
@ -60,7 +60,7 @@ int main(int argc __attribute((unused)), char *argv[] __attribute((unused)))
* @sig: the signal * @sig: the signal
* *
*/ */
static void parent_exit_handler(int sig __attribute((unused))) static void parent_exit_handler(int sig __attribute__((unused)))
{ {
exit_now = 1; exit_now = 1;
} }

View File

@ -215,7 +215,7 @@ static struct clog_request *get_matching_rq(struct clog_request *rq,
} }
static char rq_buffer[DM_ULOG_REQUEST_SIZE]; static char rq_buffer[DM_ULOG_REQUEST_SIZE];
static int handle_cluster_request(struct clog_cpg *entry __attribute((unused)), static int handle_cluster_request(struct clog_cpg *entry __attribute__((unused)),
struct clog_request *rq, int server) struct clog_request *rq, int server)
{ {
int r = 0; int r = 0;
@ -855,7 +855,7 @@ static int resend_requests(struct clog_cpg *entry)
return r; return r;
} }
static int do_cluster_work(void *data __attribute((unused))) static int do_cluster_work(void *data __attribute__((unused)))
{ {
int r = SA_AIS_OK; int r = SA_AIS_OK;
struct clog_cpg *entry, *tmp; struct clog_cpg *entry, *tmp;
@ -927,8 +927,8 @@ static int flush_startup_list(struct clog_cpg *entry)
return 0; return 0;
} }
static void cpg_message_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute((unused)), static void cpg_message_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute__((unused)),
uint32_t nodeid, uint32_t pid __attribute((unused)), uint32_t nodeid, uint32_t pid __attribute__((unused)),
void *msg, size_t msg_len) void *msg, size_t msg_len)
{ {
int i; int i;
@ -1366,7 +1366,7 @@ static void cpg_leave_callback(struct clog_cpg *match,
} }
} }
static void cpg_config_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute((unused)), static void cpg_config_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute__((unused)),
const struct cpg_address *member_list, const struct cpg_address *member_list,
size_t member_list_entries, size_t member_list_entries,
const struct cpg_address *left_list, const struct cpg_address *left_list,

View File

@ -21,7 +21,7 @@
*/ */
#define COMPAT_OFFSET 256 #define COMPAT_OFFSET 256
static void v5_data_endian_switch(struct clog_request *rq, int to_network __attribute((unused))) static void v5_data_endian_switch(struct clog_request *rq, int to_network __attribute__((unused)))
{ {
int i, end; int i, end;
int64_t *pi64; int64_t *pi64;

View File

@ -290,7 +290,7 @@ static int write_log(struct log_c *lc)
} }
/* FIXME Rewrite this function taking advantage of the udev changes (where in use) to improve its efficiency! */ /* FIXME Rewrite this function taking advantage of the udev changes (where in use) to improve its efficiency! */
static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_path __attribute((unused))) static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_path __attribute__((unused)))
{ {
int r; int r;
DIR *dp; DIR *dp;
@ -1369,7 +1369,7 @@ static int clog_get_sync_count(struct dm_ulog_request *rq, uint32_t originator)
return 0; return 0;
} }
static int core_status_info(struct log_c *lc __attribute((unused)), struct dm_ulog_request *rq) static int core_status_info(struct log_c *lc __attribute__((unused)), struct dm_ulog_request *rq)
{ {
int r; int r;
char *data = (char *)rq->data; char *data = (char *)rq->data;

View File

@ -214,7 +214,7 @@ static int kernel_send_helper(void *data, uint16_t out_size)
* *
* Returns: 0 on success, -EXXX on failure * Returns: 0 on success, -EXXX on failure
*/ */
static int do_local_work(void *data __attribute((unused))) static int do_local_work(void *data __attribute__((unused)))
{ {
int r; int r;
struct clog_request *rq; struct clog_request *rq;

View File

@ -476,14 +476,14 @@ static void _exit_dm_lib(void)
dm_lib_exit(); dm_lib_exit();
} }
static void _exit_timeout(void *unused __attribute((unused))) static void _exit_timeout(void *unused __attribute__((unused)))
{ {
_timeout_running = 0; _timeout_running = 0;
pthread_mutex_unlock(&_timeout_mutex); pthread_mutex_unlock(&_timeout_mutex);
} }
/* Wake up monitor threads every so often. */ /* Wake up monitor threads every so often. */
static void *_timeout_thread(void *unused __attribute((unused))) static void *_timeout_thread(void *unused __attribute__((unused)))
{ {
struct timespec timeout; struct timespec timeout;
time_t curr_time; time_t curr_time;
@ -1492,7 +1492,7 @@ static void _cleanup_unused_threads(void)
_unlock_mutex(); _unlock_mutex();
} }
static void _sig_alarm(int signum __attribute((unused))) static void _sig_alarm(int signum __attribute__((unused)))
{ {
pthread_testcancel(); pthread_testcancel();
} }
@ -1524,7 +1524,7 @@ static void _init_thread_signals(void)
* Set the global variable which the process should * Set the global variable which the process should
* be watching to determine when to exit. * be watching to determine when to exit.
*/ */
static void _exit_handler(int sig __attribute((unused))) static void _exit_handler(int sig __attribute__((unused)))
{ {
/* /*
* We exit when '_exit_now' is set. * We exit when '_exit_now' is set.

View File

@ -49,9 +49,9 @@ static pthread_mutex_t _event_mutex = PTHREAD_MUTEX_INITIALIZER;
* configurable and we don't have that option yet * configurable and we don't have that option yet
*/ */
static void _temporary_log_fn(int level, static void _temporary_log_fn(int level,
const char *file __attribute((unused)), const char *file __attribute__((unused)),
int line __attribute((unused)), int line __attribute__((unused)),
int dm_errno __attribute((unused)), int dm_errno __attribute__((unused)),
const char *message) const char *message)
{ {
level &= ~(_LOG_STDERR | _LOG_ONCE); level &= ~(_LOG_STDERR | _LOG_ONCE);

View File

@ -167,8 +167,8 @@ static int _remove_failed_devices(const char *device)
} }
void process_event(struct dm_task *dmt, void process_event(struct dm_task *dmt,
enum dm_event_mask event __attribute((unused)), enum dm_event_mask event __attribute__((unused)),
void **unused __attribute((unused))) void **unused __attribute__((unused)))
{ {
void *next = NULL; void *next = NULL;
uint64_t start, length; uint64_t start, length;
@ -224,10 +224,10 @@ void process_event(struct dm_task *dmt,
} }
int register_device(const char *device, int register_device(const char *device,
const char *uuid __attribute((unused)), const char *uuid __attribute__((unused)),
int major __attribute((unused)), int major __attribute__((unused)),
int minor __attribute((unused)), int minor __attribute__((unused)),
void **unused __attribute((unused))) void **unused __attribute__((unused)))
{ {
int r = dmeventd_lvm2_init(); int r = dmeventd_lvm2_init();
syslog(LOG_INFO, "Monitoring mirror device %s for events.", device); syslog(LOG_INFO, "Monitoring mirror device %s for events.", device);
@ -235,10 +235,10 @@ int register_device(const char *device,
} }
int unregister_device(const char *device, int unregister_device(const char *device,
const char *uuid __attribute((unused)), const char *uuid __attribute__((unused)),
int major __attribute((unused)), int major __attribute__((unused)),
int minor __attribute((unused)), int minor __attribute__((unused)),
void **unused __attribute((unused))) void **unused __attribute__((unused)))
{ {
syslog(LOG_INFO, "No longer monitoring mirror device %s for events.", syslog(LOG_INFO, "No longer monitoring mirror device %s for events.",
device); device);

View File

@ -70,7 +70,7 @@ static void _parse_snapshot_params(char *params, struct snap_status *status)
} }
void process_event(struct dm_task *dmt, void process_event(struct dm_task *dmt,
enum dm_event_mask event __attribute((unused)), enum dm_event_mask event __attribute__((unused)),
void **private) void **private)
{ {
void *next = NULL; void *next = NULL;
@ -113,9 +113,9 @@ out:
} }
int register_device(const char *device, int register_device(const char *device,
const char *uuid __attribute((unused)), const char *uuid __attribute__((unused)),
int major __attribute((unused)), int major __attribute__((unused)),
int minor __attribute((unused)), int minor __attribute__((unused)),
void **private) void **private)
{ {
int *percent_warning = (int*)private; int *percent_warning = (int*)private;
@ -128,10 +128,10 @@ int register_device(const char *device,
} }
int unregister_device(const char *device, int unregister_device(const char *device,
const char *uuid __attribute((unused)), const char *uuid __attribute__((unused)),
int major __attribute((unused)), int major __attribute__((unused)),
int minor __attribute((unused)), int minor __attribute__((unused)),
void **unused __attribute((unused))) void **unused __attribute__((unused)))
{ {
syslog(LOG_INFO, "No longer monitoring snapshot %s\n", syslog(LOG_INFO, "No longer monitoring snapshot %s\n",
device); device);

View File

@ -1752,7 +1752,7 @@ int dev_manager_device_uses_vg(struct device *dev,
{ {
struct dm_tree *dtree; struct dm_tree *dtree;
struct dm_tree_node *root; struct dm_tree_node *root;
char dlid[sizeof(UUID_PREFIX) + sizeof(struct id) - 1] __attribute((aligned(8))); char dlid[sizeof(UUID_PREFIX) + sizeof(struct id) - 1] __attribute__((aligned(8)));
int r = 1; int r = 1;
if (!(dtree = dm_tree_create())) { if (!(dtree = dm_tree_create())) {

18
lib/cache/lvmcache.c vendored
View File

@ -90,7 +90,7 @@ static void _free_cached_vgmetadata(struct lvmcache_vginfo *vginfo)
*/ */
static void _store_metadata(struct volume_group *vg, unsigned precommitted) static void _store_metadata(struct volume_group *vg, unsigned precommitted)
{ {
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
struct lvmcache_vginfo *vginfo; struct lvmcache_vginfo *vginfo;
int size; int size;
@ -275,7 +275,7 @@ int lvmcache_verify_lock_order(const char *vgname)
return 1; return 1;
} }
void lvmcache_lock_vgname(const char *vgname, int read_only __attribute((unused))) void lvmcache_lock_vgname(const char *vgname, int read_only __attribute__((unused)))
{ {
if (!_lock_hash && !lvmcache_init()) { if (!_lock_hash && !lvmcache_init()) {
log_error("Internal cache initialisation failed"); log_error("Internal cache initialisation failed");
@ -374,7 +374,7 @@ const struct format_type *fmt_from_vgname(const char *vgname, const char *vgid)
struct dm_list *devh, *tmp; struct dm_list *devh, *tmp;
struct dm_list devs; struct dm_list devs;
struct device_list *devl; struct device_list *devl;
char vgid_found[ID_LEN + 1] __attribute((aligned(8))); char vgid_found[ID_LEN + 1] __attribute__((aligned(8)));
if (!(vginfo = vginfo_from_vgname(vgname, vgid))) if (!(vginfo = vginfo_from_vgname(vgname, vgid)))
return NULL; return NULL;
@ -411,7 +411,7 @@ const struct format_type *fmt_from_vgname(const char *vgname, const char *vgid)
struct lvmcache_vginfo *vginfo_from_vgid(const char *vgid) struct lvmcache_vginfo *vginfo_from_vgid(const char *vgid)
{ {
struct lvmcache_vginfo *vginfo; struct lvmcache_vginfo *vginfo;
char id[ID_LEN + 1] __attribute((aligned(8))); char id[ID_LEN + 1] __attribute__((aligned(8)));
if (!_vgid_hash || !vgid) if (!_vgid_hash || !vgid)
return NULL; return NULL;
@ -492,7 +492,7 @@ static int _vginfo_is_invalid(struct lvmcache_vginfo *vginfo)
struct lvmcache_info *info_from_pvid(const char *pvid, int valid_only) struct lvmcache_info *info_from_pvid(const char *pvid, int valid_only)
{ {
struct lvmcache_info *info; struct lvmcache_info *info;
char id[ID_LEN + 1] __attribute((aligned(8))); char id[ID_LEN + 1] __attribute__((aligned(8)));
if (!_pvid_hash || !pvid) if (!_pvid_hash || !pvid)
return NULL; return NULL;
@ -930,8 +930,8 @@ static int _insert_vginfo(struct lvmcache_vginfo *new_vginfo, const char *vgid,
struct lvmcache_vginfo *primary_vginfo) struct lvmcache_vginfo *primary_vginfo)
{ {
struct lvmcache_vginfo *last_vginfo = primary_vginfo; struct lvmcache_vginfo *last_vginfo = primary_vginfo;
char uuid_primary[64] __attribute((aligned(8))); char uuid_primary[64] __attribute__((aligned(8)));
char uuid_new[64] __attribute((aligned(8))); char uuid_new[64] __attribute__((aligned(8)));
int use_new = 0; int use_new = 0;
/* Pre-existing VG takes precedence. Unexported VG takes precedence. */ /* Pre-existing VG takes precedence. Unexported VG takes precedence. */
@ -1219,7 +1219,7 @@ int lvmcache_update_vg(struct volume_group *vg, unsigned precommitted)
{ {
struct pv_list *pvl; struct pv_list *pvl;
struct lvmcache_info *info; struct lvmcache_info *info;
char pvid_s[ID_LEN + 1] __attribute((aligned(8))); char pvid_s[ID_LEN + 1] __attribute__((aligned(8)));
pvid_s[sizeof(pvid_s) - 1] = '\0'; pvid_s[sizeof(pvid_s) - 1] = '\0';
@ -1247,7 +1247,7 @@ struct lvmcache_info *lvmcache_add(struct labeller *labeller, const char *pvid,
{ {
struct label *label; struct label *label;
struct lvmcache_info *existing, *info; struct lvmcache_info *existing, *info;
char pvid_s[ID_LEN + 1] __attribute((aligned(8))); char pvid_s[ID_LEN + 1] __attribute__((aligned(8)));
if (!_vgname_hash && !lvmcache_init()) { if (!_vgname_hash && !lvmcache_init()) {
log_error("Internal cache initialisation failed"); log_error("Internal cache initialisation failed");

View File

@ -159,7 +159,7 @@ static int _parse_config_file(struct parser *p, struct config_tree *cft)
return 1; return 1;
} }
struct config_tree *create_config_tree_from_string(struct cmd_context *cmd __attribute((unused)), struct config_tree *create_config_tree_from_string(struct cmd_context *cmd __attribute__((unused)),
const char *config_settings) const char *config_settings)
{ {
struct cs *c; struct cs *c;

View File

@ -678,7 +678,7 @@ int dev_write(struct device *dev, uint64_t offset, size_t len, void *buffer)
int dev_set(struct device *dev, uint64_t offset, size_t len, int value) int dev_set(struct device *dev, uint64_t offset, size_t len, int value)
{ {
size_t s; size_t s;
char buffer[4096] __attribute((aligned(8))); char buffer[4096] __attribute__((aligned(8)));
if (!dev_open(dev)) if (!dev_open(dev))
return_0; return_0;

View File

@ -320,14 +320,14 @@ unsigned long dev_md_stripe_width(const char *sysfs_dir, struct device *dev)
#else #else
int dev_is_md(struct device *dev __attribute((unused)), int dev_is_md(struct device *dev __attribute__((unused)),
uint64_t *sb __attribute((unused))) uint64_t *sb __attribute__((unused)))
{ {
return 0; return 0;
} }
unsigned long dev_md_stripe_width(const char *sysfs_dir __attribute((unused)), unsigned long dev_md_stripe_width(const char *sysfs_dir __attribute__((unused)),
struct device *dev __attribute((unused))) struct device *dev __attribute__((unused)))
{ {
return 0UL; return 0UL;
} }

View File

@ -307,7 +307,7 @@ const char *display_size(const struct cmd_context *cmd, uint64_t size)
void pvdisplay_colons(const struct physical_volume *pv) void pvdisplay_colons(const struct physical_volume *pv)
{ {
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
if (!pv) if (!pv)
return; return;
@ -358,9 +358,9 @@ void pvdisplay_segments(const struct physical_volume *pv)
/* FIXME Include label fields */ /* FIXME Include label fields */
void pvdisplay_full(const struct cmd_context *cmd, void pvdisplay_full(const struct cmd_context *cmd,
const struct physical_volume *pv, const struct physical_volume *pv,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
const char *size; const char *size;
uint32_t pe_free; uint32_t pe_free;
@ -423,12 +423,12 @@ void pvdisplay_full(const struct cmd_context *cmd,
log_print(" "); log_print(" ");
} }
int pvdisplay_short(const struct cmd_context *cmd __attribute((unused)), int pvdisplay_short(const struct cmd_context *cmd __attribute__((unused)),
const struct volume_group *vg __attribute((unused)), const struct volume_group *vg __attribute__((unused)),
const struct physical_volume *pv, const struct physical_volume *pv,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
if (!pv) if (!pv)
return 0; return 0;
@ -469,11 +469,11 @@ void lvdisplay_colons(const struct logical_volume *lv)
int lvdisplay_full(struct cmd_context *cmd, int lvdisplay_full(struct cmd_context *cmd,
const struct logical_volume *lv, const struct logical_volume *lv,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
struct lvinfo info; struct lvinfo info;
int inkernel, snap_active = 0; int inkernel, snap_active = 0;
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
struct lv_segment *snap_seg = NULL, *mirror_seg = NULL; struct lv_segment *snap_seg = NULL, *mirror_seg = NULL;
float snap_percent; /* fused, fsize; */ float snap_percent; /* fused, fsize; */
percent_range_t percent_range; percent_range_t percent_range;
@ -646,7 +646,7 @@ int lvdisplay_segments(const struct logical_volume *lv)
return 1; return 1;
} }
void vgdisplay_extents(const struct volume_group *vg __attribute((unused))) void vgdisplay_extents(const struct volume_group *vg __attribute__((unused)))
{ {
} }
@ -654,7 +654,7 @@ void vgdisplay_full(const struct volume_group *vg)
{ {
uint32_t access_str; uint32_t access_str;
uint32_t active_pvs; uint32_t active_pvs;
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
active_pvs = vg->pv_count - vg_missing_pv_count(vg); active_pvs = vg->pv_count - vg_missing_pv_count(vg);
@ -728,7 +728,7 @@ void vgdisplay_colons(const struct volume_group *vg)
{ {
uint32_t active_pvs; uint32_t active_pvs;
const char *access_str; const char *access_str;
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
active_pvs = vg->pv_count - vg_missing_pv_count(vg); active_pvs = vg->pv_count - vg_missing_pv_count(vg);

View File

@ -40,20 +40,20 @@ static int _errseg_merge_segments(struct lv_segment *seg1, struct lv_segment *se
} }
#ifdef DEVMAPPER_SUPPORT #ifdef DEVMAPPER_SUPPORT
static int _errseg_add_target_line(struct dev_manager *dm __attribute((unused)), static int _errseg_add_target_line(struct dev_manager *dm __attribute__((unused)),
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct cmd_context *cmd __attribute((unused)), struct cmd_context *cmd __attribute__((unused)),
void **target_state __attribute((unused)), void **target_state __attribute__((unused)),
struct lv_segment *seg __attribute((unused)), struct lv_segment *seg __attribute__((unused)),
struct dm_tree_node *node, uint64_t len, struct dm_tree_node *node, uint64_t len,
uint32_t *pvmove_mirror_count __attribute((unused))) uint32_t *pvmove_mirror_count __attribute__((unused)))
{ {
return dm_tree_node_add_error_target(node, len); return dm_tree_node_add_error_target(node, len);
} }
static int _errseg_target_present(struct cmd_context *cmd, static int _errseg_target_present(struct cmd_context *cmd,
const struct lv_segment *seg __attribute((unused)), const struct lv_segment *seg __attribute__((unused)),
unsigned *attributes __attribute((unused))) unsigned *attributes __attribute__((unused)))
{ {
static int _errseg_checked = 0; static int _errseg_checked = 0;
static int _errseg_present = 0; static int _errseg_present = 0;
@ -70,7 +70,7 @@ static int _errseg_target_present(struct cmd_context *cmd,
#endif #endif
static int _errseg_modules_needed(struct dm_pool *mem, static int _errseg_modules_needed(struct dm_pool *mem,
const struct lv_segment *seg __attribute((unused)), const struct lv_segment *seg __attribute__((unused)),
struct dm_list *modules) struct dm_list *modules)
{ {
if (!str_list_add(mem, modules, "error")) { if (!str_list_add(mem, modules, "error")) {

View File

@ -19,7 +19,7 @@
#ifdef linux #ifdef linux
static int _ignore_md(struct dev_filter *f __attribute((unused)), static int _ignore_md(struct dev_filter *f __attribute__((unused)),
struct device *dev) struct device *dev)
{ {
int ret; int ret;

View File

@ -326,7 +326,7 @@ struct dev_filter *sysfs_filter_create(const char *sysfs_dir)
#else #else
struct dev_filter *sysfs_filter_create(const char *sysfs_dir __attribute((unused))) struct dev_filter *sysfs_filter_create(const char *sysfs_dir __attribute__((unused)))
{ {
return NULL; return NULL;
} }

View File

@ -121,7 +121,7 @@ static const device_info_t device_info[] = {
{NULL, 0} {NULL, 0}
}; };
static int _passes_lvm_type_device_filter(struct dev_filter *f __attribute((unused)), static int _passes_lvm_type_device_filter(struct dev_filter *f __attribute__((unused)),
struct device *dev) struct device *dev)
{ {
const char *name = dev_name(dev); const char *name = dev_name(dev);

View File

@ -247,7 +247,7 @@ static int _read_uuids(struct disk_list *data)
{ {
unsigned num_read = 0; unsigned num_read = 0;
struct uuid_list *ul; struct uuid_list *ul;
char buffer[NAME_LEN] __attribute((aligned(8))); char buffer[NAME_LEN] __attribute__((aligned(8)));
uint64_t pos = data->pvd.pv_uuidlist_on_disk.base; uint64_t pos = data->pvd.pv_uuidlist_on_disk.base;
uint64_t end = pos + data->pvd.pv_uuidlist_on_disk.size; uint64_t end = pos + data->pvd.pv_uuidlist_on_disk.size;
@ -650,7 +650,7 @@ static int _write_pvd(struct disk_list *data)
/* /*
* assumes the device has been opened. * assumes the device has been opened.
*/ */
static int __write_all_pvd(const struct format_type *fmt __attribute((unused)), static int __write_all_pvd(const struct format_type *fmt __attribute__((unused)),
struct disk_list *data) struct disk_list *data)
{ {
const char *pv_name = dev_name(data->dev); const char *pv_name = dev_name(data->dev);

View File

@ -148,7 +148,7 @@ struct pe_disk {
struct uuid_list { struct uuid_list {
struct dm_list list; struct dm_list list;
char uuid[NAME_LEN] __attribute((aligned(8))); char uuid[NAME_LEN] __attribute__((aligned(8)));
}; };
struct lvd_list { struct lvd_list {
@ -161,11 +161,11 @@ struct disk_list {
struct dm_pool *mem; struct dm_pool *mem;
struct device *dev; struct device *dev;
struct pv_disk pvd __attribute((aligned(8))); struct pv_disk pvd __attribute__((aligned(8)));
struct vg_disk vgd __attribute((aligned(8))); struct vg_disk vgd __attribute__((aligned(8)));
struct dm_list uuids __attribute((aligned(8))); struct dm_list uuids __attribute__((aligned(8)));
struct dm_list lvds __attribute((aligned(8))); struct dm_list lvds __attribute__((aligned(8)));
struct pe_disk *extents __attribute((aligned(8))); struct pe_disk *extents __attribute__((aligned(8)));
}; };
/* /*

View File

@ -163,7 +163,7 @@ static struct volume_group *_build_vg(struct format_instance *fid,
static struct volume_group *_format1_vg_read(struct format_instance *fid, static struct volume_group *_format1_vg_read(struct format_instance *fid,
const char *vg_name, const char *vg_name,
struct metadata_area *mda __attribute((unused))) struct metadata_area *mda __attribute__((unused)))
{ {
struct dm_pool *mem = dm_pool_create("lvm1 vg_read", VG_MEMPOOL_CHUNK); struct dm_pool *mem = dm_pool_create("lvm1 vg_read", VG_MEMPOOL_CHUNK);
struct dm_list pvs; struct dm_list pvs;
@ -241,7 +241,7 @@ static int _flatten_vg(struct format_instance *fid, struct dm_pool *mem,
} }
static int _format1_vg_write(struct format_instance *fid, struct volume_group *vg, static int _format1_vg_write(struct format_instance *fid, struct volume_group *vg,
struct metadata_area *mda __attribute((unused))) struct metadata_area *mda __attribute__((unused)))
{ {
struct dm_pool *mem = dm_pool_create("lvm1 vg_write", VG_MEMPOOL_CHUNK); struct dm_pool *mem = dm_pool_create("lvm1 vg_write", VG_MEMPOOL_CHUNK);
struct dm_list pvds; struct dm_list pvds;
@ -262,8 +262,8 @@ static int _format1_vg_write(struct format_instance *fid, struct volume_group *v
} }
static int _format1_pv_read(const struct format_type *fmt, const char *pv_name, static int _format1_pv_read(const struct format_type *fmt, const char *pv_name,
struct physical_volume *pv, struct dm_list *mdas __attribute((unused)), struct physical_volume *pv, struct dm_list *mdas __attribute__((unused)),
int scan_label_only __attribute((unused))) int scan_label_only __attribute__((unused)))
{ {
struct dm_pool *mem = dm_pool_create("lvm1 pv_read", 1024); struct dm_pool *mem = dm_pool_create("lvm1 pv_read", 1024);
struct disk_list *dl; struct disk_list *dl;
@ -296,13 +296,13 @@ static int _format1_pv_read(const struct format_type *fmt, const char *pv_name,
static int _format1_pv_setup(const struct format_type *fmt, static int _format1_pv_setup(const struct format_type *fmt,
uint64_t pe_start, uint32_t extent_count, uint64_t pe_start, uint32_t extent_count,
uint32_t extent_size, uint32_t extent_size,
unsigned long data_alignment __attribute((unused)), unsigned long data_alignment __attribute__((unused)),
unsigned long data_alignment_offset __attribute((unused)), unsigned long data_alignment_offset __attribute__((unused)),
int pvmetadatacopies __attribute((unused)), int pvmetadatacopies __attribute__((unused)),
uint64_t pvmetadatasize __attribute((unused)), uint64_t pvmetadatasize __attribute__((unused)),
unsigned metadataignore __attribute((unused)), unsigned metadataignore __attribute__((unused)),
struct dm_list *mdas __attribute((unused)), struct dm_list *mdas __attribute__((unused)),
struct physical_volume *pv, struct volume_group *vg __attribute((unused))) struct physical_volume *pv, struct volume_group *vg __attribute__((unused)))
{ {
if (pv->size > MAX_PV_SIZE) if (pv->size > MAX_PV_SIZE)
pv->size--; pv->size--;
@ -354,7 +354,7 @@ static int _format1_lv_setup(struct format_instance *fid, struct logical_volume
} }
static int _format1_pv_write(const struct format_type *fmt, struct physical_volume *pv, static int _format1_pv_write(const struct format_type *fmt, struct physical_volume *pv,
struct dm_list *mdas __attribute((unused)), int64_t sector __attribute((unused))) struct dm_list *mdas __attribute__((unused)), int64_t sector __attribute__((unused)))
{ {
struct dm_pool *mem; struct dm_pool *mem;
struct disk_list *dl; struct disk_list *dl;
@ -439,7 +439,7 @@ static int _format1_vg_setup(struct format_instance *fid, struct volume_group *v
return 1; return 1;
} }
static int _format1_segtype_supported(struct format_instance *fid __attribute((unused)), static int _format1_segtype_supported(struct format_instance *fid __attribute__((unused)),
const struct segment_type *segtype) const struct segment_type *segtype)
{ {
if (!(segtype->flags & SEG_FORMAT1_SUPPORT)) if (!(segtype->flags & SEG_FORMAT1_SUPPORT))
@ -454,9 +454,9 @@ static struct metadata_area_ops _metadata_format1_ops = {
}; };
static struct format_instance *_format1_create_instance(const struct format_type *fmt, static struct format_instance *_format1_create_instance(const struct format_type *fmt,
const char *vgname __attribute((unused)), const char *vgname __attribute__((unused)),
const char *vgid __attribute((unused)), const char *vgid __attribute__((unused)),
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
struct format_instance *fid; struct format_instance *fid;
struct metadata_area *mda; struct metadata_area *mda;
@ -482,7 +482,7 @@ static struct format_instance *_format1_create_instance(const struct format_type
return fid; return fid;
} }
static void _format1_destroy_instance(struct format_instance *fid __attribute((unused))) static void _format1_destroy_instance(struct format_instance *fid __attribute__((unused)))
{ {
} }

View File

@ -137,7 +137,7 @@ static int _system_id(struct cmd_context *cmd, char *s, const char *prefix)
return 1; return 1;
} }
int export_pv(struct cmd_context *cmd, struct dm_pool *mem __attribute((unused)), int export_pv(struct cmd_context *cmd, struct dm_pool *mem __attribute__((unused)),
struct volume_group *vg, struct volume_group *vg,
struct pv_disk *pvd, struct physical_volume *pv) struct pv_disk *pvd, struct physical_volume *pv)
{ {
@ -552,7 +552,7 @@ int export_lvs(struct disk_list *dl, struct volume_group *vg,
/* /*
* FIXME: More inefficient code. * FIXME: More inefficient code.
*/ */
int import_snapshots(struct dm_pool *mem __attribute((unused)), struct volume_group *vg, int import_snapshots(struct dm_pool *mem __attribute__((unused)), struct volume_group *vg,
struct dm_list *pvds) struct dm_list *pvds)
{ {
struct logical_volume *lvs[MAX_LV]; struct logical_volume *lvs[MAX_LV];
@ -641,7 +641,7 @@ int export_uuids(struct disk_list *dl, struct volume_group *vg)
* This calculates the nasty pv_number field * This calculates the nasty pv_number field
* used by LVM1. * used by LVM1.
*/ */
void export_numbers(struct dm_list *pvds, struct volume_group *vg __attribute((unused))) void export_numbers(struct dm_list *pvds, struct volume_group *vg __attribute__((unused)))
{ {
struct disk_list *dl; struct disk_list *dl;
int pv_num = 1; int pv_num = 1;

View File

@ -30,7 +30,7 @@ static void _not_supported(const char *op)
op); op);
} }
static int _lvm1_can_handle(struct labeller *l __attribute((unused)), void *buf, uint64_t sector) static int _lvm1_can_handle(struct labeller *l __attribute__((unused)), void *buf, uint64_t sector)
{ {
struct pv_disk *pvd = (struct pv_disk *) buf; struct pv_disk *pvd = (struct pv_disk *) buf;
uint32_t version; uint32_t version;
@ -48,7 +48,7 @@ static int _lvm1_can_handle(struct labeller *l __attribute((unused)), void *buf,
return 0; return 0;
} }
static int _lvm1_write(struct label *label __attribute((unused)), void *buf __attribute((unused))) static int _lvm1_write(struct label *label __attribute__((unused)), void *buf __attribute__((unused)))
{ {
_not_supported("write"); _not_supported("write");
return 0; return 0;
@ -87,14 +87,14 @@ static int _lvm1_read(struct labeller *l, struct device *dev, void *buf,
return 1; return 1;
} }
static int _lvm1_initialise_label(struct labeller *l __attribute((unused)), struct label *label) static int _lvm1_initialise_label(struct labeller *l __attribute__((unused)), struct label *label)
{ {
strcpy(label->type, "LVM1"); strcpy(label->type, "LVM1");
return 1; return 1;
} }
static void _lvm1_destroy_label(struct labeller *l __attribute((unused)), struct label *label __attribute((unused))) static void _lvm1_destroy_label(struct labeller *l __attribute__((unused)), struct label *label __attribute__((unused)))
{ {
} }

View File

@ -34,10 +34,10 @@
#define CPOUT_64(x, y) {(y) = xlate64_be((x));} #define CPOUT_64(x, y) {(y) = xlate64_be((x));}
static int __read_pool_disk(const struct format_type *fmt, struct device *dev, static int __read_pool_disk(const struct format_type *fmt, struct device *dev,
struct dm_pool *mem __attribute((unused)), struct pool_list *pl, struct dm_pool *mem __attribute__((unused)), struct pool_list *pl,
const char *vg_name __attribute((unused))) const char *vg_name __attribute__((unused)))
{ {
char buf[512] __attribute((aligned(8))); char buf[512] __attribute__((aligned(8)));
/* FIXME: Need to check the cache here first */ /* FIXME: Need to check the cache here first */
if (!dev_read(dev, UINT64_C(0), 512, buf)) { if (!dev_read(dev, UINT64_C(0), 512, buf)) {
@ -58,7 +58,7 @@ static void _add_pl_to_list(struct dm_list *head, struct pool_list *data)
dm_list_iterate_items(pl, head) { dm_list_iterate_items(pl, head) {
if (id_equal(&data->pv_uuid, &pl->pv_uuid)) { if (id_equal(&data->pv_uuid, &pl->pv_uuid)) {
char uuid[ID_LEN + 7] __attribute((aligned(8))); char uuid[ID_LEN + 7] __attribute__((aligned(8)));
id_write_format(&pl->pv_uuid, uuid, ID_LEN + 7); id_write_format(&pl->pv_uuid, uuid, ID_LEN + 7);
@ -84,7 +84,7 @@ int read_pool_label(struct pool_list *pl, struct labeller *l,
struct lvmcache_info *info; struct lvmcache_info *info;
struct id pvid; struct id pvid;
struct id vgid; struct id vgid;
char uuid[ID_LEN + 7] __attribute((aligned(8))); char uuid[ID_LEN + 7] __attribute__((aligned(8)));
struct pool_disk *pd = &pl->pd; struct pool_disk *pd = &pl->pd;
pool_label_in(pd, buf); pool_label_in(pd, buf);

View File

@ -158,7 +158,7 @@ static struct volume_group *_build_vg_from_pds(struct format_instance
static struct volume_group *_pool_vg_read(struct format_instance *fid, static struct volume_group *_pool_vg_read(struct format_instance *fid,
const char *vg_name, const char *vg_name,
struct metadata_area *mda __attribute((unused))) struct metadata_area *mda __attribute__((unused)))
{ {
struct dm_pool *mem = dm_pool_create("pool vg_read", VG_MEMPOOL_CHUNK); struct dm_pool *mem = dm_pool_create("pool vg_read", VG_MEMPOOL_CHUNK);
struct dm_list pds; struct dm_list pds;
@ -188,26 +188,26 @@ out:
return NULL; return NULL;
} }
static int _pool_pv_setup(const struct format_type *fmt __attribute((unused)), static int _pool_pv_setup(const struct format_type *fmt __attribute__((unused)),
uint64_t pe_start __attribute((unused)), uint64_t pe_start __attribute__((unused)),
uint32_t extent_count __attribute((unused)), uint32_t extent_count __attribute__((unused)),
uint32_t extent_size __attribute((unused)), uint32_t extent_size __attribute__((unused)),
unsigned long data_alignment __attribute((unused)), unsigned long data_alignment __attribute__((unused)),
unsigned long data_alignment_offset __attribute((unused)), unsigned long data_alignment_offset __attribute__((unused)),
int pvmetadatacopies __attribute((unused)), int pvmetadatacopies __attribute__((unused)),
uint64_t pvmetadatasize __attribute((unused)), uint64_t pvmetadatasize __attribute__((unused)),
unsigned metadataignore __attribute((unused)), unsigned metadataignore __attribute__((unused)),
struct dm_list *mdas __attribute((unused)), struct dm_list *mdas __attribute__((unused)),
struct physical_volume *pv __attribute((unused)), struct physical_volume *pv __attribute__((unused)),
struct volume_group *vg __attribute((unused))) struct volume_group *vg __attribute__((unused)))
{ {
return 1; return 1;
} }
static int _pool_pv_read(const struct format_type *fmt, const char *pv_name, static int _pool_pv_read(const struct format_type *fmt, const char *pv_name,
struct physical_volume *pv, struct physical_volume *pv,
struct dm_list *mdas __attribute((unused)), struct dm_list *mdas __attribute__((unused)),
int scan_label_only __attribute((unused))) int scan_label_only __attribute__((unused)))
{ {
struct dm_pool *mem = dm_pool_create("pool pv_read", 1024); struct dm_pool *mem = dm_pool_create("pool pv_read", 1024);
struct pool_list *pl; struct pool_list *pl;
@ -249,9 +249,9 @@ static struct metadata_area_ops _metadata_format_pool_ops = {
/* *INDENT-ON* */ /* *INDENT-ON* */
static struct format_instance *_pool_create_instance(const struct format_type *fmt, static struct format_instance *_pool_create_instance(const struct format_type *fmt,
const char *vgname __attribute((unused)), const char *vgname __attribute__((unused)),
const char *vgid __attribute((unused)), const char *vgid __attribute__((unused)),
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
struct format_instance *fid; struct format_instance *fid;
struct metadata_area *mda; struct metadata_area *mda;
@ -282,7 +282,7 @@ static struct format_instance *_pool_create_instance(const struct format_type *f
return fid; return fid;
} }
static void _pool_destroy_instance(struct format_instance *fid __attribute((unused))) static void _pool_destroy_instance(struct format_instance *fid __attribute__((unused)))
{ {
} }

View File

@ -29,7 +29,7 @@ static void _pool_not_supported(const char *op)
op); op);
} }
static int _pool_can_handle(struct labeller *l __attribute((unused)), void *buf, uint64_t sector) static int _pool_can_handle(struct labeller *l __attribute__((unused)), void *buf, uint64_t sector)
{ {
struct pool_disk pd; struct pool_disk pd;
@ -50,7 +50,7 @@ static int _pool_can_handle(struct labeller *l __attribute((unused)), void *buf,
return 0; return 0;
} }
static int _pool_write(struct label *label __attribute((unused)), void *buf __attribute((unused))) static int _pool_write(struct label *label __attribute__((unused)), void *buf __attribute__((unused)))
{ {
_pool_not_supported("write"); _pool_not_supported("write");
return 0; return 0;
@ -64,14 +64,14 @@ static int _pool_read(struct labeller *l, struct device *dev, void *buf,
return read_pool_label(&pl, l, dev, buf, label); return read_pool_label(&pl, l, dev, buf, label);
} }
static int _pool_initialise_label(struct labeller *l __attribute((unused)), struct label *label) static int _pool_initialise_label(struct labeller *l __attribute__((unused)), struct label *label)
{ {
strcpy(label->type, "POOL"); strcpy(label->type, "POOL");
return 1; return 1;
} }
static void _pool_destroy_label(struct labeller *l __attribute((unused)), struct label *label __attribute((unused))) static void _pool_destroy_label(struct labeller *l __attribute__((unused)), struct label *label __attribute__((unused)))
{ {
} }

View File

@ -183,7 +183,7 @@ static int _out_with_comment_file(struct formatter *f, const char *comment,
} }
static int _out_with_comment_raw(struct formatter *f, static int _out_with_comment_raw(struct formatter *f,
const char *comment __attribute((unused)), const char *comment __attribute__((unused)),
const char *fmt, va_list ap) const char *fmt, va_list ap)
{ {
int n; int n;
@ -413,7 +413,7 @@ static const char *_get_pv_name_from_uuid(struct formatter *f, char *uuid)
static const char *_get_pv_name(struct formatter *f, struct physical_volume *pv) static const char *_get_pv_name(struct formatter *f, struct physical_volume *pv)
{ {
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
if (!pv || !id_write_format(&pv->id, uuid, sizeof(uuid))) if (!pv || !id_write_format(&pv->id, uuid, sizeof(uuid)))
return_NULL; return_NULL;

View File

@ -80,7 +80,7 @@ void rlocn_set_ignored(struct raw_locn *rlocn, unsigned mda_ignored)
* NOTE: Currently there can be only one vg per text file. * NOTE: Currently there can be only one vg per text file.
*/ */
static int _text_vg_setup(struct format_instance *fid __attribute((unused)), static int _text_vg_setup(struct format_instance *fid __attribute__((unused)),
struct volume_group *vg) struct volume_group *vg)
{ {
if (vg->extent_size & (vg->extent_size - 1)) { if (vg->extent_size & (vg->extent_size - 1)) {
@ -108,7 +108,7 @@ static uint64_t _mda_total_sectors_raw(struct metadata_area *mda)
/* /*
* Check if metadata area belongs to vg * Check if metadata area belongs to vg
*/ */
static int _mda_in_vg_raw(struct format_instance *fid __attribute((unused)), static int _mda_in_vg_raw(struct format_instance *fid __attribute__((unused)),
struct volume_group *vg, struct metadata_area *mda) struct volume_group *vg, struct metadata_area *mda)
{ {
struct mda_context *mdac = (struct mda_context *) mda->metadata_locn; struct mda_context *mdac = (struct mda_context *) mda->metadata_locn;
@ -279,7 +279,7 @@ static int _pv_analyze_mda_raw (const struct format_type * fmt,
static int _text_lv_setup(struct format_instance *fid __attribute((unused)), static int _text_lv_setup(struct format_instance *fid __attribute__((unused)),
struct logical_volume *lv) struct logical_volume *lv)
{ {
/******** FIXME Any LV size restriction? /******** FIXME Any LV size restriction?
@ -396,7 +396,7 @@ static struct raw_locn *_find_vg_rlocn(struct device_area *dev_area,
int *precommitted) int *precommitted)
{ {
size_t len; size_t len;
char vgnamebuf[NAME_LEN + 2] __attribute((aligned(8))); char vgnamebuf[NAME_LEN + 2] __attribute__((aligned(8)));
struct raw_locn *rlocn, *rlocn_precommitted; struct raw_locn *rlocn, *rlocn_precommitted;
struct lvmcache_info *info; struct lvmcache_info *info;
@ -892,7 +892,7 @@ static struct volume_group *_vg_read_precommit_file(struct format_instance *fid,
return vg; return vg;
} }
static int _vg_write_file(struct format_instance *fid __attribute((unused)), static int _vg_write_file(struct format_instance *fid __attribute__((unused)),
struct volume_group *vg, struct metadata_area *mda) struct volume_group *vg, struct metadata_area *mda)
{ {
struct text_context *tc = (struct text_context *) mda->metadata_locn; struct text_context *tc = (struct text_context *) mda->metadata_locn;
@ -958,7 +958,7 @@ static int _vg_write_file(struct format_instance *fid __attribute((unused)),
return 1; return 1;
} }
static int _vg_commit_file_backup(struct format_instance *fid __attribute((unused)), static int _vg_commit_file_backup(struct format_instance *fid __attribute__((unused)),
struct volume_group *vg, struct volume_group *vg,
struct metadata_area *mda) struct metadata_area *mda)
{ {
@ -1025,8 +1025,8 @@ static int _vg_commit_file(struct format_instance *fid, struct volume_group *vg,
return 1; return 1;
} }
static int _vg_remove_file(struct format_instance *fid __attribute((unused)), static int _vg_remove_file(struct format_instance *fid __attribute__((unused)),
struct volume_group *vg __attribute((unused)), struct volume_group *vg __attribute__((unused)),
struct metadata_area *mda) struct metadata_area *mda)
{ {
struct text_context *tc = (struct text_context *) mda->metadata_locn; struct text_context *tc = (struct text_context *) mda->metadata_locn;
@ -1105,8 +1105,8 @@ const char *vgname_from_mda(const struct format_type *fmt,
uint32_t wrap = 0; uint32_t wrap = 0;
const char *vgname = NULL; const char *vgname = NULL;
unsigned int len = 0; unsigned int len = 0;
char buf[NAME_LEN + 1] __attribute((aligned(8))); char buf[NAME_LEN + 1] __attribute__((aligned(8)));
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
uint64_t buffer_size, current_usage; uint64_t buffer_size, current_usage;
if (mda_free_sectors) if (mda_free_sectors)
@ -1251,7 +1251,7 @@ static int _mda_setup(const struct format_type *fmt,
int pvmetadatacopies, uint64_t pvmetadatasize, int pvmetadatacopies, uint64_t pvmetadatasize,
unsigned metadataignore, struct dm_list *mdas, unsigned metadataignore, struct dm_list *mdas,
struct physical_volume *pv, struct physical_volume *pv,
struct volume_group *vg __attribute((unused))) struct volume_group *vg __attribute__((unused)))
{ {
uint64_t mda_adjustment, disk_size, alignment, alignment_offset; uint64_t mda_adjustment, disk_size, alignment, alignment_offset;
uint64_t start1, mda_size1; /* First area - start of disk */ uint64_t start1, mda_size1; /* First area - start of disk */
@ -1407,7 +1407,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
struct lvmcache_info *info; struct lvmcache_info *info;
struct mda_context *mdac; struct mda_context *mdac;
struct metadata_area *mda; struct metadata_area *mda;
char buf[MDA_HEADER_SIZE] __attribute((aligned(8))); char buf[MDA_HEADER_SIZE] __attribute__((aligned(8)));
struct mda_header *mdah = (struct mda_header *) buf; struct mda_header *mdah = (struct mda_header *) buf;
uint64_t adjustment; uint64_t adjustment;
struct data_area_list *da; struct data_area_list *da;
@ -1689,7 +1689,7 @@ static int _text_pv_read(const struct format_type *fmt, const char *pv_name,
return 1; return 1;
} }
static void _text_destroy_instance(struct format_instance *fid __attribute((unused))) static void _text_destroy_instance(struct format_instance *fid __attribute__((unused)))
{ {
} }
@ -2106,7 +2106,7 @@ static int _get_config_disk_area(struct cmd_context *cmd,
} }
if (!(dev_area.dev = device_from_pvid(cmd, &id, NULL))) { if (!(dev_area.dev = device_from_pvid(cmd, &id, NULL))) {
char buffer[64] __attribute((aligned(8))); char buffer[64] __attribute__((aligned(8)));
if (!id_write_format(&id, buffer, sizeof(buffer))) if (!id_write_format(&id, buffer, sizeof(buffer)))
log_error("Couldn't find device."); log_error("Couldn't find device.");

View File

@ -156,9 +156,9 @@ static int _read_flag_config(struct config_node *n, uint64_t *status, int type)
static int _read_pv(struct format_instance *fid, struct dm_pool *mem, static int _read_pv(struct format_instance *fid, struct dm_pool *mem,
struct volume_group *vg, struct config_node *pvn, struct volume_group *vg, struct config_node *pvn,
struct config_node *vgn __attribute((unused)), struct config_node *vgn __attribute__((unused)),
struct dm_hash_table *pv_hash, struct dm_hash_table *pv_hash,
struct dm_hash_table *lv_hash __attribute((unused)), struct dm_hash_table *lv_hash __attribute__((unused)),
unsigned *scan_done_once, unsigned *scan_done_once,
unsigned report_missing_devices) unsigned report_missing_devices)
{ {
@ -194,7 +194,7 @@ static int _read_pv(struct format_instance *fid, struct dm_pool *mem,
* Convert the uuid into a device. * Convert the uuid into a device.
*/ */
if (!(pv->dev = device_from_pvid(fid->fmt->cmd, &pv->id, scan_done_once))) { if (!(pv->dev = device_from_pvid(fid->fmt->cmd, &pv->id, scan_done_once))) {
char buffer[64] __attribute((aligned(8))); char buffer[64] __attribute__((aligned(8)));
if (!id_write_format(&pv->id, buffer, sizeof(buffer))) if (!id_write_format(&pv->id, buffer, sizeof(buffer)))
buffer[0] = '\0'; buffer[0] = '\0';
@ -491,14 +491,14 @@ static int _read_segments(struct dm_pool *mem, struct volume_group *vg,
return 1; return 1;
} }
static int _read_lvnames(struct format_instance *fid __attribute((unused)), static int _read_lvnames(struct format_instance *fid __attribute__((unused)),
struct dm_pool *mem, struct dm_pool *mem,
struct volume_group *vg, struct config_node *lvn, struct volume_group *vg, struct config_node *lvn,
struct config_node *vgn __attribute((unused)), struct config_node *vgn __attribute__((unused)),
struct dm_hash_table *pv_hash __attribute((unused)), struct dm_hash_table *pv_hash __attribute__((unused)),
struct dm_hash_table *lv_hash, struct dm_hash_table *lv_hash,
unsigned *scan_done_once __attribute((unused)), unsigned *scan_done_once __attribute__((unused)),
unsigned report_missing_devices __attribute((unused))) unsigned report_missing_devices __attribute__((unused)))
{ {
struct logical_volume *lv; struct logical_volume *lv;
struct config_node *cn; struct config_node *cn;
@ -563,14 +563,14 @@ static int _read_lvnames(struct format_instance *fid __attribute((unused)),
return link_lv_to_vg(vg, lv); return link_lv_to_vg(vg, lv);
} }
static int _read_lvsegs(struct format_instance *fid __attribute((unused)), static int _read_lvsegs(struct format_instance *fid __attribute__((unused)),
struct dm_pool *mem, struct dm_pool *mem,
struct volume_group *vg, struct config_node *lvn, struct volume_group *vg, struct config_node *lvn,
struct config_node *vgn __attribute((unused)), struct config_node *vgn __attribute__((unused)),
struct dm_hash_table *pv_hash, struct dm_hash_table *pv_hash,
struct dm_hash_table *lv_hash, struct dm_hash_table *lv_hash,
unsigned *scan_done_once __attribute((unused)), unsigned *scan_done_once __attribute__((unused)),
unsigned report_missing_devices __attribute((unused))) unsigned report_missing_devices __attribute__((unused)))
{ {
struct logical_volume *lv; struct logical_volume *lv;

View File

@ -23,9 +23,9 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
static int _text_can_handle(struct labeller *l __attribute((unused)), static int _text_can_handle(struct labeller *l __attribute__((unused)),
void *buf, void *buf,
uint64_t sector __attribute((unused))) uint64_t sector __attribute__((unused)))
{ {
struct label_header *lh = (struct label_header *) buf; struct label_header *lh = (struct label_header *) buf;
@ -44,7 +44,7 @@ static int _text_write(struct label *label, void *buf)
struct metadata_area *mda; struct metadata_area *mda;
struct mda_context *mdac; struct mda_context *mdac;
struct data_area_list *da; struct data_area_list *da;
char buffer[64] __attribute((aligned(8))); char buffer[64] __attribute__((aligned(8)));
int da1, mda1, mda2; int da1, mda1, mda2;
/* FIXME Move to where label is created */ /* FIXME Move to where label is created */
@ -242,7 +242,7 @@ void del_mdas(struct dm_list *mdas)
} }
} }
static int _text_initialise_label(struct labeller *l __attribute((unused)), static int _text_initialise_label(struct labeller *l __attribute__((unused)),
struct label *label) struct label *label)
{ {
strncpy(label->type, LVM2_LABEL, sizeof(label->type)); strncpy(label->type, LVM2_LABEL, sizeof(label->type));
@ -343,7 +343,7 @@ static int _text_read(struct labeller *l, struct device *dev, void *buf,
return 1; return 1;
} }
static void _text_destroy_label(struct labeller *l __attribute((unused)), static void _text_destroy_label(struct labeller *l __attribute__((unused)),
struct label *label) struct label *label)
{ {
struct lvmcache_info *info = (struct lvmcache_info *) label->info; struct lvmcache_info *info = (struct lvmcache_info *) label->info;

View File

@ -114,7 +114,7 @@ static struct labeller *_find_labeller(struct device *dev, char *buf,
struct lvmcache_info *info; struct lvmcache_info *info;
uint64_t sector; uint64_t sector;
int found = 0; int found = 0;
char readbuf[LABEL_SCAN_SIZE] __attribute((aligned(8))); char readbuf[LABEL_SCAN_SIZE] __attribute__((aligned(8)));
if (!dev_read(dev, scan_sector << SECTOR_SHIFT, if (!dev_read(dev, scan_sector << SECTOR_SHIFT,
LABEL_SCAN_SIZE, readbuf)) { LABEL_SCAN_SIZE, readbuf)) {
@ -190,8 +190,8 @@ static struct labeller *_find_labeller(struct device *dev, char *buf,
/* FIXME Also wipe associated metadata area headers? */ /* FIXME Also wipe associated metadata area headers? */
int label_remove(struct device *dev) int label_remove(struct device *dev)
{ {
char buf[LABEL_SIZE] __attribute((aligned(8))); char buf[LABEL_SIZE] __attribute__((aligned(8)));
char readbuf[LABEL_SCAN_SIZE] __attribute((aligned(8))); char readbuf[LABEL_SCAN_SIZE] __attribute__((aligned(8)));
int r = 1; int r = 1;
uint64_t sector; uint64_t sector;
int wipe; int wipe;
@ -260,7 +260,7 @@ int label_remove(struct device *dev)
int label_read(struct device *dev, struct label **result, int label_read(struct device *dev, struct label **result,
uint64_t scan_sector) uint64_t scan_sector)
{ {
char buf[LABEL_SIZE] __attribute((aligned(8))); char buf[LABEL_SIZE] __attribute__((aligned(8)));
struct labeller *l; struct labeller *l;
uint64_t sector; uint64_t sector;
struct lvmcache_info *info; struct lvmcache_info *info;
@ -299,7 +299,7 @@ int label_read(struct device *dev, struct label **result,
/* Caller may need to use label_get_handler to create label struct! */ /* Caller may need to use label_get_handler to create label struct! */
int label_write(struct device *dev, struct label *label) int label_write(struct device *dev, struct label *label)
{ {
char buf[LABEL_SIZE] __attribute((aligned(8))); char buf[LABEL_SIZE] __attribute__((aligned(8)));
struct label_header *lh = (struct label_header *) buf; struct label_header *lh = (struct label_header *) buf;
int r = 1; int r = 1;
@ -347,7 +347,7 @@ int label_write(struct device *dev, struct label *label)
int label_verify(struct device *dev) int label_verify(struct device *dev)
{ {
struct labeller *l; struct labeller *l;
char buf[LABEL_SIZE] __attribute((aligned(8))); char buf[LABEL_SIZE] __attribute__((aligned(8)));
uint64_t sector; uint64_t sector;
struct lvmcache_info *info; struct lvmcache_info *info;
int r = 0; int r = 0;

View File

@ -97,7 +97,7 @@ static int _open_local_sock(void)
/* Send a request and return the status */ /* Send a request and return the status */
static int _send_request(char *inbuf, int inlen, char **retbuf) static int _send_request(char *inbuf, int inlen, char **retbuf)
{ {
char outbuf[PIPE_BUF] __attribute((aligned(8))); char outbuf[PIPE_BUF] __attribute__((aligned(8)));
struct clvm_header *outheader = (struct clvm_header *) outbuf; struct clvm_header *outheader = (struct clvm_header *) outbuf;
int len; int len;
int off; int off;
@ -199,7 +199,7 @@ static void _build_header(struct clvm_header *head, int clvmd_cmd, const char *n
static int _cluster_request(char clvmd_cmd, const char *node, void *data, int len, static int _cluster_request(char clvmd_cmd, const char *node, void *data, int len,
lvm_response_t ** response, int *num) lvm_response_t ** response, int *num)
{ {
char outbuf[sizeof(struct clvm_header) + len + strlen(node) + 1] __attribute((aligned(8))); char outbuf[sizeof(struct clvm_header) + len + strlen(node) + 1] __attribute__((aligned(8)));
char *inptr; char *inptr;
char *retbuf = NULL; char *retbuf = NULL;
int status; int status;

View File

@ -112,7 +112,7 @@ static void _remove_ctrl_c_handler(void)
log_sys_error("signal", "_remove_ctrl_c_handler"); log_sys_error("signal", "_remove_ctrl_c_handler");
} }
static void _trap_ctrl_c(int sig __attribute((unused))) static void _trap_ctrl_c(int sig __attribute__((unused)))
{ {
_remove_ctrl_c_handler(); _remove_ctrl_c_handler();
log_error("CTRL-c detected: giving up waiting for lock"); log_error("CTRL-c detected: giving up waiting for lock");

View File

@ -127,7 +127,7 @@ void sigint_restore(void)
sigaction(SIGINT, &_oldhandler, NULL); sigaction(SIGINT, &_oldhandler, NULL);
} }
static void _block_signals(uint32_t flags __attribute((unused))) static void _block_signals(uint32_t flags __attribute__((unused)))
{ {
sigset_t set; sigset_t set;
@ -396,7 +396,7 @@ static int _lock_vol(struct cmd_context *cmd, const char *resource,
int lock_vol(struct cmd_context *cmd, const char *vol, uint32_t flags) int lock_vol(struct cmd_context *cmd, const char *vol, uint32_t flags)
{ {
char resource[258] __attribute((aligned(8))); char resource[258] __attribute__((aligned(8)));
lv_operation_t lv_op; lv_operation_t lv_op;
switch (flags & (LCK_SCOPE_MASK | LCK_TYPE_MASK)) { switch (flags & (LCK_SCOPE_MASK | LCK_TYPE_MASK)) {

View File

@ -79,7 +79,7 @@ static int _readonly_lock_resource(struct cmd_context *cmd,
return _no_lock_resource(cmd, resource, flags); return _no_lock_resource(cmd, resource, flags);
} }
int init_no_locking(struct locking_type *locking, struct cmd_context *cmd __attribute((unused))) int init_no_locking(struct locking_type *locking, struct cmd_context *cmd __attribute__((unused)))
{ {
locking->lock_resource = _no_lock_resource; locking->lock_resource = _no_lock_resource;
locking->reset_locking = _no_reset_locking; locking->reset_locking = _no_reset_locking;
@ -89,7 +89,7 @@ int init_no_locking(struct locking_type *locking, struct cmd_context *cmd __attr
return 1; return 1;
} }
int init_readonly_locking(struct locking_type *locking, struct cmd_context *cmd __attribute((unused))) int init_readonly_locking(struct locking_type *locking, struct cmd_context *cmd __attribute__((unused)))
{ {
locking->lock_resource = _readonly_lock_resource; locking->lock_resource = _readonly_lock_resource;
locking->reset_locking = _no_reset_locking; locking->reset_locking = _no_reset_locking;

View File

@ -951,7 +951,7 @@ static int _is_contiguous(struct pv_segment *pvseg, struct pv_area *pva)
return 1; return 1;
} }
static int _is_condition(struct cmd_context *cmd __attribute((unused)), static int _is_condition(struct cmd_context *cmd __attribute__((unused)),
struct pv_segment *pvseg, uint32_t s, struct pv_segment *pvseg, uint32_t s,
void *data) void *data)
{ {
@ -1743,8 +1743,8 @@ int lv_extend(struct logical_volume *lv,
const struct segment_type *segtype, const struct segment_type *segtype,
uint32_t stripes, uint32_t stripe_size, uint32_t stripes, uint32_t stripe_size,
uint32_t mirrors, uint32_t extents, uint32_t mirrors, uint32_t extents,
struct physical_volume *mirrored_pv __attribute((unused)), struct physical_volume *mirrored_pv __attribute__((unused)),
uint32_t mirrored_pe __attribute((unused)), uint32_t mirrored_pe __attribute__((unused)),
uint64_t status, struct dm_list *allocatable_pvs, uint64_t status, struct dm_list *allocatable_pvs,
alloc_policy_t alloc) alloc_policy_t alloc)
{ {
@ -2072,7 +2072,7 @@ bad:
} }
static int _add_pvs(struct cmd_context *cmd, struct pv_segment *peg, static int _add_pvs(struct cmd_context *cmd, struct pv_segment *peg,
uint32_t s __attribute((unused)), void *data) uint32_t s __attribute__((unused)), void *data)
{ {
struct seg_pvs *spvs = (struct seg_pvs *) data; struct seg_pvs *spvs = (struct seg_pvs *) data;
struct pv_list *pvl; struct pv_list *pvl;

View File

@ -172,7 +172,7 @@ int add_pv_to_vg(struct volume_group *vg, const char *pv_name,
struct pv_list *pvl; struct pv_list *pvl;
struct format_instance *fid = vg->fid; struct format_instance *fid = vg->fid;
struct dm_pool *mem = vg->vgmem; struct dm_pool *mem = vg->vgmem;
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
struct dm_list *mdas; struct dm_list *mdas;
log_verbose("Adding physical volume '%s' to volume group '%s'", log_verbose("Adding physical volume '%s' to volume group '%s'",
@ -1491,7 +1491,7 @@ static int _move_mdas(struct volume_group *vg_from, struct volume_group *vg_to,
* Separate metadata areas after splitting a VG. * Separate metadata areas after splitting a VG.
* Also accepts orphan VG as destination (for vgreduce). * Also accepts orphan VG as destination (for vgreduce).
*/ */
int vg_split_mdas(struct cmd_context *cmd __attribute((unused)), int vg_split_mdas(struct cmd_context *cmd __attribute__((unused)),
struct volume_group *vg_from, struct volume_group *vg_to) struct volume_group *vg_from, struct volume_group *vg_to)
{ {
struct dm_list *mdas_from_in_use, *mdas_to_in_use; struct dm_list *mdas_from_in_use, *mdas_to_in_use;
@ -1683,7 +1683,7 @@ struct physical_volume * pvcreate_single(struct cmd_context *cmd,
struct device *dev; struct device *dev;
struct dm_list mdas; struct dm_list mdas;
struct pvcreate_params default_pp; struct pvcreate_params default_pp;
char buffer[64] __attribute((aligned(8))); char buffer[64] __attribute__((aligned(8)));
pvcreate_params_set_defaults(&default_pp); pvcreate_params_set_defaults(&default_pp);
if (!pp) if (!pp)
@ -2122,7 +2122,7 @@ unsigned vg_visible_lvs(const struct volume_group *vg)
/* /*
* Determine whether two vgs are compatible for merging. * Determine whether two vgs are compatible for merging.
*/ */
int vgs_are_compatible(struct cmd_context *cmd __attribute((unused)), int vgs_are_compatible(struct cmd_context *cmd __attribute__((unused)),
struct volume_group *vg_from, struct volume_group *vg_from,
struct volume_group *vg_to) struct volume_group *vg_to)
{ {
@ -2411,7 +2411,7 @@ int vg_validate(struct volume_group *vg)
{ {
struct pv_list *pvl, *pvl2; struct pv_list *pvl, *pvl2;
struct lv_list *lvl, *lvl2; struct lv_list *lvl, *lvl2;
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
int r = 1; int r = 1;
uint32_t hidden_lv_count = 0, lv_count = 0, lv_visible_count = 0; uint32_t hidden_lv_count = 0, lv_count = 0, lv_visible_count = 0;
uint32_t pv_count = 0; uint32_t pv_count = 0;
@ -2900,7 +2900,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
struct dm_list *pvids; struct dm_list *pvids;
struct pv_list *pvl, *pvl2; struct pv_list *pvl, *pvl2;
struct dm_list all_pvs; struct dm_list all_pvs;
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
if (is_orphan_vg(vgname)) { if (is_orphan_vg(vgname)) {
if (use_precommitted) { if (use_precommitted) {
@ -3638,7 +3638,7 @@ int scan_vgs_for_pvs(struct cmd_context *cmd)
return _get_pvs(cmd, NULL); return _get_pvs(cmd, NULL);
} }
int pv_write(struct cmd_context *cmd __attribute((unused)), int pv_write(struct cmd_context *cmd __attribute__((unused)),
struct physical_volume *pv, struct physical_volume *pv,
struct dm_list *mdas, int64_t label_sector) struct dm_list *mdas, int64_t label_sector)
{ {

View File

@ -1064,8 +1064,8 @@ int remove_mirror_images(struct logical_volume *lv, uint32_t num_mirrors,
return 1; return 1;
} }
static int _no_removable_images(struct logical_volume *lv __attribute((unused)), static int _no_removable_images(struct logical_volume *lv __attribute__((unused)),
void *baton __attribute((unused))) { void *baton __attribute__((unused))) {
return 0; return 0;
} }
@ -1110,7 +1110,7 @@ int collapse_mirrored_lv(struct logical_volume *lv)
return 1; return 1;
} }
static int get_mirror_fault_policy(struct cmd_context *cmd __attribute((unused)), static int get_mirror_fault_policy(struct cmd_context *cmd __attribute__((unused)),
int log_policy) int log_policy)
{ {
const char *policy; const char *policy;
@ -1432,7 +1432,7 @@ struct logical_volume *find_pvmove_lv(struct volume_group *vg,
struct logical_volume *find_pvmove_lv_from_pvname(struct cmd_context *cmd, struct logical_volume *find_pvmove_lv_from_pvname(struct cmd_context *cmd,
struct volume_group *vg, struct volume_group *vg,
const char *name, const char *name,
const char *uuid __attribute((unused)), const char *uuid __attribute__((unused)),
uint32_t lv_type) uint32_t lv_type)
{ {
struct physical_volume *pv; struct physical_volume *pv;
@ -2000,7 +2000,7 @@ int lv_split_mirror_images(struct logical_volume *lv, const char *split_name,
* 'mirror' is the number of mirrors to be removed. * 'mirror' is the number of mirrors to be removed.
* 'pvs' is removable pvs. * 'pvs' is removable pvs.
*/ */
int lv_remove_mirrors(struct cmd_context *cmd __attribute((unused)), int lv_remove_mirrors(struct cmd_context *cmd __attribute__((unused)),
struct logical_volume *lv, struct logical_volume *lv,
uint32_t mirrors, uint32_t log_count, uint32_t mirrors, uint32_t log_count,
int (*is_removable)(struct logical_volume *, void *), int (*is_removable)(struct logical_volume *, void *),

View File

@ -610,7 +610,7 @@ static int _target_monitored(struct lv_segment *seg, int *pending)
/* FIXME This gets run while suspended and performs banned operations. */ /* FIXME This gets run while suspended and performs banned operations. */
static int _target_set_events(struct lv_segment *seg, static int _target_set_events(struct lv_segment *seg,
int evmask __attribute((unused)), int set) int evmask __attribute__((unused)), int set)
{ {
char *dso, *uuid; char *dso, *uuid;
struct logical_volume *lv; struct logical_volume *lv;

View File

@ -221,7 +221,7 @@ static int _add_site(struct lv_segment *seg,
/* Import replicator segment */ /* Import replicator segment */
static int _replicator_text_import(struct lv_segment *seg, static int _replicator_text_import(struct lv_segment *seg,
const struct config_node *sn, const struct config_node *sn,
struct dm_hash_table *pv_hash __attribute((unused))) struct dm_hash_table *pv_hash __attribute__((unused)))
{ {
const struct config_node *cn; const struct config_node *cn;
struct logical_volume *rlog_lv; struct logical_volume *rlog_lv;
@ -377,8 +377,8 @@ static int _replicator_target_percent(void **target_state,
/* Check for module presence */ /* Check for module presence */
static int _replicator_target_present(struct cmd_context *cmd, static int _replicator_target_present(struct cmd_context *cmd,
const struct lv_segment *seg __attribute((unused)), const struct lv_segment *seg __attribute__((unused)),
unsigned *attributes __attribute((unused))) unsigned *attributes __attribute__((unused)))
{ {
static int _checked = 0; static int _checked = 0;
static int _present = 0; static int _present = 0;
@ -394,7 +394,7 @@ static int _replicator_target_present(struct cmd_context *cmd,
#endif #endif
static int _replicator_modules_needed(struct dm_pool *mem, static int _replicator_modules_needed(struct dm_pool *mem,
const struct lv_segment *seg __attribute((unused)), const struct lv_segment *seg __attribute__((unused)),
struct dm_list *modules) struct dm_list *modules)
{ {
if (!str_list_add(mem, modules, REPLICATOR_MODULE)) if (!str_list_add(mem, modules, REPLICATOR_MODULE))
@ -520,7 +520,7 @@ static int _add_device(struct lv_segment *seg,
/* Import replicator segment */ /* Import replicator segment */
static int _replicator_dev_text_import(struct lv_segment *seg, static int _replicator_dev_text_import(struct lv_segment *seg,
const struct config_node *sn, const struct config_node *sn,
struct dm_hash_table *pv_hash __attribute((unused))) struct dm_hash_table *pv_hash __attribute__((unused)))
{ {
const struct config_node *cn; const struct config_node *cn;
struct logical_volume *replicator; struct logical_volume *replicator;
@ -721,8 +721,8 @@ static int _replicator_dev_target_percent(void **target_state,
/* Check for module presence */ /* Check for module presence */
static int _replicator_dev_target_present(struct cmd_context *cmd, static int _replicator_dev_target_present(struct cmd_context *cmd,
const struct lv_segment *seg __attribute((unused)), const struct lv_segment *seg __attribute__((unused)),
unsigned *attributes __attribute((unused))) unsigned *attributes __attribute__((unused)))
{ {
static int _checked = 0; static int _checked = 0;
static int _present = 0; static int _present = 0;

View File

@ -56,16 +56,16 @@ static const int32_t _minusone32 = INT32_C(-1);
/* /*
* Data-munging functions to prepare each data type for display and sorting * Data-munging functions to prepare each data type for display and sorting
*/ */
static int _string_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), static int _string_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
return dm_report_field_string(rh, field, (const char **) data); return dm_report_field_string(rh, field, (const char **) data);
} }
static int _dev_name_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), static int _dev_name_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const char *name = dev_name(*(const struct device * const *) data); const char *name = dev_name(*(const struct device * const *) data);
@ -147,23 +147,23 @@ static int _format_pvsegs(struct dm_pool *mem, struct dm_report_field *field,
return 1; return 1;
} }
static int _devices_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, static int _devices_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
return _format_pvsegs(mem, field, data, 0); return _format_pvsegs(mem, field, data, 0);
} }
static int _peranges_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, static int _peranges_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
return _format_pvsegs(mem, field, data, 1); return _format_pvsegs(mem, field, data, 1);
} }
static int _tags_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, static int _tags_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct dm_list *tags = (const struct dm_list *) data; const struct dm_list *tags = (const struct dm_list *) data;
struct str_list *sl; struct str_list *sl;
@ -238,9 +238,9 @@ static int _pvfmt_disp(struct dm_report *rh, struct dm_pool *mem,
return _string_disp(rh, mem, field, &pv->fmt->name, private); return _string_disp(rh, mem, field, &pv->fmt->name, private);
} }
static int _lvkmaj_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), static int _lvkmaj_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct logical_volume *lv = (const struct logical_volume *) data; const struct logical_volume *lv = (const struct logical_volume *) data;
struct lvinfo info; struct lvinfo info;
@ -251,9 +251,9 @@ static int _lvkmaj_disp(struct dm_report *rh, struct dm_pool *mem __attribute((u
return dm_report_field_int32(rh, field, &_minusone32); return dm_report_field_int32(rh, field, &_minusone32);
} }
static int _lvkmin_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), static int _lvkmin_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct logical_volume *lv = (const struct logical_volume *) data; const struct logical_volume *lv = (const struct logical_volume *) data;
struct lvinfo info; struct lvinfo info;
@ -280,9 +280,9 @@ static int _lv_mimage_in_sync(const struct logical_volume *lv)
return (percent_range == PERCENT_100) ? 1 : 0; return (percent_range == PERCENT_100) ? 1 : 0;
} }
static int _lvstatus_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, static int _lvstatus_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct logical_volume *lv = (const struct logical_volume *) data; const struct logical_volume *lv = (const struct logical_volume *) data;
struct lvinfo info; struct lvinfo info;
@ -386,9 +386,9 @@ out:
return 1; return 1;
} }
static int _pvstatus_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, static int _pvstatus_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const uint32_t status = *(const uint32_t *) data; const uint32_t status = *(const uint32_t *) data;
char *repstr; char *repstr;
@ -412,9 +412,9 @@ static int _pvstatus_disp(struct dm_report *rh __attribute((unused)), struct dm_
return 1; return 1;
} }
static int _vgstatus_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, static int _vgstatus_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct volume_group *vg = (const struct volume_group *) data; const struct volume_group *vg = (const struct volume_group *) data;
char *repstr; char *repstr;
@ -455,10 +455,10 @@ static int _vgstatus_disp(struct dm_report *rh __attribute((unused)), struct dm_
return 1; return 1;
} }
static int _segtype_disp(struct dm_report *rh __attribute((unused)), static int _segtype_disp(struct dm_report *rh __attribute__((unused)),
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct lv_segment *seg = (const struct lv_segment *) data; const struct lv_segment *seg = (const struct lv_segment *) data;
@ -471,9 +471,9 @@ static int _segtype_disp(struct dm_report *rh __attribute((unused)),
return 1; return 1;
} }
static int _loglv_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), static int _loglv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct logical_volume *lv = (const struct logical_volume *) data; const struct logical_volume *lv = (const struct logical_volume *) data;
struct lv_segment *seg; struct lv_segment *seg;
@ -491,7 +491,7 @@ static int _loglv_disp(struct dm_report *rh, struct dm_pool *mem __attribute((un
static int _lvname_disp(struct dm_report *rh, struct dm_pool *mem, static int _lvname_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct logical_volume *lv = (const struct logical_volume *) data; const struct logical_volume *lv = (const struct logical_volume *) data;
char *repstr, *lvname; char *repstr, *lvname;
@ -525,7 +525,7 @@ static int _lvname_disp(struct dm_report *rh, struct dm_pool *mem,
static int _lvpath_disp(struct dm_report *rh, struct dm_pool *mem, static int _lvpath_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct logical_volume *lv = (const struct logical_volume *) data; const struct logical_volume *lv = (const struct logical_volume *) data;
char *repstr; char *repstr;
@ -560,9 +560,9 @@ static int _origin_disp(struct dm_report *rh, struct dm_pool *mem,
return 1; return 1;
} }
static int _movepv_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), static int _movepv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct logical_volume *lv = (const struct logical_volume *) data; const struct logical_volume *lv = (const struct logical_volume *) data;
const char *name; const char *name;
@ -579,9 +579,9 @@ static int _movepv_disp(struct dm_report *rh, struct dm_pool *mem __attribute((u
return 1; return 1;
} }
static int _convertlv_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), static int _convertlv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct logical_volume *lv = (const struct logical_volume *) data; const struct logical_volume *lv = (const struct logical_volume *) data;
const char *name = NULL; const char *name = NULL;
@ -605,7 +605,7 @@ static int _convertlv_disp(struct dm_report *rh, struct dm_pool *mem __attribute
return 1; return 1;
} }
static int _size32_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, static int _size32_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private) const void *data, void *private)
{ {
@ -633,7 +633,7 @@ static int _size32_disp(struct dm_report *rh __attribute((unused)), struct dm_po
return 1; return 1;
} }
static int _size64_disp(struct dm_report *rh __attribute((unused)), static int _size64_disp(struct dm_report *rh __attribute__((unused)),
struct dm_pool *mem, struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private) const void *data, void *private)
@ -663,7 +663,7 @@ static int _size64_disp(struct dm_report *rh __attribute((unused)),
static int _lvreadahead_disp(struct dm_report *rh, struct dm_pool *mem, static int _lvreadahead_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct logical_volume *lv = (const struct logical_volume *) data; const struct logical_volume *lv = (const struct logical_volume *) data;
@ -714,10 +714,10 @@ static int _segstart_disp(struct dm_report *rh, struct dm_pool *mem,
} }
static int _segstartpe_disp(struct dm_report *rh, static int _segstartpe_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
const struct lv_segment *seg = (const struct lv_segment *) data; const struct lv_segment *seg = (const struct lv_segment *) data;
@ -835,9 +835,9 @@ static int _vgfree_disp(struct dm_report *rh, struct dm_pool *mem,
return _size64_disp(rh, mem, field, &freespace, private); return _size64_disp(rh, mem, field, &freespace, private);
} }
static int _uuid_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, static int _uuid_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
char *repstr = NULL; char *repstr = NULL;
@ -853,16 +853,16 @@ static int _uuid_disp(struct dm_report *rh __attribute((unused)), struct dm_pool
return 1; return 1;
} }
static int _uint32_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), static int _uint32_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
return dm_report_field_uint32(rh, field, data); return dm_report_field_uint32(rh, field, data);
} }
static int _int32_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), static int _int32_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
return dm_report_field_int32(rh, field, data); return dm_report_field_int32(rh, field, data);
} }
@ -1062,9 +1062,9 @@ static int _snapcount_disp(struct dm_report *rh, struct dm_pool *mem,
return _uint32_disp(rh, mem, field, &count, private); return _uint32_disp(rh, mem, field, &count, private);
} }
static int _snpercent_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, static int _snpercent_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const struct logical_volume *lv = (const struct logical_volume *) data; const struct logical_volume *lv = (const struct logical_volume *) data;
struct lvinfo info; struct lvinfo info;
@ -1122,10 +1122,10 @@ static int _snpercent_disp(struct dm_report *rh __attribute((unused)), struct dm
return 1; return 1;
} }
static int _copypercent_disp(struct dm_report *rh __attribute((unused)), static int _copypercent_disp(struct dm_report *rh __attribute__((unused)),
struct dm_pool *mem, struct dm_pool *mem,
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
struct logical_volume *lv = (struct logical_volume *) data; struct logical_volume *lv = (struct logical_volume *) data;
float percent; float percent;

View File

@ -32,7 +32,7 @@ static const char *_snap_name(const struct lv_segment *seg)
} }
static int _snap_text_import(struct lv_segment *seg, const struct config_node *sn, static int _snap_text_import(struct lv_segment *seg, const struct config_node *sn,
struct dm_hash_table *pv_hash __attribute((unused))) struct dm_hash_table *pv_hash __attribute__((unused)))
{ {
uint32_t chunk_size; uint32_t chunk_size;
const char *org_name, *cow_name; const char *org_name, *cow_name;
@ -103,11 +103,11 @@ static int _snap_target_status_compatible(const char *type)
} }
#ifdef DEVMAPPER_SUPPORT #ifdef DEVMAPPER_SUPPORT
static int _snap_target_percent(void **target_state __attribute((unused)), static int _snap_target_percent(void **target_state __attribute__((unused)),
percent_range_t *percent_range, percent_range_t *percent_range,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct cmd_context *cmd __attribute((unused)), struct cmd_context *cmd __attribute__((unused)),
struct lv_segment *seg __attribute((unused)), struct lv_segment *seg __attribute__((unused)),
char *params, uint64_t *total_numerator, char *params, uint64_t *total_numerator,
uint64_t *total_denominator) uint64_t *total_denominator)
{ {
@ -141,7 +141,7 @@ static int _snap_target_percent(void **target_state __attribute((unused)),
static int _snap_target_present(struct cmd_context *cmd, static int _snap_target_present(struct cmd_context *cmd,
const struct lv_segment *seg, const struct lv_segment *seg,
unsigned *attributes __attribute((unused))) unsigned *attributes __attribute__((unused)))
{ {
static int _snap_checked = 0; static int _snap_checked = 0;
static int _snap_merge_checked = 0; static int _snap_merge_checked = 0;
@ -249,7 +249,7 @@ static int _target_registered(struct lv_segment *seg, int *pending)
/* FIXME This gets run while suspended and performs banned operations. */ /* FIXME This gets run while suspended and performs banned operations. */
static int _target_set_events(struct lv_segment *seg, static int _target_set_events(struct lv_segment *seg,
int events __attribute((unused)), int set) int events __attribute__((unused)), int set)
{ {
char *dso, *uuid; char *dso, *uuid;
struct volume_group *vg = seg->lv->vg; struct volume_group *vg = seg->lv->vg;
@ -293,7 +293,7 @@ static int _target_unregister_events(struct lv_segment *seg,
#endif #endif
static int _snap_modules_needed(struct dm_pool *mem, static int _snap_modules_needed(struct dm_pool *mem,
const struct lv_segment *seg __attribute((unused)), const struct lv_segment *seg __attribute__((unused)),
struct dm_list *modules) struct dm_list *modules)
{ {
if (!str_list_add(mem, modules, "snapshot")) { if (!str_list_add(mem, modules, "snapshot")) {

View File

@ -160,12 +160,12 @@ static int _striped_merge_segments(struct lv_segment *seg1, struct lv_segment *s
#ifdef DEVMAPPER_SUPPORT #ifdef DEVMAPPER_SUPPORT
static int _striped_add_target_line(struct dev_manager *dm, static int _striped_add_target_line(struct dev_manager *dm,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct cmd_context *cmd __attribute((unused)), struct cmd_context *cmd __attribute__((unused)),
void **target_state __attribute((unused)), void **target_state __attribute__((unused)),
struct lv_segment *seg, struct lv_segment *seg,
struct dm_tree_node *node, uint64_t len, struct dm_tree_node *node, uint64_t len,
uint32_t *pvmove_mirror_count __attribute((unused))) uint32_t *pvmove_mirror_count __attribute__((unused)))
{ {
if (!seg->area_count) { if (!seg->area_count) {
log_error(INTERNAL_ERROR "striped add_target_line called " log_error(INTERNAL_ERROR "striped add_target_line called "
@ -183,8 +183,8 @@ static int _striped_add_target_line(struct dev_manager *dm,
} }
static int _striped_target_present(struct cmd_context *cmd, static int _striped_target_present(struct cmd_context *cmd,
const struct lv_segment *seg __attribute((unused)), const struct lv_segment *seg __attribute__((unused)),
unsigned *attributes __attribute((unused))) unsigned *attributes __attribute__((unused)))
{ {
static int _striped_checked = 0; static int _striped_checked = 0;
static int _striped_present = 0; static int _striped_present = 0;

View File

@ -62,13 +62,13 @@ static int _unknown_text_export(const struct lv_segment *seg, struct formatter *
} }
#ifdef DEVMAPPER_SUPPORT #ifdef DEVMAPPER_SUPPORT
static int _unknown_add_target_line(struct dev_manager *dm __attribute((unused)), static int _unknown_add_target_line(struct dev_manager *dm __attribute__((unused)),
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct cmd_context *cmd __attribute((unused)), struct cmd_context *cmd __attribute__((unused)),
void **target_state __attribute((unused)), void **target_state __attribute__((unused)),
struct lv_segment *seg __attribute((unused)), struct lv_segment *seg __attribute__((unused)),
struct dm_tree_node *node, uint64_t len, struct dm_tree_node *node, uint64_t len,
uint32_t *pvmove_mirror_count __attribute((unused))) uint32_t *pvmove_mirror_count __attribute__((unused)))
{ {
return dm_tree_node_add_error_target(node, len); return dm_tree_node_add_error_target(node, len);
} }

View File

@ -39,20 +39,20 @@ static int _zero_merge_segments(struct lv_segment *seg1, struct lv_segment *seg2
} }
#ifdef DEVMAPPER_SUPPORT #ifdef DEVMAPPER_SUPPORT
static int _zero_add_target_line(struct dev_manager *dm __attribute((unused)), static int _zero_add_target_line(struct dev_manager *dm __attribute__((unused)),
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct cmd_context *cmd __attribute((unused)), struct cmd_context *cmd __attribute__((unused)),
void **target_state __attribute((unused)), void **target_state __attribute__((unused)),
struct lv_segment *seg __attribute((unused)), struct lv_segment *seg __attribute__((unused)),
struct dm_tree_node *node,uint64_t len, struct dm_tree_node *node,uint64_t len,
uint32_t *pvmove_mirror_count __attribute((unused))) uint32_t *pvmove_mirror_count __attribute__((unused)))
{ {
return dm_tree_node_add_zero_target(node, len); return dm_tree_node_add_zero_target(node, len);
} }
static int _zero_target_present(struct cmd_context *cmd, static int _zero_target_present(struct cmd_context *cmd,
const struct lv_segment *seg __attribute((unused)), const struct lv_segment *seg __attribute__((unused)),
unsigned *attributes __attribute((unused))) unsigned *attributes __attribute__((unused)))
{ {
static int _zero_checked = 0; static int _zero_checked = 0;
static int _zero_present = 0; static int _zero_present = 0;
@ -67,7 +67,7 @@ static int _zero_target_present(struct cmd_context *cmd,
#endif #endif
static int _zero_modules_needed(struct dm_pool *mem, static int _zero_modules_needed(struct dm_pool *mem,
const struct lv_segment *seg __attribute((unused)), const struct lv_segment *seg __attribute__((unused)),
struct dm_list *modules) struct dm_list *modules)
{ {
if (!str_list_add(mem, modules, "zero")) { if (!str_list_add(mem, modules, "zero")) {

View File

@ -236,13 +236,13 @@ void dm_hash_wipe(struct dm_hash_table *t)
t->num_nodes = 0u; t->num_nodes = 0u;
} }
char *dm_hash_get_key(struct dm_hash_table *t __attribute((unused)), char *dm_hash_get_key(struct dm_hash_table *t __attribute__((unused)),
struct dm_hash_node *n) struct dm_hash_node *n)
{ {
return n->key; return n->key;
} }
void *dm_hash_get_data(struct dm_hash_table *t __attribute((unused)), void *dm_hash_get_data(struct dm_hash_table *t __attribute__((unused)),
struct dm_hash_node *n) struct dm_hash_node *n)
{ {
return n->data; return n->data;

View File

@ -244,7 +244,7 @@ int dm_is_dm_major(uint32_t major);
* Release library resources * Release library resources
*/ */
void dm_lib_release(void); void dm_lib_release(void);
void dm_lib_exit(void) __attribute((destructor)); void dm_lib_exit(void) __attribute__((destructor));
/* /*
* Use NULL for all devices. * Use NULL for all devices.

View File

@ -71,8 +71,8 @@ static int _udev_checking = 1;
*/ */
static void _default_log_line(int level, static void _default_log_line(int level,
const char *file __attribute((unused)), const char *file __attribute__((unused)),
int line __attribute((unused)), int dm_errno, int line __attribute__((unused)), int dm_errno,
const char *f, va_list ap) const char *f, va_list ap)
{ {
int use_stderr = level & _LOG_STDERR; int use_stderr = level & _LOG_STDERR;
@ -94,8 +94,8 @@ static void _default_log_line(int level,
} }
static void _default_log_with_errno(int level, static void _default_log_with_errno(int level,
const char *file __attribute((unused)), const char *file __attribute__((unused)),
int line __attribute((unused)), int dm_errno, int line __attribute__((unused)), int dm_errno,
const char *f, ...) const char *f, ...)
{ {
va_list ap; va_list ap;

View File

@ -1435,7 +1435,7 @@ do {\
* *
* Returns: 1 on success, 0 on failure * Returns: 1 on success, 0 on failure
*/ */
static int _emit_areas_line(struct dm_task *dmt __attribute((unused)), static int _emit_areas_line(struct dm_task *dmt __attribute__((unused)),
struct load_segment *seg, char *params, struct load_segment *seg, char *params,
size_t paramsize, int *pos) size_t paramsize, int *pos)
{ {

View File

@ -38,7 +38,7 @@ static int _isword(int c)
* Returns number of words. * Returns number of words.
*/ */
int dm_split_words(char *buffer, unsigned max, int dm_split_words(char *buffer, unsigned max,
unsigned ignore_comments __attribute((unused)), unsigned ignore_comments __attribute__((unused)),
char **argv) char **argv)
{ {
unsigned arg; unsigned arg;

View File

@ -231,8 +231,8 @@ void dm_bounds_check_debug(void)
} }
} }
void *dm_malloc_aux(size_t s, const char *file __attribute((unused)), void *dm_malloc_aux(size_t s, const char *file __attribute__((unused)),
int line __attribute((unused))) int line __attribute__((unused)))
{ {
if (s > 50000000) { if (s > 50000000) {
log_error("Huge memory allocation (size %" PRIsize_t log_error("Huge memory allocation (size %" PRIsize_t

View File

@ -41,7 +41,7 @@ uint64_t lvm_lv_get_size(const lv_t lv)
const char *lvm_lv_get_uuid(const lv_t lv) const char *lvm_lv_get_uuid(const lv_t lv)
{ {
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
if (!id_write_format(&lv->lvid.id[1], uuid, sizeof(uuid))) { if (!id_write_format(&lv->lvid.id[1], uuid, sizeof(uuid))) {
log_error(INTERNAL_ERROR "unable to convert uuid"); log_error(INTERNAL_ERROR "unable to convert uuid");

View File

@ -19,7 +19,7 @@
const char *lvm_pv_get_uuid(const pv_t pv) const char *lvm_pv_get_uuid(const pv_t pv)
{ {
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
if (!id_write_format(&pv->id, uuid, sizeof(uuid))) { if (!id_write_format(&pv->id, uuid, sizeof(uuid))) {
log_error(INTERNAL_ERROR "Unable to convert uuid"); log_error(INTERNAL_ERROR "Unable to convert uuid");

View File

@ -332,7 +332,7 @@ uint64_t lvm_vg_get_max_lv(const vg_t vg)
const char *lvm_vg_get_uuid(const vg_t vg) const char *lvm_vg_get_uuid(const vg_t vg)
{ {
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
if (!id_write_format(&vg->id, uuid, sizeof(uuid))) { if (!id_write_format(&vg->id, uuid, sizeof(uuid))) {
log_error(INTERNAL_ERROR "Unable to convert uuid"); log_error(INTERNAL_ERROR "Unable to convert uuid");

View File

@ -502,7 +502,7 @@ static int _set_task_device(struct dm_task *dmt, const char *name, int optional)
return 1; return 1;
} }
static int _load(int argc, char **argv, void *data __attribute((unused))) static int _load(int argc, char **argv, void *data __attribute__((unused)))
{ {
int r = 0; int r = 0;
struct dm_task *dmt; struct dm_task *dmt;
@ -562,7 +562,7 @@ static int _load(int argc, char **argv, void *data __attribute((unused)))
return r; return r;
} }
static int _create(int argc, char **argv, void *data __attribute((unused))) static int _create(int argc, char **argv, void *data __attribute__((unused)))
{ {
int r = 0; int r = 0;
struct dm_task *dmt; struct dm_task *dmt;
@ -644,7 +644,7 @@ static int _create(int argc, char **argv, void *data __attribute((unused)))
return r; return r;
} }
static int _rename(int argc, char **argv, void *data __attribute((unused))) static int _rename(int argc, char **argv, void *data __attribute__((unused)))
{ {
int r = 0; int r = 0;
struct dm_task *dmt; struct dm_task *dmt;
@ -691,7 +691,7 @@ static int _rename(int argc, char **argv, void *data __attribute((unused)))
return r; return r;
} }
static int _message(int argc, char **argv, void *data __attribute((unused))) static int _message(int argc, char **argv, void *data __attribute__((unused)))
{ {
int r = 0, i; int r = 0, i;
size_t sz = 1; size_t sz = 1;
@ -758,7 +758,7 @@ static int _message(int argc, char **argv, void *data __attribute((unused)))
return r; return r;
} }
static int _setgeometry(int argc, char **argv, void *data __attribute((unused))) static int _setgeometry(int argc, char **argv, void *data __attribute__((unused)))
{ {
int r = 0; int r = 0;
struct dm_task *dmt; struct dm_task *dmt;
@ -797,7 +797,7 @@ static int _setgeometry(int argc, char **argv, void *data __attribute((unused)))
return r; return r;
} }
static int _splitname(int argc, char **argv, void *data __attribute((unused))) static int _splitname(int argc, char **argv, void *data __attribute__((unused)))
{ {
struct dmsetup_report_obj obj; struct dmsetup_report_obj obj;
int r = 1; int r = 1;
@ -831,7 +831,7 @@ static uint32_t _get_cookie_value(const char *str_value)
return (uint32_t) value; return (uint32_t) value;
} }
static int _udevflags(int args, char **argv, void *data __attribute((unused))) static int _udevflags(int args, char **argv, void *data __attribute__((unused)))
{ {
uint32_t cookie; uint32_t cookie;
uint16_t flags; uint16_t flags;
@ -873,7 +873,7 @@ static int _udevflags(int args, char **argv, void *data __attribute((unused)))
return 1; return 1;
} }
static int _udevcomplete(int argc, char **argv, void *data __attribute((unused))) static int _udevcomplete(int argc, char **argv, void *data __attribute__((unused)))
{ {
uint32_t cookie; uint32_t cookie;
@ -899,7 +899,7 @@ static int _udevcomplete(int argc, char **argv, void *data __attribute((unused))
static const char _cmd_not_supported[] = "Command not supported. Recompile with \"--enable-udev-sync\" to enable."; static const char _cmd_not_supported[] = "Command not supported. Recompile with \"--enable-udev-sync\" to enable.";
static int _udevcreatecookie(int argc, char **argv, static int _udevcreatecookie(int argc, char **argv,
void *data __attribute((unused))) void *data __attribute__((unused)))
{ {
log_error(_cmd_not_supported); log_error(_cmd_not_supported);
@ -907,21 +907,21 @@ static int _udevcreatecookie(int argc, char **argv,
} }
static int _udevreleasecookie(int argc, char **argv, static int _udevreleasecookie(int argc, char **argv,
void *data __attribute((unused))) void *data __attribute__((unused)))
{ {
log_error(_cmd_not_supported); log_error(_cmd_not_supported);
return 0; return 0;
} }
static int _udevcomplete_all(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) static int _udevcomplete_all(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused)))
{ {
log_error(_cmd_not_supported); log_error(_cmd_not_supported);
return 0; return 0;
} }
static int _udevcookies(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) static int _udevcookies(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused)))
{ {
log_error(_cmd_not_supported); log_error(_cmd_not_supported);
@ -996,7 +996,7 @@ static int _set_up_udev_support(const char *dev_dir)
} }
static int _udevcreatecookie(int argc, char **argv, static int _udevcreatecookie(int argc, char **argv,
void *data __attribute((unused))) void *data __attribute__((unused)))
{ {
uint32_t cookie; uint32_t cookie;
@ -1010,7 +1010,7 @@ static int _udevcreatecookie(int argc, char **argv,
} }
static int _udevreleasecookie(int argc, char **argv, static int _udevreleasecookie(int argc, char **argv,
void *data __attribute((unused))) void *data __attribute__((unused)))
{ {
if (argv[1] && !(_udev_cookie = _get_cookie_value(argv[1]))) if (argv[1] && !(_udev_cookie = _get_cookie_value(argv[1])))
return 0; return 0;
@ -1051,7 +1051,7 @@ static char _yes_no_prompt(const char *prompt, ...)
return ret; return ret;
} }
static int _udevcomplete_all(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) static int _udevcomplete_all(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused)))
{ {
int max_id, id, sid; int max_id, id, sid;
struct seminfo sinfo; struct seminfo sinfo;
@ -1100,7 +1100,7 @@ static int _udevcomplete_all(int argc __attribute((unused)), char **argv __attri
return 1; return 1;
} }
static int _udevcookies(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) static int _udevcookies(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused)))
{ {
int max_id, id, sid; int max_id, id, sid;
struct seminfo sinfo; struct seminfo sinfo;
@ -1139,7 +1139,7 @@ static int _udevcookies(int argc __attribute((unused)), char **argv __attribute(
} }
#endif /* UDEV_SYNC_SUPPORT */ #endif /* UDEV_SYNC_SUPPORT */
static int _version(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) static int _version(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused)))
{ {
char version[80]; char version[80];
@ -1216,22 +1216,22 @@ static int _simple(int task, const char *name, uint32_t event_nr, int display)
return r; return r;
} }
static int _suspend(int argc, char **argv, void *data __attribute((unused))) static int _suspend(int argc, char **argv, void *data __attribute__((unused)))
{ {
return _simple(DM_DEVICE_SUSPEND, argc > 1 ? argv[1] : NULL, 0, 1); return _simple(DM_DEVICE_SUSPEND, argc > 1 ? argv[1] : NULL, 0, 1);
} }
static int _resume(int argc, char **argv, void *data __attribute((unused))) static int _resume(int argc, char **argv, void *data __attribute__((unused)))
{ {
return _simple(DM_DEVICE_RESUME, argc > 1 ? argv[1] : NULL, 0, 1); return _simple(DM_DEVICE_RESUME, argc > 1 ? argv[1] : NULL, 0, 1);
} }
static int _clear(int argc, char **argv, void *data __attribute((unused))) static int _clear(int argc, char **argv, void *data __attribute__((unused)))
{ {
return _simple(DM_DEVICE_CLEAR, argc > 1 ? argv[1] : NULL, 0, 1); return _simple(DM_DEVICE_CLEAR, argc > 1 ? argv[1] : NULL, 0, 1);
} }
static int _wait(int argc, char **argv, void *data __attribute((unused))) static int _wait(int argc, char **argv, void *data __attribute__((unused)))
{ {
const char *name = NULL; const char *name = NULL;
@ -1325,7 +1325,7 @@ static uint64_t _get_device_size(const char *name)
return size; return size;
} }
static int _error_device(int argc __attribute((unused)), char **argv __attribute((unused)), void *data) static int _error_device(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data)
{ {
struct dm_names *names = (struct dm_names *) data; struct dm_names *names = (struct dm_names *) data;
struct dm_task *dmt; struct dm_task *dmt;
@ -1373,7 +1373,7 @@ error:
return r; return r;
} }
static int _remove(int argc, char **argv, void *data __attribute((unused))) static int _remove(int argc, char **argv, void *data __attribute__((unused)))
{ {
int r; int r;
@ -1383,14 +1383,14 @@ static int _remove(int argc, char **argv, void *data __attribute((unused)))
return _simple(DM_DEVICE_REMOVE, argc > 1 ? argv[1] : NULL, 0, 0); return _simple(DM_DEVICE_REMOVE, argc > 1 ? argv[1] : NULL, 0, 0);
} }
static int _count_devices(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) static int _count_devices(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused)))
{ {
_num_devices++; _num_devices++;
return 1; return 1;
} }
static int _remove_all(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) static int _remove_all(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused)))
{ {
int r; int r;
@ -1428,7 +1428,7 @@ static void _display_dev(struct dm_task *dmt, const char *name)
printf("%s\t(%u, %u)\n", name, info.major, info.minor); printf("%s\t(%u, %u)\n", name, info.major, info.minor);
} }
static int _mknodes(int argc, char **argv, void *data __attribute((unused))) static int _mknodes(int argc, char **argv, void *data __attribute__((unused)))
{ {
return dm_mknodes(argc > 1 ? argv[1] : NULL); return dm_mknodes(argc > 1 ? argv[1] : NULL);
} }
@ -1599,7 +1599,7 @@ static int _status(int argc, char **argv, void *data)
} }
/* Show target names and their version numbers */ /* Show target names and their version numbers */
static int _targets(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) static int _targets(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused)))
{ {
int r = 0; int r = 0;
struct dm_task *dmt; struct dm_task *dmt;
@ -1739,7 +1739,7 @@ static int _deps(int argc, char **argv, void *data)
return r; return r;
} }
static int _display_name(int argc __attribute((unused)), char **argv __attribute((unused)), void *data) static int _display_name(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data)
{ {
struct dm_names *names = (struct dm_names *) data; struct dm_names *names = (struct dm_names *) data;
@ -1962,7 +1962,7 @@ static void _display_tree_attributes(struct dm_tree_node *node)
} }
static void _display_tree_node(struct dm_tree_node *node, unsigned depth, static void _display_tree_node(struct dm_tree_node *node, unsigned depth,
unsigned first_child __attribute((unused)), unsigned first_child __attribute__((unused)),
unsigned last_child, unsigned has_children) unsigned last_child, unsigned has_children)
{ {
int offset; int offset;
@ -2054,7 +2054,7 @@ static void _display_tree_walk_children(struct dm_tree_node *node,
} }
} }
static int _add_dep(int argc __attribute((unused)), char **argv __attribute((unused)), void *data) static int _add_dep(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data)
{ {
struct dm_names *names = (struct dm_names *) data; struct dm_names *names = (struct dm_names *) data;
@ -2081,9 +2081,9 @@ static int _build_whole_deptree(void)
return 1; return 1;
} }
static int _display_tree(int argc __attribute((unused)), static int _display_tree(int argc __attribute__((unused)),
char **argv __attribute((unused)), char **argv __attribute__((unused)),
void *data __attribute((unused))) void *data __attribute__((unused)))
{ {
if (!_build_whole_deptree()) if (!_build_whole_deptree())
return 0; return 0;
@ -2100,9 +2100,9 @@ static int _display_tree(int argc __attribute((unused)),
/* dm specific display functions */ /* dm specific display functions */
static int _int32_disp(struct dm_report *rh, static int _int32_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, const void *data, struct dm_report_field *field, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
const int32_t value = *(const int32_t *)data; const int32_t value = *(const int32_t *)data;
@ -2110,9 +2110,9 @@ static int _int32_disp(struct dm_report *rh,
} }
static int _uint32_disp(struct dm_report *rh, static int _uint32_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, const void *data, struct dm_report_field *field, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
const uint32_t value = *(const int32_t *)data; const uint32_t value = *(const int32_t *)data;
@ -2120,9 +2120,9 @@ static int _uint32_disp(struct dm_report *rh,
} }
static int _dm_name_disp(struct dm_report *rh, static int _dm_name_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, const void *data, struct dm_report_field *field, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
const char *name = dm_task_get_name((const struct dm_task *) data); const char *name = dm_task_get_name((const struct dm_task *) data);
@ -2130,9 +2130,9 @@ static int _dm_name_disp(struct dm_report *rh,
} }
static int _dm_uuid_disp(struct dm_report *rh, static int _dm_uuid_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, void *private __attribute((unused))) const void *data, void *private __attribute__((unused)))
{ {
const char *uuid = dm_task_get_uuid((const struct dm_task *) data); const char *uuid = dm_task_get_uuid((const struct dm_task *) data);
@ -2143,9 +2143,9 @@ static int _dm_uuid_disp(struct dm_report *rh,
} }
static int _dm_read_ahead_disp(struct dm_report *rh, static int _dm_read_ahead_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, const void *data, struct dm_report_field *field, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
uint32_t value; uint32_t value;
@ -2156,9 +2156,9 @@ static int _dm_read_ahead_disp(struct dm_report *rh,
} }
static int _dm_info_status_disp(struct dm_report *rh, static int _dm_info_status_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, const void *data, struct dm_report_field *field, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
char buf[5]; char buf[5];
const char *s = buf; const char *s = buf;
@ -2174,10 +2174,10 @@ static int _dm_info_status_disp(struct dm_report *rh,
} }
static int _dm_info_table_loaded_disp(struct dm_report *rh, static int _dm_info_table_loaded_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
const struct dm_info *info = data; const struct dm_info *info = data;
@ -2198,10 +2198,10 @@ static int _dm_info_table_loaded_disp(struct dm_report *rh,
} }
static int _dm_info_suspended_disp(struct dm_report *rh, static int _dm_info_suspended_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
const struct dm_info *info = data; const struct dm_info *info = data;
@ -2214,10 +2214,10 @@ static int _dm_info_suspended_disp(struct dm_report *rh,
} }
static int _dm_info_read_only_disp(struct dm_report *rh, static int _dm_info_read_only_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, struct dm_report_field *field,
const void *data, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
const struct dm_info *info = data; const struct dm_info *info = data;
@ -2431,35 +2431,35 @@ static int _dm_deps_disp(struct dm_report *rh, struct dm_pool *mem,
} }
static int _dm_subsystem_disp(struct dm_report *rh, static int _dm_subsystem_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, const void *data, struct dm_report_field *field, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
return dm_report_field_string(rh, field, (const char **) data); return dm_report_field_string(rh, field, (const char **) data);
} }
static int _dm_vg_name_disp(struct dm_report *rh, static int _dm_vg_name_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, const void *data, struct dm_report_field *field, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
return dm_report_field_string(rh, field, (const char **) data); return dm_report_field_string(rh, field, (const char **) data);
} }
static int _dm_lv_name_disp(struct dm_report *rh, static int _dm_lv_name_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, const void *data, struct dm_report_field *field, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
return dm_report_field_string(rh, field, (const char **) data); return dm_report_field_string(rh, field, (const char **) data);
} }
static int _dm_lv_layer_name_disp(struct dm_report *rh, static int _dm_lv_layer_name_disp(struct dm_report *rh,
struct dm_pool *mem __attribute((unused)), struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, const void *data, struct dm_report_field *field, const void *data,
void *private __attribute((unused))) void *private __attribute__((unused)))
{ {
return dm_report_field_string(rh, field, (const char **) data); return dm_report_field_string(rh, field, (const char **) data);
@ -2743,9 +2743,9 @@ static void _losetup_usage(FILE *out)
"[-o offset] [-f|loop_device] [file]\n\n"); "[-o offset] [-f|loop_device] [file]\n\n");
} }
static int _help(int argc __attribute((unused)), static int _help(int argc __attribute__((unused)),
char **argv __attribute((unused)), char **argv __attribute__((unused)),
void *data __attribute((unused))) void *data __attribute__((unused)))
{ {
_usage(stderr); _usage(stderr);
@ -2899,7 +2899,7 @@ error:
* create a table for a mapped device using the loop target. * create a table for a mapped device using the loop target.
*/ */
static int _loop_table(char *table, size_t tlen, char *file, static int _loop_table(char *table, size_t tlen, char *file,
char *dev __attribute((unused)), off_t off) char *dev __attribute__((unused)), off_t off)
{ {
struct stat fbuf; struct stat fbuf;
off_t size, sectors; off_t size, sectors;

View File

@ -15,8 +15,8 @@
#include "tools.h" #include "tools.h"
int formats(struct cmd_context *cmd, int argc __attribute((unused)), int formats(struct cmd_context *cmd, int argc __attribute__((unused)),
char **argv __attribute((unused))) char **argv __attribute__((unused)))
{ {
display_formats(cmd); display_formats(cmd);

View File

@ -515,7 +515,7 @@ static int lvchange_tag(struct cmd_context *cmd, struct logical_volume *lv,
} }
static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv, static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
int doit = 0, docmds = 0; int doit = 0, docmds = 0;
int dmeventd_mode, archived = 0; int dmeventd_mode, archived = 0;

View File

@ -326,7 +326,7 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
static struct volume_group *_get_lvconvert_vg(struct cmd_context *cmd, static struct volume_group *_get_lvconvert_vg(struct cmd_context *cmd,
const char *name, const char *name,
const char *uuid __attribute((unused))) const char *uuid __attribute__((unused)))
{ {
dev_close_all(); dev_close_all();
@ -338,11 +338,11 @@ static struct volume_group *_get_lvconvert_vg(struct cmd_context *cmd,
NULL, 0); NULL, 0);
} }
static struct logical_volume *_get_lvconvert_lv(struct cmd_context *cmd __attribute((unused)), static struct logical_volume *_get_lvconvert_lv(struct cmd_context *cmd __attribute__((unused)),
struct volume_group *vg, struct volume_group *vg,
const char *name, const char *name,
const char *uuid, const char *uuid,
uint32_t lv_type __attribute((unused))) uint32_t lv_type __attribute__((unused)))
{ {
struct logical_volume *lv = find_lv(vg, name); struct logical_volume *lv = find_lv(vg, name);
@ -355,7 +355,7 @@ static struct logical_volume *_get_lvconvert_lv(struct cmd_context *cmd __attrib
static int _finish_lvconvert_mirror(struct cmd_context *cmd, static int _finish_lvconvert_mirror(struct cmd_context *cmd,
struct volume_group *vg, struct volume_group *vg,
struct logical_volume *lv, struct logical_volume *lv,
struct dm_list *lvs_changed __attribute((unused))) struct dm_list *lvs_changed __attribute__((unused)))
{ {
int r = 0; int r = 0;
@ -402,7 +402,7 @@ out:
static int _finish_lvconvert_merge(struct cmd_context *cmd, static int _finish_lvconvert_merge(struct cmd_context *cmd,
struct volume_group *vg, struct volume_group *vg,
struct logical_volume *lv, struct logical_volume *lv,
struct dm_list *lvs_changed __attribute((unused))) struct dm_list *lvs_changed __attribute__((unused)))
{ {
struct lv_segment *snap_seg = find_merging_cow(lv); struct lv_segment *snap_seg = find_merging_cow(lv);
if (!snap_seg) { if (!snap_seg) {
@ -422,7 +422,7 @@ static int _finish_lvconvert_merge(struct cmd_context *cmd,
static progress_t _poll_merge_progress(struct cmd_context *cmd, static progress_t _poll_merge_progress(struct cmd_context *cmd,
struct logical_volume *lv, struct logical_volume *lv,
const char *name __attribute((unused)), const char *name __attribute__((unused)),
struct daemon_parms *parms) struct daemon_parms *parms)
{ {
float percent = 0.0; float percent = 0.0;
@ -605,7 +605,7 @@ static struct dm_list *_failed_pv_list(struct volume_group *vg)
} }
static int _is_partial_lv(struct logical_volume *lv, static int _is_partial_lv(struct logical_volume *lv,
void *baton __attribute((unused))) void *baton __attribute__((unused)))
{ {
return lv->status & PARTIAL_LV; return lv->status & PARTIAL_LV;
} }

View File

@ -236,7 +236,7 @@ static int _read_size_params(struct lvcreate_params *lp,
* Generic mirror parameter checks. * Generic mirror parameter checks.
* FIXME: Should eventually be moved into lvm library. * FIXME: Should eventually be moved into lvm library.
*/ */
static int _validate_mirror_params(const struct cmd_context *cmd __attribute((unused)), static int _validate_mirror_params(const struct cmd_context *cmd __attribute__((unused)),
const struct lvcreate_params *lp) const struct lvcreate_params *lp)
{ {
int pagesize = lvm_getpagesize(); int pagesize = lvm_getpagesize();

View File

@ -22,8 +22,8 @@ int main(int argc, char **argv)
return lvm2_main(argc, argv); return lvm2_main(argc, argv);
} }
int lvm_shell(struct cmd_context *cmd __attribute((unused)), int lvm_shell(struct cmd_context *cmd __attribute__((unused)),
struct cmdline_context *cmdline __attribute((unused))) struct cmdline_context *cmdline __attribute__((unused)))
{ {
return 0; return 0;
} }

View File

@ -122,7 +122,7 @@ static char *_list_args(const char *text, int state)
/* Custom completion function */ /* Custom completion function */
static char **_completion(const char *text, int start_pos, static char **_completion(const char *text, int start_pos,
int end_pos __attribute((unused))) int end_pos __attribute__((unused)))
{ {
char **match_list = NULL; char **match_list = NULL;
int p = 0; int p = 0;

View File

@ -20,8 +20,8 @@ void *lvm2_init(void)
return cmdlib_lvm2_init(0); return cmdlib_lvm2_init(0);
} }
int lvm_shell(struct cmd_context *cmd __attribute((unused)), int lvm_shell(struct cmd_context *cmd __attribute__((unused)),
struct cmdline_context *cmdline __attribute((unused))) struct cmdline_context *cmdline __attribute__((unused)))
{ {
return 0; return 0;
} }

View File

@ -15,8 +15,8 @@
#include "tools.h" #include "tools.h"
int lvmchange(struct cmd_context *cmd __attribute((unused)), int lvmchange(struct cmd_context *cmd __attribute__((unused)),
int argc __attribute((unused)), char **argv __attribute((unused))) int argc __attribute__((unused)), char **argv __attribute__((unused)))
{ {
log_error("With LVM2 and the device mapper, this program is obsolete."); log_error("With LVM2 and the device mapper, this program is obsolete.");
return ECMD_FAILED; return ECMD_FAILED;

View File

@ -60,7 +60,7 @@ static struct cmdline_context _cmdline;
/* Command line args */ /* Command line args */
/* FIXME: Move static _the_args into cmd? */ /* FIXME: Move static _the_args into cmd? */
unsigned arg_count(const struct cmd_context *cmd __attribute((unused)), int a) unsigned arg_count(const struct cmd_context *cmd __attribute__((unused)), int a)
{ {
return _the_args[a].count; return _the_args[a].count;
} }
@ -70,7 +70,7 @@ unsigned arg_is_set(const struct cmd_context *cmd, int a)
return arg_count(cmd, a) ? 1 : 0; return arg_count(cmd, a) ? 1 : 0;
} }
const char *arg_value(struct cmd_context *cmd __attribute((unused)), int a) const char *arg_value(struct cmd_context *cmd __attribute__((unused)), int a)
{ {
return _the_args[a].value; return _the_args[a].value;
} }
@ -117,12 +117,12 @@ percent_t arg_percent_value(struct cmd_context *cmd, int a, const percent_t def)
return arg_count(cmd, a) ? _the_args[a].percent : def; return arg_count(cmd, a) ? _the_args[a].percent : def;
} }
int arg_count_increment(struct cmd_context *cmd __attribute((unused)), int a) int arg_count_increment(struct cmd_context *cmd __attribute__((unused)), int a)
{ {
return _the_args[a].count++; return _the_args[a].count++;
} }
int yes_no_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) int yes_no_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a)
{ {
a->sign = SIGN_NONE; a->sign = SIGN_NONE;
a->percent = PERCENT_NONE; a->percent = PERCENT_NONE;
@ -143,7 +143,7 @@ int yes_no_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a)
return 1; return 1;
} }
int yes_no_excl_arg(struct cmd_context *cmd __attribute((unused)), int yes_no_excl_arg(struct cmd_context *cmd __attribute__((unused)),
struct arg *a) struct arg *a)
{ {
a->sign = SIGN_NONE; a->sign = SIGN_NONE;
@ -225,7 +225,7 @@ static int _get_int_arg(struct arg *a, char **ptr)
} }
/* Size stored in sectors */ /* Size stored in sectors */
static int _size_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a, int factor) static int _size_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a, int factor)
{ {
char *ptr; char *ptr;
int i; int i;
@ -307,7 +307,7 @@ int size_mb_arg(struct cmd_context *cmd, struct arg *a)
return _size_arg(cmd, a, 2048); return _size_arg(cmd, a, 2048);
} }
int int_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) int int_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a)
{ {
char *ptr; char *ptr;
@ -317,7 +317,7 @@ int int_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a)
return 1; return 1;
} }
int int_arg_with_sign(struct cmd_context *cmd __attribute((unused)), struct arg *a) int int_arg_with_sign(struct cmd_context *cmd __attribute__((unused)), struct arg *a)
{ {
char *ptr; char *ptr;
@ -327,7 +327,7 @@ int int_arg_with_sign(struct cmd_context *cmd __attribute((unused)), struct arg
return 1; return 1;
} }
int int_arg_with_sign_and_percent(struct cmd_context *cmd __attribute((unused)), int int_arg_with_sign_and_percent(struct cmd_context *cmd __attribute__((unused)),
struct arg *a) struct arg *a)
{ {
char *ptr; char *ptr;
@ -360,7 +360,7 @@ int int_arg_with_sign_and_percent(struct cmd_context *cmd __attribute((unused)),
return 1; return 1;
} }
int minor_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) int minor_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a)
{ {
char *ptr; char *ptr;
@ -375,7 +375,7 @@ int minor_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a)
return 1; return 1;
} }
int major_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) int major_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a)
{ {
char *ptr; char *ptr;
@ -392,13 +392,13 @@ int major_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a)
return 1; return 1;
} }
int string_arg(struct cmd_context *cmd __attribute((unused)), int string_arg(struct cmd_context *cmd __attribute__((unused)),
struct arg *a __attribute((unused))) struct arg *a __attribute__((unused)))
{ {
return 1; return 1;
} }
int tag_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) int tag_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a)
{ {
char *pos = a->value; char *pos = a->value;
@ -413,7 +413,7 @@ int tag_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a)
return 1; return 1;
} }
int permission_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) int permission_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a)
{ {
a->sign = SIGN_NONE; a->sign = SIGN_NONE;
@ -429,7 +429,7 @@ int permission_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a)
return 1; return 1;
} }
int alloc_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) int alloc_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a)
{ {
alloc_policy_t alloc; alloc_policy_t alloc;
@ -452,7 +452,7 @@ int segtype_arg(struct cmd_context *cmd, struct arg *a)
/* /*
* Positive integer, zero or "auto". * Positive integer, zero or "auto".
*/ */
int readahead_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) int readahead_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a)
{ {
if (!strcasecmp(a->value, "auto")) { if (!strcasecmp(a->value, "auto")) {
a->ui_value = DM_READ_AHEAD_AUTO; a->ui_value = DM_READ_AHEAD_AUTO;
@ -476,7 +476,7 @@ int readahead_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a)
/* /*
* Non-zero, positive integer, "all", or "unmanaged" * Non-zero, positive integer, "all", or "unmanaged"
*/ */
int metadatacopies_arg(struct cmd_context *cmd __attribute((unused)), int metadatacopies_arg(struct cmd_context *cmd __attribute__((unused)),
struct arg *a) struct arg *a)
{ {
if (!strncmp(cmd->command->name, "vg", 2)) { if (!strncmp(cmd->command->name, "vg", 2)) {
@ -763,9 +763,9 @@ static int _merge_synonym(struct cmd_context *cmd, int oldarg, int newarg)
return 1; return 1;
} }
int version(struct cmd_context *cmd __attribute((unused)), int version(struct cmd_context *cmd __attribute__((unused)),
int argc __attribute((unused)), int argc __attribute__((unused)),
char **argv __attribute((unused))) char **argv __attribute__((unused)))
{ {
char vsn[80]; char vsn[80];
@ -890,7 +890,7 @@ static void _display_help(void)
} }
} }
int help(struct cmd_context *cmd __attribute((unused)), int argc, char **argv) int help(struct cmd_context *cmd __attribute__((unused)), int argc, char **argv)
{ {
int ret = ECMD_PROCESSED; int ret = ECMD_PROCESSED;

View File

@ -91,8 +91,8 @@ static int _check_device(struct cmd_context *cmd, struct device *dev)
return 1; return 1;
} }
int lvmdiskscan(struct cmd_context *cmd, int argc __attribute((unused)), int lvmdiskscan(struct cmd_context *cmd, int argc __attribute__((unused)),
char **argv __attribute((unused))) char **argv __attribute__((unused)))
{ {
uint64_t size; uint64_t size;
struct dev_iter *iter; struct dev_iter *iter;

View File

@ -16,7 +16,7 @@
#include "tools.h" #include "tools.h"
static int lvremove_single(struct cmd_context *cmd, struct logical_volume *lv, static int lvremove_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
struct logical_volume *origin; struct logical_volume *origin;

View File

@ -16,7 +16,7 @@
#include "tools.h" #include "tools.h"
static int lvscan_single(struct cmd_context *cmd, struct logical_volume *lv, static int lvscan_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
struct lvinfo info; struct lvinfo info;
int lv_total = 0; int lv_total = 0;

View File

@ -19,7 +19,7 @@
#include <signal.h> #include <signal.h>
#include <sys/wait.h> #include <sys/wait.h>
static void _sigchld_handler(int sig __attribute((unused))) static void _sigchld_handler(int sig __attribute__((unused)))
{ {
while (wait4(-1, NULL, WNOHANG | WUNTRACED, NULL) > 0) ; while (wait4(-1, NULL, WNOHANG | WUNTRACED, NULL) > 0) ;
} }

View File

@ -19,7 +19,7 @@
static int _pvchange_single(struct cmd_context *cmd, struct volume_group *vg, static int _pvchange_single(struct cmd_context *cmd, struct volume_group *vg,
struct physical_volume *pv, struct physical_volume *pv,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
uint32_t orig_pe_alloc_count; uint32_t orig_pe_alloc_count;
/* FIXME Next three only required for format1. */ /* FIXME Next three only required for format1. */
@ -29,7 +29,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct volume_group *vg,
const char *pv_name = pv_dev_name(pv); const char *pv_name = pv_dev_name(pv);
const char *tag = NULL; const char *tag = NULL;
const char *orig_vg_name; const char *orig_vg_name;
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
int allocatable = 0; int allocatable = 0;
int tagarg = 0; int tagarg = 0;

View File

@ -596,7 +596,7 @@ static int _finish_pvmove(struct cmd_context *cmd, struct volume_group *vg,
static struct volume_group *_get_move_vg(struct cmd_context *cmd, static struct volume_group *_get_move_vg(struct cmd_context *cmd,
const char *name, const char *name,
const char *uuid __attribute((unused))) const char *uuid __attribute__((unused)))
{ {
struct physical_volume *pv; struct physical_volume *pv;

View File

@ -90,7 +90,7 @@ static int pvremove_check(struct cmd_context *cmd, const char *name)
} }
static int pvremove_single(struct cmd_context *cmd, const char *pv_name, static int pvremove_single(struct cmd_context *cmd, const char *pv_name,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
struct device *dev; struct device *dev;
int ret = ECMD_FAILED; int ret = ECMD_FAILED;

View File

@ -20,9 +20,9 @@ int vg_max_name_len = 0;
static void _pvscan_display_single(struct cmd_context *cmd, static void _pvscan_display_single(struct cmd_context *cmd,
struct physical_volume *pv, struct physical_volume *pv,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
unsigned vg_name_len = 0; unsigned vg_name_len = 0;
char pv_tmp_name[NAME_LEN] = { 0, }; char pv_tmp_name[NAME_LEN] = { 0, };
@ -96,8 +96,8 @@ static void _pvscan_display_single(struct cmd_context *cmd,
pv_pe_size(pv))); pv_pe_size(pv)));
} }
int pvscan(struct cmd_context *cmd, int argc __attribute((unused)), int pvscan(struct cmd_context *cmd, int argc __attribute__((unused)),
char **argv __attribute((unused))) char **argv __attribute__((unused)))
{ {
int new_pvs_found = 0; int new_pvs_found = 0;
int pvs_found = 0; int pvs_found = 0;

View File

@ -16,7 +16,7 @@
#include "tools.h" #include "tools.h"
#include "report.h" #include "report.h"
static int _vgs_single(struct cmd_context *cmd __attribute((unused)), static int _vgs_single(struct cmd_context *cmd __attribute__((unused)),
const char *vg_name, struct volume_group *vg, const char *vg_name, struct volume_group *vg,
void *handle) void *handle)
{ {
@ -41,7 +41,7 @@ static int _lvs_single(struct cmd_context *cmd, struct logical_volume *lv,
return ECMD_PROCESSED; return ECMD_PROCESSED;
} }
static int _segs_single(struct cmd_context *cmd __attribute((unused)), static int _segs_single(struct cmd_context *cmd __attribute__((unused)),
struct lv_segment *seg, void *handle) struct lv_segment *seg, void *handle)
{ {
if (!report_object(handle, seg->lv->vg, seg->lv, NULL, seg, NULL)) { if (!report_object(handle, seg->lv->vg, seg->lv, NULL, seg, NULL)) {
@ -133,7 +133,7 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
int ret = ECMD_PROCESSED; int ret = ECMD_PROCESSED;
const char *vg_name = NULL; const char *vg_name = NULL;
struct volume_group *old_vg = vg; struct volume_group *old_vg = vg;
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
if (is_pv(pv) && !is_orphan(pv) && !vg) { if (is_pv(pv) && !is_orphan(pv) && !vg) {
vg_name = pv_vg_name(pv); vg_name = pv_vg_name(pv);

View File

@ -15,8 +15,8 @@
#include "tools.h" #include "tools.h"
int segtypes(struct cmd_context *cmd, int argc __attribute((unused)), int segtypes(struct cmd_context *cmd, int argc __attribute__((unused)),
char **argv __attribute((unused))) char **argv __attribute__((unused)))
{ {
display_segtypes(cmd); display_segtypes(cmd);

View File

@ -17,23 +17,23 @@
log_error("Command not implemented yet."); return ECMD_FAILED log_error("Command not implemented yet."); return ECMD_FAILED
/*int e2fsadm(struct cmd_context *cmd, int argc, char **argv) unimplemented*/ /*int e2fsadm(struct cmd_context *cmd, int argc, char **argv) unimplemented*/
int lvmsadc(struct cmd_context *cmd __attribute((unused)), int lvmsadc(struct cmd_context *cmd __attribute__((unused)),
int argc __attribute((unused)), int argc __attribute__((unused)),
char **argv __attribute((unused))) char **argv __attribute__((unused)))
{ {
unimplemented; unimplemented;
} }
int lvmsar(struct cmd_context *cmd __attribute((unused)), int lvmsar(struct cmd_context *cmd __attribute__((unused)),
int argc __attribute((unused)), int argc __attribute__((unused)),
char **argv __attribute((unused))) char **argv __attribute__((unused)))
{ {
unimplemented; unimplemented;
} }
int pvdata(struct cmd_context *cmd __attribute((unused)), int pvdata(struct cmd_context *cmd __attribute__((unused)),
int argc __attribute((unused)), int argc __attribute__((unused)),
char **argv __attribute((unused))) char **argv __attribute__((unused)))
{ {
log_error("There's no 'pvdata' command in LVM2."); log_error("There's no 'pvdata' command in LVM2.");
log_error("Use lvs, pvs, vgs instead; or use vgcfgbackup and read the text file backup."); log_error("Use lvs, pvs, vgs instead; or use vgcfgbackup and read the text file backup.");

View File

@ -152,7 +152,7 @@ int units_arg(struct cmd_context *cmd, struct arg *a);
int segtype_arg(struct cmd_context *cmd, struct arg *a); int segtype_arg(struct cmd_context *cmd, struct arg *a);
int alloc_arg(struct cmd_context *cmd, struct arg *a); int alloc_arg(struct cmd_context *cmd, struct arg *a);
int readahead_arg(struct cmd_context *cmd, struct arg *a); int readahead_arg(struct cmd_context *cmd, struct arg *a);
int metadatacopies_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a); int metadatacopies_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a);
/* we use the enums to access the switches */ /* we use the enums to access the switches */
unsigned arg_count(const struct cmd_context *cmd, int a); unsigned arg_count(const struct cmd_context *cmd, int a);

View File

@ -476,7 +476,7 @@ static int _vgchange_tag(struct cmd_context *cmd, struct volume_group *vg,
return ECMD_PROCESSED; return ECMD_PROCESSED;
} }
static int _vgchange_uuid(struct cmd_context *cmd __attribute((unused)), static int _vgchange_uuid(struct cmd_context *cmd __attribute__((unused)),
struct volume_group *vg) struct volume_group *vg)
{ {
struct lv_list *lvl; struct lv_list *lvl;
@ -564,7 +564,7 @@ static int _vgchange_metadata_copies(struct cmd_context *cmd,
static int vgchange_single(struct cmd_context *cmd, const char *vg_name, static int vgchange_single(struct cmd_context *cmd, const char *vg_name,
struct volume_group *vg, struct volume_group *vg,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
int dmeventd_mode, r = ECMD_FAILED; int dmeventd_mode, r = ECMD_FAILED;

View File

@ -16,10 +16,10 @@
#include "tools.h" #include "tools.h"
#include "metadata.h" #include "metadata.h"
static int vgck_single(struct cmd_context *cmd __attribute((unused)), static int vgck_single(struct cmd_context *cmd __attribute__((unused)),
const char *vg_name, const char *vg_name,
struct volume_group *vg, struct volume_group *vg,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
if (!vg_check_status(vg, EXPORTED_VG)) { if (!vg_check_status(vg, EXPORTED_VG)) {
stack; stack;

View File

@ -17,7 +17,7 @@
static int vgconvert_single(struct cmd_context *cmd, const char *vg_name, static int vgconvert_single(struct cmd_context *cmd, const char *vg_name,
struct volume_group *vg, struct volume_group *vg,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
struct physical_volume *pv, *existing_pv; struct physical_volume *pv, *existing_pv;
struct logical_volume *lv; struct logical_volume *lv;

View File

@ -17,7 +17,7 @@
static int vgdisplay_single(struct cmd_context *cmd, const char *vg_name, static int vgdisplay_single(struct cmd_context *cmd, const char *vg_name,
struct volume_group *vg, struct volume_group *vg,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
/* FIXME Do the active check here if activevolumegroups_ARG ? */ /* FIXME Do the active check here if activevolumegroups_ARG ? */
vg_check_status(vg, EXPORTED_VG); vg_check_status(vg, EXPORTED_VG);

View File

@ -15,10 +15,10 @@
#include "tools.h" #include "tools.h"
static int vgexport_single(struct cmd_context *cmd __attribute((unused)), static int vgexport_single(struct cmd_context *cmd __attribute__((unused)),
const char *vg_name, const char *vg_name,
struct volume_group *vg, struct volume_group *vg,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
struct pv_list *pvl; struct pv_list *pvl;
struct physical_volume *pv; struct physical_volume *pv;

View File

@ -15,10 +15,10 @@
#include "tools.h" #include "tools.h"
static int vgimport_single(struct cmd_context *cmd __attribute((unused)), static int vgimport_single(struct cmd_context *cmd __attribute__((unused)),
const char *vg_name, const char *vg_name,
struct volume_group *vg, struct volume_group *vg,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
struct pv_list *pvl; struct pv_list *pvl;
struct physical_volume *pv; struct physical_volume *pv;

View File

@ -92,7 +92,7 @@ static int _vgmerge_single(struct cmd_context *cmd, const char *vg_name_to,
/* Fix up LVIDs */ /* Fix up LVIDs */
dm_list_iterate_items(lvl1, &vg_to->lvs) { dm_list_iterate_items(lvl1, &vg_to->lvs) {
union lvid *lvid1 = &lvl1->lv->lvid; union lvid *lvid1 = &lvl1->lv->lvid;
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
dm_list_iterate_items(lvl2, &vg_from->lvs) { dm_list_iterate_items(lvl2, &vg_from->lvs) {
union lvid *lvid2 = &lvl2->lv->lvid; union lvid *lvid2 = &lvl2->lv->lvid;

View File

@ -16,7 +16,7 @@
#include "tools.h" #include "tools.h"
static int _vgmknodes_single(struct cmd_context *cmd, struct logical_volume *lv, static int _vgmknodes_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
if (arg_count(cmd, refresh_ARG) && lv_is_visible(lv)) if (arg_count(cmd, refresh_ARG) && lv_is_visible(lv))
if (!lv_refresh(cmd, lv)) { if (!lv_refresh(cmd, lv)) {

View File

@ -18,7 +18,7 @@
static int _remove_pv(struct volume_group *vg, struct pv_list *pvl, int silent) static int _remove_pv(struct volume_group *vg, struct pv_list *pvl, int silent)
{ {
char uuid[64] __attribute((aligned(8))); char uuid[64] __attribute__((aligned(8)));
if (vg->pv_count == 1) { if (vg->pv_count == 1) {
log_error("Volume Groups must always contain at least one PV"); log_error("Volume Groups must always contain at least one PV");
@ -376,7 +376,7 @@ static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg)
/* Or take pv_name instead? */ /* Or take pv_name instead? */
static int _vgreduce_single(struct cmd_context *cmd, struct volume_group *vg, static int _vgreduce_single(struct cmd_context *cmd, struct volume_group *vg,
struct physical_volume *pv, struct physical_volume *pv,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
struct pv_list *pvl; struct pv_list *pvl;
struct volume_group *orphan_vg = NULL; struct volume_group *orphan_vg = NULL;

View File

@ -17,7 +17,7 @@
static int vgremove_single(struct cmd_context *cmd, const char *vg_name, static int vgremove_single(struct cmd_context *cmd, const char *vg_name,
struct volume_group *vg, struct volume_group *vg,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
unsigned lv_count, missing; unsigned lv_count, missing;
force_t force; force_t force;

View File

@ -17,7 +17,7 @@
static int vgscan_single(struct cmd_context *cmd, const char *vg_name, static int vgscan_single(struct cmd_context *cmd, const char *vg_name,
struct volume_group *vg, struct volume_group *vg,
void *handle __attribute((unused))) void *handle __attribute__((unused)))
{ {
log_print("Found %svolume group \"%s\" using metadata type %s", log_print("Found %svolume group \"%s\" using metadata type %s",
vg_is_exported(vg) ? "exported " : "", vg_name, vg_is_exported(vg) ? "exported " : "", vg_name,