Patchwork [v1,3/4] vl.c: allow for repeated -sd arguments

login
register
mail settings
Submitter Peter A. G. Crosthwaite
Date June 14, 2012, 2:20 a.m.
Message ID <fd25613daf92db9c5ab2df5284f1f10491a418ef.1339639696.git.peter.crosthwaite@petalogix.com>
Download mbox | patch
Permalink /patch/164785/
State New
Headers show

Comments

Peter A. G. Crosthwaite - June 14, 2012, 2:20 a.m.
Allows for repeating of -sd arugments in the same way as -pflash and -mtdblock.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
---
changed from v3:
fixed commit msg typo

 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Mitsyanko Igor - June 14, 2012, 10:08 a.m.
On 06/14/2012 06:20 AM, Peter A. G. Crosthwaite wrote:
> Allows for repeating of -sd arugments in the same way as -pflash and -mtdblock.
>
> Signed-off-by: Peter A. G. Crosthwaite<peter.crosthwaite@petalogix.com>
> ---
> changed from v3:
> fixed commit msg typo
>
>   vl.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 204d85b..b6d624b 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2431,7 +2431,7 @@ int main(int argc, char **argv, char **envp)
>                   drive_add(IF_MTD, -1, optarg, MTD_OPTS);
>                   break;
>               case QEMU_OPTION_sd:
> -                drive_add(IF_SD, 0, optarg, SD_OPTS);
> +                drive_add(IF_SD, -1, optarg, SD_OPTS);
>                   break;
>               case QEMU_OPTION_pflash:
>                   drive_add(IF_PFLASH, -1, optarg, PFLASH_OPTS);
Nice. Sometimes its really annoying to type full "-drive .." command

Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com>

Patch

diff --git a/vl.c b/vl.c
index 204d85b..b6d624b 100644
--- a/vl.c
+++ b/vl.c
@@ -2431,7 +2431,7 @@  int main(int argc, char **argv, char **envp)
                 drive_add(IF_MTD, -1, optarg, MTD_OPTS);
                 break;
             case QEMU_OPTION_sd:
-                drive_add(IF_SD, 0, optarg, SD_OPTS);
+                drive_add(IF_SD, -1, optarg, SD_OPTS);
                 break;
             case QEMU_OPTION_pflash:
                 drive_add(IF_PFLASH, -1, optarg, PFLASH_OPTS);