Merge lp:~raharper/cloud-utils/trunk.fix-lp1604011 into lp:cloud-utils

Proposed by Ryan Harper
Status: Merged
Merged at revision: 295
Proposed branch: lp:~raharper/cloud-utils/trunk.fix-lp1604011
Merge into: lp:cloud-utils
Diff against target: 21 lines (+2/-2)
1 file modified
bin/mount-image-callback (+2/-2)
To merge this branch: bzr merge lp:~raharper/cloud-utils/trunk.fix-lp1604011
Reviewer Review Type Date Requested Status
Scott Moser Pending
Review via email: mp+300335@code.launchpad.net

Description of the change

bin/mount-image-callback: cleanup getopt short options configuration

The short options were not configured properlty. The '-m' and '-P'
options require input values but this was not indicated as required with
the ':' value in the short opts string. The case-statement parsing
options used '-O' as accepted short option, but this was not advertised
in the Usage statement, so remove the acceptance.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/mount-image-callback'
2--- bin/mount-image-callback 2016-01-27 17:53:13 +0000
3+++ bin/mount-image-callback 2016-07-18 14:23:23 +0000
4@@ -144,7 +144,7 @@
5 local cd_mountpoint=false fmt="" mp_is_tmp=false overlay=false
6 local img_mp="" workd=""
7
8- short_opts="CdhmPpsv"
9+ short_opts="Cdhm:P:psv"
10 long_opts="cd-mountpoint,dev,help,format:,mountpoint:,overlay,partition:,proc,read-only,sys,system-mounts,system-resolvconf,verbose"
11 getopt_out=$(getopt --name "${0##*/}" \
12 --options "${short_opts}" --long "${long_opts}" -- "$@") &&
13@@ -160,7 +160,7 @@
14 -h|--help) Usage ; exit 0;;
15 -m|--mountpoint) mp=$next;;
16 -P|--partition) ptnum=$next;;
17- -O|--overlay) overlay=true;;
18+ --overlay) overlay=true;;
19 -p|--proc) bmounts="${bmounts:+${bmounts} }/proc";;
20 -s|--sys) bmounts="${bmounts:+${bmounts} }/sys";;
21 --system-mounts) bmounts="/dev /proc /sys";;

Subscribers

People subscribed via source and target branches