aboutsummaryrefslogtreecommitdiffstats
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-11-27 19:34:22 +0100
committerDavid Sterba <dsterba@suse.cz>2014-12-10 16:04:08 +0100
commit1519ee3f587f5ce76edde0e0e6fcc51ef896699c (patch)
tree696697393ce20766d5a42a4e6ad49391e9c1de5c /cmds-subvolume.c
parent2ed161bd281beca29feebebbc8c4227cc6e918c3 (diff)
downloadbtrfs-progs-1519ee3f587f5ce76edde0e0e6fcc51ef896699c.tar.gz
btrfs-progs-1519ee3f587f5ce76edde0e0e6fcc51ef896699c.tar.xz
btrfs-progs-1519ee3f587f5ce76edde0e0e6fcc51ef896699c.zip
btrfs-progs: subvol delete: rename variable to match the option name
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r--cmds-subvolume.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index b14f86e..15d4b97 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -218,10 +218,10 @@ static int cmd_subvol_delete(int argc, char **argv)
char *path;
DIR *dirstream = NULL;
int verbose = 0;
- int sync_mode = 0;
+ int commit_mode = 0;
struct option long_options[] = {
- {"commit-after", no_argument, NULL, 'c'}, /* sync mode 1 */
- {"commit-each", no_argument, NULL, 'C'}, /* sync mode 2 */
+ {"commit-after", no_argument, NULL, 'c'}, /* commit mode 1 */
+ {"commit-each", no_argument, NULL, 'C'}, /* commit mode 2 */
{NULL, 0, NULL, 0}
};
@@ -235,10 +235,10 @@ static int cmd_subvol_delete(int argc, char **argv)
switch(c) {
case 'c':
- sync_mode = 1;
+ commit_mode = 1;
break;
case 'C':
- sync_mode = 2;
+ commit_mode = 2;
break;
case 'v':
verbose++;
@@ -253,8 +253,8 @@ static int cmd_subvol_delete(int argc, char **argv)
if (verbose > 0) {
printf("Transaction commit: %s\n",
- !sync_mode ? "none (default)" :
- sync_mode == 1 ? "at the end" : "after each");
+ !commit_mode ? "none (default)" :
+ commit_mode == 1 ? "at the end" : "after each");
}
cnt = optind;
@@ -310,7 +310,7 @@ again:
}
printf("Delete subvolume (%s): '%s/%s'\n",
- sync_mode == 2 || (sync_mode == 1 && cnt + 1 == argc)
+ commit_mode == 2 || (commit_mode == 1 && cnt + 1 == argc)
? "commit" : "no-commit", dname, vname);
strncpy_null(args.name, vname);
res = ioctl(fd, BTRFS_IOC_SNAP_DESTROY, &args);
@@ -323,7 +323,7 @@ again:
goto out;
}
- if (sync_mode == 1) {
+ if (commit_mode == 1) {
res = wait_for_commit(fd);
if (res < 0) {
fprintf(stderr,
@@ -347,7 +347,7 @@ out:
goto again;
}
- if (sync_mode == 2 && fd != -1) {
+ if (commit_mode == 2 && fd != -1) {
res = wait_for_commit(fd);
if (res < 0) {
fprintf(stderr,