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
=== modified file 'bin/mount-image-callback'
--- bin/mount-image-callback 2016-01-27 17:53:13 +0000
+++ bin/mount-image-callback 2016-07-18 14:23:23 +0000
@@ -144,7 +144,7 @@
144 local cd_mountpoint=false fmt="" mp_is_tmp=false overlay=false144 local cd_mountpoint=false fmt="" mp_is_tmp=false overlay=false
145 local img_mp="" workd=""145 local img_mp="" workd=""
146146
147 short_opts="CdhmPpsv"147 short_opts="Cdhm:P:psv"
148 long_opts="cd-mountpoint,dev,help,format:,mountpoint:,overlay,partition:,proc,read-only,sys,system-mounts,system-resolvconf,verbose"148 long_opts="cd-mountpoint,dev,help,format:,mountpoint:,overlay,partition:,proc,read-only,sys,system-mounts,system-resolvconf,verbose"
149 getopt_out=$(getopt --name "${0##*/}" \149 getopt_out=$(getopt --name "${0##*/}" \
150 --options "${short_opts}" --long "${long_opts}" -- "$@") &&150 --options "${short_opts}" --long "${long_opts}" -- "$@") &&
@@ -160,7 +160,7 @@
160 -h|--help) Usage ; exit 0;;160 -h|--help) Usage ; exit 0;;
161 -m|--mountpoint) mp=$next;;161 -m|--mountpoint) mp=$next;;
162 -P|--partition) ptnum=$next;;162 -P|--partition) ptnum=$next;;
163 -O|--overlay) overlay=true;;163 --overlay) overlay=true;;
164 -p|--proc) bmounts="${bmounts:+${bmounts} }/proc";;164 -p|--proc) bmounts="${bmounts:+${bmounts} }/proc";;
165 -s|--sys) bmounts="${bmounts:+${bmounts} }/sys";;165 -s|--sys) bmounts="${bmounts:+${bmounts} }/sys";;
166 --system-mounts) bmounts="/dev /proc /sys";;166 --system-mounts) bmounts="/dev /proc /sys";;

Subscribers

People subscribed via source and target branches