summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-01-19 13:44:49 +0100
committerDavid Sterba <dsterba@suse.cz>2015-01-19 13:44:49 +0100
commit2b7cdab42529bc4ed4c36a3659504e50f0ef700c (patch)
tree6c87c39708753b1f5bfb645fa5eed1c6f04b56b3
parentecbf1339a63e99a8ef7d5ddc334e38a39f291d3d (diff)
btrfs-progs: make getopt tables static const
Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r--btrfs-corrupt-block.c2
-rw-r--r--btrfs-map-logical.c2
-rw-r--r--cmds-balance.c4
-rw-r--r--cmds-check.c2
-rw-r--r--cmds-device.c4
-rw-r--r--cmds-filesystem.c2
-rw-r--r--cmds-qgroup.c2
-rw-r--r--cmds-restore.c2
-rw-r--r--cmds-subvolume.c4
-rw-r--r--mkfs.c2
10 files changed, 13 insertions, 13 deletions
diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c
index 91ff220a..64f515ec 100644
--- a/btrfs-corrupt-block.c
+++ b/btrfs-corrupt-block.c
@@ -1019,7 +1019,7 @@ int main(int ac, char **av)
while(1) {
int c;
int option_index = 0;
- static struct option long_options[] = {
+ static const struct option long_options[] = {
/* { "byte-count", 1, NULL, 'b' }, */
{ "logical", 1, NULL, 'l' },
{ "copy", 1, NULL, 'c' },
diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c
index a9e66bf3..b99d3bfb 100644
--- a/btrfs-map-logical.c
+++ b/btrfs-map-logical.c
@@ -128,7 +128,7 @@ int main(int ac, char **av)
while(1) {
int c;
int option_index = 0;
- static struct option long_options[] = {
+ static const struct option long_options[] = {
/* { "byte-count", 1, NULL, 'b' }, */
{ "logical", 1, NULL, 'l' },
{ "copy", 1, NULL, 'c' },
diff --git a/cmds-balance.c b/cmds-balance.c
index 5de51bd4..7524f338 100644
--- a/cmds-balance.c
+++ b/cmds-balance.c
@@ -390,7 +390,7 @@ static int cmd_balance_start(int argc, char **argv)
optind = 1;
while (1) {
int longindex;
- static struct option longopts[] = {
+ static const struct option longopts[] = {
{ "data", optional_argument, NULL, 'd'},
{ "metadata", optional_argument, NULL, 'm' },
{ "system", optional_argument, NULL, 's' },
@@ -662,7 +662,7 @@ static int cmd_balance_status(int argc, char **argv)
optind = 1;
while (1) {
int longindex;
- static struct option longopts[] = {
+ static const struct option longopts[] = {
{ "verbose", no_argument, NULL, 'v' },
{ NULL, no_argument, NULL, 0}
};
diff --git a/cmds-check.c b/cmds-check.c
index befee98a..a2e8ebeb 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -8437,7 +8437,7 @@ int cmd_check(int argc, char **argv)
while(1) {
int c;
int option_index = 0;
- static struct option long_options[] = {
+ static const struct option long_options[] = {
{ "super", 1, NULL, 's' },
{ "repair", 0, NULL, 0 },
{ "init-csum-tree", 0, NULL, 0 },
diff --git a/cmds-device.c b/cmds-device.c
index 9dd52a4b..ba9e6b3e 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -56,7 +56,7 @@ static int cmd_add_dev(int argc, char **argv)
while (1) {
int long_index;
- static struct option long_options[] = {
+ static const struct option long_options[] = {
{ "nodiscard", optional_argument, NULL, 'K'},
{ "force", no_argument, NULL, 'f'},
{ 0, 0, 0, 0 }
@@ -214,7 +214,7 @@ static int cmd_scan_dev(int argc, char **argv)
optind = 1;
while (1) {
int long_index;
- static struct option long_options[] = {
+ static const struct option long_options[] = {
{ "all-devices", no_argument, NULL, 'd'},
{ 0, 0, 0, 0 },
};
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 30a7cc44..a99ddc82 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -834,7 +834,7 @@ static int cmd_show(int argc, char **argv)
while (1) {
int long_index;
- static struct option long_options[] = {
+ static const struct option long_options[] = {
{ "all-devices", no_argument, NULL, 'd'},
{ "mounted", no_argument, NULL, 'm'},
{ NULL, no_argument, NULL, 0 },
diff --git a/cmds-qgroup.c b/cmds-qgroup.c
index 1d2993c4..dfb38f71 100644
--- a/cmds-qgroup.c
+++ b/cmds-qgroup.c
@@ -242,7 +242,7 @@ static int cmd_qgroup_show(int argc, char **argv)
optind = 1;
while (1) {
int c;
- struct option long_options[] = {
+ static const struct option long_options[] = {
{"sort", 1, NULL, 'S'},
{0, 0, 0, 0}
};
diff --git a/cmds-restore.c b/cmds-restore.c
index 795332db..a07e61a1 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -1167,7 +1167,7 @@ int cmd_restore(int argc, char **argv)
while (1) {
int opt;
int option_index = 0;
- static struct option long_options[] = {
+ static const struct option long_options[] = {
{ "path-regex", 1, NULL, 256},
{ "dry-run", 0, NULL, 'D'},
{ NULL, 0, NULL, 0}
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 97293fd6..a31cb1b8 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -223,7 +223,7 @@ static int cmd_subvol_delete(int argc, char **argv)
optind = 1;
while (1) {
int c;
- struct option long_options[] = {
+ static const struct option long_options[] = {
{"commit-after", no_argument, NULL, 'c'}, /* commit mode 1 */
{"commit-each", no_argument, NULL, 'C'}, /* commit mode 2 */
{NULL, 0, NULL, 0}
@@ -403,7 +403,7 @@ static int cmd_subvol_list(int argc, char **argv)
optind = 1;
while(1) {
int c;
- struct option long_options[] = {
+ static const struct option long_options[] = {
{"sort", 1, NULL, 'S'},
{NULL, 0, NULL, 0}
};
diff --git a/mkfs.c b/mkfs.c
index fc7bf845..60027ffa 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1264,7 +1264,7 @@ int main(int ac, char **av)
while(1) {
int c;
int option_index = 0;
- static struct option long_options[] = {
+ static const struct option long_options[] = {
{ "alloc-start", 1, NULL, 'A'},
{ "byte-count", 1, NULL, 'b' },
{ "force", 0, NULL, 'f' },