diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2016-05-10 10:13:23 +0100 |
---|---|---|
committer | Dimitri John Ledkov <xnox@ubuntu.com> | 2016-05-10 10:13:23 +0100 |
commit | 58e631d01823afd60e52f3a09887f270a91889a0 (patch) | |
tree | 6afbca5492c1ad1040608e01fe0c9d909482adeb /btrfs-select-super.c | |
parent | cec572daccafa1e912cbed363df6f84687778c6f (diff) |
New upstream release 4.5.2.
* Thanks for NMU of package rename.
* New upstream release 4.5.2.
* Upload using dgit.
* Source-only upload.
* btrfs-convert should not be included in the initramfs, but should be
compiled. Using btrfs-convert is not a trivial operation, and
especially not from a minimal shell. Also it is known to fail, and for
a sophisticated user it is trivial to include it in the
initramfs. Thus won't fix Closes: #801192
* No sponsorship required Closes: #823474
* Add Provides btrfs-tools-udeb to the -progs-udeb package.
Diffstat (limited to 'btrfs-select-super.c')
-rw-r--r-- | btrfs-select-super.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/btrfs-select-super.c b/btrfs-select-super.c index df741532..4f4ec0b6 100644 --- a/btrfs-select-super.c +++ b/btrfs-select-super.c @@ -37,7 +37,7 @@ static void print_usage(void) exit(1); } -int main(int ac, char **av) +int main(int argc, char **argv) { struct btrfs_root *root; int ret; @@ -46,7 +46,7 @@ int main(int ac, char **av) while(1) { int c; - c = getopt(ac, av, "s:"); + c = getopt(argc, argv, "s:"); if (c < 0) break; switch(c) { @@ -64,10 +64,8 @@ int main(int ac, char **av) print_usage(); } } - set_argv0(av); - ac = ac - optind; - - if (check_argc_exact(ac, 1)) + set_argv0(argv); + if (check_argc_exact(argc - optind, 1)) print_usage(); if (bytenr == 0) { @@ -77,15 +75,15 @@ int main(int ac, char **av) radix_tree_init(); - if((ret = check_mounted(av[optind])) < 0) { - fprintf(stderr, "Could not check mount status: %s\n", strerror(-ret)); + if((ret = check_mounted(argv[optind])) < 0) { + error("cannot check mount status: %s", strerror(-ret)); return ret; } else if(ret) { - fprintf(stderr, "%s is currently mounted. Aborting.\n", av[optind]); + error("%s is currently mounted, aborting", argv[optind]); return -EBUSY; } - root = open_ctree(av[optind], bytenr, 1); + root = open_ctree(argv[optind], bytenr, 1); if (!root) { fprintf(stderr, "Open ctree failed\n"); |