Revert "Add argument for specifying qemu disk size"
This reverts commit 4b45a9a8a3ffaf9b6423ed1735ed78dd842d6860.
Reason for revert: We should use `fvm_image_size` instead.
Original change's description:
> Add argument for specifying qemu disk size
>
> `-S <size>` can now be used immediately after `fx run` to specify the
> qemu disk size. Acceptable sizes are anything that qemu-img accepts.
>
> We have also added a help text for `run` that describes this new option.
> `fx help run` and `fx run -h` both show this help text.
>
> Argument to pass to `run-zircon` now need to be separated by a `--`, and
> arguments to pass to `qemu` by `-- --`.
>
> Bug: None
> Test: `fx run -- -k`, `fx run -S 2G`, `fx run -S 2G -- -k`, `fx run -h`, `fx run -- -h`
> Change-Id: Idebb7466890bf59f8b9dbb90de34adfdec54391b
TBR=mcgrathr@google.com,raggi@google.com,porce@google.com,awolter@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: None
Change-Id: Id166dd872b031872f31752893e13d69454b7176e
diff --git a/devshell/run b/devshell/run
index eb2e069..b5ef78d 100755
--- a/devshell/run
+++ b/devshell/run
@@ -5,31 +5,11 @@
### start fuchsia in qemu with a FVM disk
-## Usage: fx run [-S <disk_size>] [-- <run-zircon options>... [-- <qemu options>...]]
-## Use `fx run -- -h` to see options available for `run-zircon`.
-## Use `fx run -- -- -h` to see option available for `qemu`.
-
set -e
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/image_build_vars.sh || exit $?
source "${FUCHSIA_DIR}/buildtools/vars.sh"
-while getopts ":S:h" FLAG; do
- case $FLAG in
- S) QEMU_DISK_SIZE=$OPTARG;;
- h)
- fx-command-help
- exit 1
- ;;
- \?)
- echo unrecognized option
- fx-command-help
- exit 1
- ;;
- esac
-done
-shift $((OPTIND-1))
-
qemu_dir="${BUILDTOOLS_QEMU_DIR}/bin"
# Construction of a qcow image prevents qemu from writing back to the
@@ -43,7 +23,7 @@
trap 'rm "${qimg}" && rmdir "${qcowdir}"' EXIT
"${qemu_dir}/qemu-img" create -f qcow2 -b "${FUCHSIA_BUILD_DIR}/${IMAGE_FVM_RAW}" \
- "${qimg}" ${QEMU_DISK_SIZE}
+ "${qimg}"
"${FUCHSIA_DIR}/zircon/scripts/run-zircon" \
-a "${FUCHSIA_ARCH}" \