aboutsummaryrefslogtreecommitdiffstats
path: root/btrfs-zero-log.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-03-01 16:28:11 +0100
committerDavid Sterba <dsterba@suse.com>2016-03-14 13:42:47 +0100
commit6398ed78f9d52769954ba5fe3c15452c390397a7 (patch)
tree4f4ab4ab52256f5a4bfed0b3edd8548871e40a20 /btrfs-zero-log.c
parentf4fc6efa4bff2abbe073790e1acdcd5efb53124b (diff)
downloadbtrfs-progs-6398ed78f9d52769954ba5fe3c15452c390397a7.tar.gz
btrfs-progs-6398ed78f9d52769954ba5fe3c15452c390397a7.tar.xz
btrfs-progs-6398ed78f9d52769954ba5fe3c15452c390397a7.zip
btrfs-progs: unify naming of argc and argv
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-zero-log.c')
-rw-r--r--btrfs-zero-log.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/btrfs-zero-log.c b/btrfs-zero-log.c
index 058e9b1..4c4ed10 100644
--- a/btrfs-zero-log.c
+++ b/btrfs-zero-log.c
@@ -31,31 +31,31 @@ __attribute__((noreturn)) static void print_usage(void)
exit(1);
}
-int main(int ac, char **av)
+int main(int argc, char **argv)
{
struct btrfs_root *root;
struct btrfs_trans_handle *trans;
struct btrfs_super_block *sb;
int ret;
- set_argv0(av);
- if (check_argc_exact(ac, 2))
+ set_argv0(argv);
+ if (check_argc_exact(argc, 2))
print_usage();
radix_tree_init();
printf("WARNING: this utility is deprecated, please use 'btrfs rescue zero-log'\n\n");
- if ((ret = check_mounted(av[1])) < 0) {
+ if ((ret = check_mounted(argv[1])) < 0) {
fprintf(stderr, "ERROR: could not check mount status: %s\n", strerror(-ret));
goto out;
} else if (ret) {
- fprintf(stderr, "ERROR: %s is currently mounted\n", av[1]);
+ fprintf(stderr, "ERROR: %s is currently mounted\n", argv[1]);
ret = -EBUSY;
goto out;
}
- root = open_ctree(av[1], 0, OPEN_CTREE_WRITES | OPEN_CTREE_PARTIAL);
+ root = open_ctree(argv[1], 0, OPEN_CTREE_WRITES | OPEN_CTREE_PARTIAL);
if (!root) {
fprintf(stderr, "ERROR: cannot open ctree\n");
return 1;
@@ -63,7 +63,7 @@ int main(int ac, char **av)
sb = root->fs_info->super_copy;
printf("Clearing log on %s, previous log_root %llu, level %u\n",
- av[1],
+ argv[1],
(unsigned long long)btrfs_super_log_root(sb),
(unsigned)btrfs_super_log_root_level(sb));
trans = btrfs_start_transaction(root, 1);