diff options
author | Alasdair Kergon <agk@redhat.com> | 2010-07-09 15:34:40 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2010-07-09 15:34:40 +0000 |
commit | 08f1ddea6c5d3679fe44e8fef73e8c8f3b11d705 (patch) | |
tree | 71a0e07016fc9b9e447521ace11040c052cdfcd2 /tools | |
parent | 3e404aea3a8aef79d8e8b39743f55efc8f7bca04 (diff) | |
download | lvm2-08f1ddea6c5d3679fe44e8fef73e8c8f3b11d705.tar.gz lvm2-08f1ddea6c5d3679fe44e8fef73e8c8f3b11d705.tar.xz lvm2-08f1ddea6c5d3679fe44e8fef73e8c8f3b11d705.zip |
Use __attribute__ consistently throughout.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dmsetup.c | 126 | ||||
-rw-r--r-- | tools/formats.c | 4 | ||||
-rw-r--r-- | tools/lvchange.c | 2 | ||||
-rw-r--r-- | tools/lvconvert.c | 14 | ||||
-rw-r--r-- | tools/lvcreate.c | 2 | ||||
-rw-r--r-- | tools/lvm-static.c | 4 | ||||
-rw-r--r-- | tools/lvm.c | 2 | ||||
-rw-r--r-- | tools/lvm2cmd.c | 4 | ||||
-rw-r--r-- | tools/lvmchange.c | 4 | ||||
-rw-r--r-- | tools/lvmcmdline.c | 44 | ||||
-rw-r--r-- | tools/lvmdiskscan.c | 4 | ||||
-rw-r--r-- | tools/lvremove.c | 2 | ||||
-rw-r--r-- | tools/lvscan.c | 2 | ||||
-rw-r--r-- | tools/polldaemon.c | 2 | ||||
-rw-r--r-- | tools/pvchange.c | 4 | ||||
-rw-r--r-- | tools/pvmove.c | 2 | ||||
-rw-r--r-- | tools/pvremove.c | 2 | ||||
-rw-r--r-- | tools/pvscan.c | 8 | ||||
-rw-r--r-- | tools/reporter.c | 6 | ||||
-rw-r--r-- | tools/segtypes.c | 4 | ||||
-rw-r--r-- | tools/stub.h | 18 | ||||
-rw-r--r-- | tools/tools.h | 2 | ||||
-rw-r--r-- | tools/vgchange.c | 4 | ||||
-rw-r--r-- | tools/vgck.c | 4 | ||||
-rw-r--r-- | tools/vgconvert.c | 2 | ||||
-rw-r--r-- | tools/vgdisplay.c | 2 | ||||
-rw-r--r-- | tools/vgexport.c | 4 | ||||
-rw-r--r-- | tools/vgimport.c | 4 | ||||
-rw-r--r-- | tools/vgmerge.c | 2 | ||||
-rw-r--r-- | tools/vgmknodes.c | 2 | ||||
-rw-r--r-- | tools/vgreduce.c | 4 | ||||
-rw-r--r-- | tools/vgremove.c | 2 | ||||
-rw-r--r-- | tools/vgscan.c | 2 |
33 files changed, 147 insertions, 147 deletions
diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 5e71542a..10b9e0bd 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -502,7 +502,7 @@ static int _set_task_device(struct dm_task *dmt, const char *name, int optional) 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; struct dm_task *dmt; @@ -562,7 +562,7 @@ static int _load(int argc, char **argv, void *data __attribute((unused))) 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; struct dm_task *dmt; @@ -644,7 +644,7 @@ static int _create(int argc, char **argv, void *data __attribute((unused))) 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; struct dm_task *dmt; @@ -691,7 +691,7 @@ static int _rename(int argc, char **argv, void *data __attribute((unused))) 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; size_t sz = 1; @@ -758,7 +758,7 @@ static int _message(int argc, char **argv, void *data __attribute((unused))) 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; struct dm_task *dmt; @@ -797,7 +797,7 @@ static int _setgeometry(int argc, char **argv, void *data __attribute((unused))) 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; int r = 1; @@ -831,7 +831,7 @@ static uint32_t _get_cookie_value(const char *str_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; uint16_t flags; @@ -873,7 +873,7 @@ static int _udevflags(int args, char **argv, void *data __attribute((unused))) 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; @@ -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 int _udevcreatecookie(int argc, char **argv, - void *data __attribute((unused))) + void *data __attribute__((unused))) { log_error(_cmd_not_supported); @@ -907,21 +907,21 @@ static int _udevcreatecookie(int argc, char **argv, } static int _udevreleasecookie(int argc, char **argv, - void *data __attribute((unused))) + void *data __attribute__((unused))) { log_error(_cmd_not_supported); 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); 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); @@ -996,7 +996,7 @@ static int _set_up_udev_support(const char *dev_dir) } static int _udevcreatecookie(int argc, char **argv, - void *data __attribute((unused))) + void *data __attribute__((unused))) { uint32_t cookie; @@ -1010,7 +1010,7 @@ static int _udevcreatecookie(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]))) return 0; @@ -1051,7 +1051,7 @@ static char _yes_no_prompt(const char *prompt, ...) 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; struct seminfo sinfo; @@ -1100,7 +1100,7 @@ static int _udevcomplete_all(int argc __attribute((unused)), char **argv __attri 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; struct seminfo sinfo; @@ -1139,7 +1139,7 @@ static int _udevcookies(int argc __attribute((unused)), char **argv __attribute( } #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]; @@ -1216,22 +1216,22 @@ static int _simple(int task, const char *name, uint32_t event_nr, int display) 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); } -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); } -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); } -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; @@ -1325,7 +1325,7 @@ static uint64_t _get_device_size(const char *name) 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_task *dmt; @@ -1373,7 +1373,7 @@ error: 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; @@ -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); } -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++; 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; @@ -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); } -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); } @@ -1599,7 +1599,7 @@ static int _status(int argc, char **argv, void *data) } /* 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; struct dm_task *dmt; @@ -1739,7 +1739,7 @@ static int _deps(int argc, char **argv, void *data) 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; @@ -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, - unsigned first_child __attribute((unused)), + unsigned first_child __attribute__((unused)), unsigned last_child, unsigned has_children) { 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; @@ -2081,9 +2081,9 @@ static int _build_whole_deptree(void) return 1; } -static int _display_tree(int argc __attribute((unused)), - char **argv __attribute((unused)), - void *data __attribute((unused))) +static int _display_tree(int argc __attribute__((unused)), + char **argv __attribute__((unused)), + void *data __attribute__((unused))) { if (!_build_whole_deptree()) return 0; @@ -2100,9 +2100,9 @@ static int _display_tree(int argc __attribute((unused)), /* dm specific display functions */ 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, - void *private __attribute((unused))) + void *private __attribute__((unused))) { 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, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { 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, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), 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); @@ -2130,9 +2130,9 @@ static int _dm_name_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, - 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); @@ -2143,9 +2143,9 @@ static int _dm_uuid_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, - void *private __attribute((unused))) + void *private __attribute__((unused))) { 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, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { char buf[5]; 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, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { 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, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { 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, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { 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, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), 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); } 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, - void *private __attribute((unused))) + void *private __attribute__((unused))) { return dm_report_field_string(rh, field, (const char **) data); } 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, - void *private __attribute((unused))) + void *private __attribute__((unused))) { return dm_report_field_string(rh, field, (const char **) data); } 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, - void *private __attribute((unused))) + void *private __attribute__((unused))) { 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"); } -static int _help(int argc __attribute((unused)), - char **argv __attribute((unused)), - void *data __attribute((unused))) +static int _help(int argc __attribute__((unused)), + char **argv __attribute__((unused)), + void *data __attribute__((unused))) { _usage(stderr); @@ -2899,7 +2899,7 @@ error: * create a table for a mapped device using the loop target. */ 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; off_t size, sectors; diff --git a/tools/formats.c b/tools/formats.c index 9442eaee..a04f23d4 100644 --- a/tools/formats.c +++ b/tools/formats.c @@ -15,8 +15,8 @@ #include "tools.h" -int formats(struct cmd_context *cmd, int argc __attribute((unused)), - char **argv __attribute((unused))) +int formats(struct cmd_context *cmd, int argc __attribute__((unused)), + char **argv __attribute__((unused))) { display_formats(cmd); diff --git a/tools/lvchange.c b/tools/lvchange.c index 126e61ae..4186b53c 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -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, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { int doit = 0, docmds = 0; int dmeventd_mode, archived = 0; diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 7bfe273b..ffdbd07f 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -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, const char *name, - const char *uuid __attribute((unused))) + const char *uuid __attribute__((unused))) { dev_close_all(); @@ -338,11 +338,11 @@ static struct volume_group *_get_lvconvert_vg(struct cmd_context *cmd, 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, const char *name, const char *uuid, - uint32_t lv_type __attribute((unused))) + uint32_t lv_type __attribute__((unused))) { 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, struct volume_group *vg, struct logical_volume *lv, - struct dm_list *lvs_changed __attribute((unused))) + struct dm_list *lvs_changed __attribute__((unused))) { int r = 0; @@ -402,7 +402,7 @@ out: static int _finish_lvconvert_merge(struct cmd_context *cmd, struct volume_group *vg, 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); 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, struct logical_volume *lv, - const char *name __attribute((unused)), + const char *name __attribute__((unused)), struct daemon_parms *parms) { 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, - void *baton __attribute((unused))) + void *baton __attribute__((unused))) { return lv->status & PARTIAL_LV; } diff --git a/tools/lvcreate.c b/tools/lvcreate.c index d0e962f6..de5b59cf 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -236,7 +236,7 @@ static int _read_size_params(struct lvcreate_params *lp, * Generic mirror parameter checks. * 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) { int pagesize = lvm_getpagesize(); diff --git a/tools/lvm-static.c b/tools/lvm-static.c index 036340f0..1be4c241 100644 --- a/tools/lvm-static.c +++ b/tools/lvm-static.c @@ -22,8 +22,8 @@ int main(int argc, char **argv) return lvm2_main(argc, argv); } -int lvm_shell(struct cmd_context *cmd __attribute((unused)), - struct cmdline_context *cmdline __attribute((unused))) +int lvm_shell(struct cmd_context *cmd __attribute__((unused)), + struct cmdline_context *cmdline __attribute__((unused))) { return 0; } diff --git a/tools/lvm.c b/tools/lvm.c index 0ca5cee7..60f9a79a 100644 --- a/tools/lvm.c +++ b/tools/lvm.c @@ -122,7 +122,7 @@ static char *_list_args(const char *text, int state) /* Custom completion function */ static char **_completion(const char *text, int start_pos, - int end_pos __attribute((unused))) + int end_pos __attribute__((unused))) { char **match_list = NULL; int p = 0; diff --git a/tools/lvm2cmd.c b/tools/lvm2cmd.c index a8d09bf1..1e1e059c 100644 --- a/tools/lvm2cmd.c +++ b/tools/lvm2cmd.c @@ -20,8 +20,8 @@ void *lvm2_init(void) return cmdlib_lvm2_init(0); } -int lvm_shell(struct cmd_context *cmd __attribute((unused)), - struct cmdline_context *cmdline __attribute((unused))) +int lvm_shell(struct cmd_context *cmd __attribute__((unused)), + struct cmdline_context *cmdline __attribute__((unused))) { return 0; } diff --git a/tools/lvmchange.c b/tools/lvmchange.c index c4417c3e..ff77e953 100644 --- a/tools/lvmchange.c +++ b/tools/lvmchange.c @@ -15,8 +15,8 @@ #include "tools.h" -int lvmchange(struct cmd_context *cmd __attribute((unused)), - int argc __attribute((unused)), char **argv __attribute((unused))) +int lvmchange(struct cmd_context *cmd __attribute__((unused)), + int argc __attribute__((unused)), char **argv __attribute__((unused))) { log_error("With LVM2 and the device mapper, this program is obsolete."); return ECMD_FAILED; diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 8ff74ac0..6c66fab6 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -60,7 +60,7 @@ static struct cmdline_context _cmdline; /* Command line args */ /* 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; } @@ -70,7 +70,7 @@ unsigned arg_is_set(const struct cmd_context *cmd, int a) 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; } @@ -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; } -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++; } -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->percent = PERCENT_NONE; @@ -143,7 +143,7 @@ int yes_no_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) 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) { a->sign = SIGN_NONE; @@ -225,7 +225,7 @@ static int _get_int_arg(struct arg *a, char **ptr) } /* 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; int i; @@ -307,7 +307,7 @@ int size_mb_arg(struct cmd_context *cmd, struct arg *a) 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; @@ -317,7 +317,7 @@ int int_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) 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; @@ -327,7 +327,7 @@ int int_arg_with_sign(struct cmd_context *cmd __attribute((unused)), struct arg 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) { char *ptr; @@ -360,7 +360,7 @@ int int_arg_with_sign_and_percent(struct cmd_context *cmd __attribute((unused)), 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; @@ -375,7 +375,7 @@ int minor_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) 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; @@ -392,13 +392,13 @@ int major_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) return 1; } -int string_arg(struct cmd_context *cmd __attribute((unused)), - struct arg *a __attribute((unused))) +int string_arg(struct cmd_context *cmd __attribute__((unused)), + struct arg *a __attribute__((unused))) { 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; @@ -413,7 +413,7 @@ int tag_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) 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; @@ -429,7 +429,7 @@ int permission_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) 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; @@ -452,7 +452,7 @@ int segtype_arg(struct cmd_context *cmd, struct arg *a) /* * 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")) { 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" */ -int metadatacopies_arg(struct cmd_context *cmd __attribute((unused)), +int metadatacopies_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { 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; } -int version(struct cmd_context *cmd __attribute((unused)), - int argc __attribute((unused)), - char **argv __attribute((unused))) +int version(struct cmd_context *cmd __attribute__((unused)), + int argc __attribute__((unused)), + char **argv __attribute__((unused))) { 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; diff --git a/tools/lvmdiskscan.c b/tools/lvmdiskscan.c index c91f5f2d..9127c156 100644 --- a/tools/lvmdiskscan.c +++ b/tools/lvmdiskscan.c @@ -91,8 +91,8 @@ static int _check_device(struct cmd_context *cmd, struct device *dev) return 1; } -int lvmdiskscan(struct cmd_context *cmd, int argc __attribute((unused)), - char **argv __attribute((unused))) +int lvmdiskscan(struct cmd_context *cmd, int argc __attribute__((unused)), + char **argv __attribute__((unused))) { uint64_t size; struct dev_iter *iter; diff --git a/tools/lvremove.c b/tools/lvremove.c index dbf2f1d9..02521495 100644 --- a/tools/lvremove.c +++ b/tools/lvremove.c @@ -16,7 +16,7 @@ #include "tools.h" static int lvremove_single(struct cmd_context *cmd, struct logical_volume *lv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct logical_volume *origin; diff --git a/tools/lvscan.c b/tools/lvscan.c index a65bd1d3..c0522f09 100644 --- a/tools/lvscan.c +++ b/tools/lvscan.c @@ -16,7 +16,7 @@ #include "tools.h" static int lvscan_single(struct cmd_context *cmd, struct logical_volume *lv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct lvinfo info; int lv_total = 0; diff --git a/tools/polldaemon.c b/tools/polldaemon.c index 3c9fdb70..d51f4bb1 100644 --- a/tools/polldaemon.c +++ b/tools/polldaemon.c @@ -19,7 +19,7 @@ #include <signal.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) ; } diff --git a/tools/pvchange.c b/tools/pvchange.c index a329d27a..47b2a271 100644 --- a/tools/pvchange.c +++ b/tools/pvchange.c @@ -19,7 +19,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct volume_group *vg, struct physical_volume *pv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { uint32_t orig_pe_alloc_count; /* 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 *tag = NULL; const char *orig_vg_name; - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); int allocatable = 0; int tagarg = 0; diff --git a/tools/pvmove.c b/tools/pvmove.c index 2a3c27c6..c8a480fd 100644 --- a/tools/pvmove.c +++ b/tools/pvmove.c @@ -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, const char *name, - const char *uuid __attribute((unused))) + const char *uuid __attribute__((unused))) { struct physical_volume *pv; diff --git a/tools/pvremove.c b/tools/pvremove.c index 34b72144..8242993c 100644 --- a/tools/pvremove.c +++ b/tools/pvremove.c @@ -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, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct device *dev; int ret = ECMD_FAILED; diff --git a/tools/pvscan.c b/tools/pvscan.c index 57882f67..b24b7ab5 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -20,9 +20,9 @@ int vg_max_name_len = 0; static void _pvscan_display_single(struct cmd_context *cmd, 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; char pv_tmp_name[NAME_LEN] = { 0, }; @@ -96,8 +96,8 @@ static void _pvscan_display_single(struct cmd_context *cmd, pv_pe_size(pv))); } -int pvscan(struct cmd_context *cmd, int argc __attribute((unused)), - char **argv __attribute((unused))) +int pvscan(struct cmd_context *cmd, int argc __attribute__((unused)), + char **argv __attribute__((unused))) { int new_pvs_found = 0; int pvs_found = 0; diff --git a/tools/reporter.c b/tools/reporter.c index 32804f67..f39d23f8 100644 --- a/tools/reporter.c +++ b/tools/reporter.c @@ -16,7 +16,7 @@ #include "tools.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, void *handle) { @@ -41,7 +41,7 @@ static int _lvs_single(struct cmd_context *cmd, struct logical_volume *lv, 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) { 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; const char *vg_name = NULL; 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) { vg_name = pv_vg_name(pv); diff --git a/tools/segtypes.c b/tools/segtypes.c index 504dcc1f..a5f55a86 100644 --- a/tools/segtypes.c +++ b/tools/segtypes.c @@ -15,8 +15,8 @@ #include "tools.h" -int segtypes(struct cmd_context *cmd, int argc __attribute((unused)), - char **argv __attribute((unused))) +int segtypes(struct cmd_context *cmd, int argc __attribute__((unused)), + char **argv __attribute__((unused))) { display_segtypes(cmd); diff --git a/tools/stub.h b/tools/stub.h index 1523797c..478de5de 100644 --- a/tools/stub.h +++ b/tools/stub.h @@ -17,23 +17,23 @@ log_error("Command not implemented yet."); return ECMD_FAILED /*int e2fsadm(struct cmd_context *cmd, int argc, char **argv) unimplemented*/ -int lvmsadc(struct cmd_context *cmd __attribute((unused)), - int argc __attribute((unused)), - char **argv __attribute((unused))) +int lvmsadc(struct cmd_context *cmd __attribute__((unused)), + int argc __attribute__((unused)), + char **argv __attribute__((unused))) { unimplemented; } -int lvmsar(struct cmd_context *cmd __attribute((unused)), - int argc __attribute((unused)), - char **argv __attribute((unused))) +int lvmsar(struct cmd_context *cmd __attribute__((unused)), + int argc __attribute__((unused)), + char **argv __attribute__((unused))) { unimplemented; } -int pvdata(struct cmd_context *cmd __attribute((unused)), - int argc __attribute((unused)), - char **argv __attribute((unused))) +int pvdata(struct cmd_context *cmd __attribute__((unused)), + int argc __attribute__((unused)), + char **argv __attribute__((unused))) { 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."); diff --git a/tools/tools.h b/tools/tools.h index 2e06fc20..e9bc8502 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -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 alloc_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 */ unsigned arg_count(const struct cmd_context *cmd, int a); diff --git a/tools/vgchange.c b/tools/vgchange.c index ed5a7ef0..6758c051 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -476,7 +476,7 @@ static int _vgchange_tag(struct cmd_context *cmd, struct volume_group *vg, 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 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, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { int dmeventd_mode, r = ECMD_FAILED; diff --git a/tools/vgck.c b/tools/vgck.c index c8cad45b..d9613b57 100644 --- a/tools/vgck.c +++ b/tools/vgck.c @@ -16,10 +16,10 @@ #include "tools.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, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { if (!vg_check_status(vg, EXPORTED_VG)) { stack; diff --git a/tools/vgconvert.c b/tools/vgconvert.c index 1808454a..d24556b8 100644 --- a/tools/vgconvert.c +++ b/tools/vgconvert.c @@ -17,7 +17,7 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct physical_volume *pv, *existing_pv; struct logical_volume *lv; diff --git a/tools/vgdisplay.c b/tools/vgdisplay.c index 954e456b..afc92fe7 100644 --- a/tools/vgdisplay.c +++ b/tools/vgdisplay.c @@ -17,7 +17,7 @@ static int vgdisplay_single(struct cmd_context *cmd, const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { /* FIXME Do the active check here if activevolumegroups_ARG ? */ vg_check_status(vg, EXPORTED_VG); diff --git a/tools/vgexport.c b/tools/vgexport.c index df7f2377..a1043d25 100644 --- a/tools/vgexport.c +++ b/tools/vgexport.c @@ -15,10 +15,10 @@ #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, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct pv_list *pvl; struct physical_volume *pv; diff --git a/tools/vgimport.c b/tools/vgimport.c index ee8e40a3..284f5361 100644 --- a/tools/vgimport.c +++ b/tools/vgimport.c @@ -15,10 +15,10 @@ #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, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct pv_list *pvl; struct physical_volume *pv; diff --git a/tools/vgmerge.c b/tools/vgmerge.c index 6dba99bb..403a5e04 100644 --- a/tools/vgmerge.c +++ b/tools/vgmerge.c @@ -92,7 +92,7 @@ static int _vgmerge_single(struct cmd_context *cmd, const char *vg_name_to, /* Fix up LVIDs */ dm_list_iterate_items(lvl1, &vg_to->lvs) { 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) { union lvid *lvid2 = &lvl2->lv->lvid; diff --git a/tools/vgmknodes.c b/tools/vgmknodes.c index f62b5893..0fd273f7 100644 --- a/tools/vgmknodes.c +++ b/tools/vgmknodes.c @@ -16,7 +16,7 @@ #include "tools.h" 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 (!lv_refresh(cmd, lv)) { diff --git a/tools/vgreduce.c b/tools/vgreduce.c index 0cbe4b04..83994ccb 100644 --- a/tools/vgreduce.c +++ b/tools/vgreduce.c @@ -18,7 +18,7 @@ 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) { 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? */ static int _vgreduce_single(struct cmd_context *cmd, struct volume_group *vg, struct physical_volume *pv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct pv_list *pvl; struct volume_group *orphan_vg = NULL; diff --git a/tools/vgremove.c b/tools/vgremove.c index ce033475..67e3767b 100644 --- a/tools/vgremove.c +++ b/tools/vgremove.c @@ -17,7 +17,7 @@ static int vgremove_single(struct cmd_context *cmd, const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { unsigned lv_count, missing; force_t force; diff --git a/tools/vgscan.c b/tools/vgscan.c index b8971adc..4e12914c 100644 --- a/tools/vgscan.c +++ b/tools/vgscan.c @@ -17,7 +17,7 @@ static int vgscan_single(struct cmd_context *cmd, const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { log_print("Found %svolume group \"%s\" using metadata type %s", vg_is_exported(vg) ? "exported " : "", vg_name, |