At Fri, 09 Mar 2012 11:04:59 +0100,
Mike Gabriel wrote:
> 
> [1  <multipart/mixed (7bit)>]
> [1.1  <text/plain; UTF-8 (quoted-printable)>]
> Hi Junichi,
> 
> On Do 08 M$(D+#(Br 2012 22:53:26 CET Junichi Uekawa wrote:
> 
> >
> > I usually work offline and if you can attach the patch to the mail  
> > as git-format-patch, things would work much faster.
> >
> > At Fri, 02 Mar 2012 00:33:05 +0100,
> > Mike Gabriel wrote:
> >>
> >> Package: qemubuilder
> >> Version: 0.67
> >> Severity: wishlist
> >> Tags: patch
> >>
> >> Under this URL:
> >> http://code.das-netzwerkteam.de/gitweb?p=build/cowdancer.git;a=commitdiff;h=fa63fa1257701e9097c8042f686b1555cfb25c2c
> >>
> >> ...you find a patch that shows how to add support for qemu's -smp
> >> option to qemubuilder.
> 
> Patch is attached...

Seems like missing documentation and handling for when --smp option is not 
available; added.

> 
> Greets,
> Mike
> 
> 
> -- 
> 
> DAS-NETZWERKTEAM
> mike gabriel, dorfstr. 27, 24245 barmissen
> fon: +49 (4302) 281418, fax: +49 (4302) 281419
> 
> GnuPG Key ID 0xB588399B
> mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de
> 
> freeBusy:
> https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
> [1.2 0001-Add-SMP-option-and-environment-variable-support.patch 
> <text/x-patch; UTF-8 (7bit)>]
> >From fa63fa1257701e9097c8042f686b1555cfb25c2c Mon Sep 17 00:00:00 2001
> From: Mike Gabriel <mike.gabr...@das-netzwerkteam.de>
> Date: Fri, 2 Mar 2012 00:03:27 +0100
> Subject: [PATCH] Add SMP option and environment variable support.
> 
> ---
>  debian/changelog |    1 +
>  parameter.c      |   14 ++++++++++++++
>  parameter.h      |    1 +
>  qemubuilder.c    |    2 ++
>  4 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/debian/changelog b/debian/changelog
> index aaa47cd..132f285 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -4,6 +4,7 @@ cowdancer (0.67+nmu1) UNRELEASED; urgency=low
>    * Prefer ext2 over ext3.
>    * Fix ext2/ext3 fs patch for arm/armel architecture.
>    * Mount / partition rw by kernel.
> +  * Add SMP option and environment variable support.
>  
>   -- Mike Gabriel <mike.gabr...@das-netzwerkteam.de>  Wed, 15 Feb 2012 
> 22:20:39 +0100
>  
> diff --git a/parameter.c b/parameter.c
> index 83760c1..83b3a34 100644
> --- a/parameter.c
> +++ b/parameter.c
> @@ -141,6 +141,10 @@ int load_config_file(const char* config, pbuilderconfig* 
> pc)
>           {
>             pc->othermirror=strdup(delim);
>           }
> +       else if (!strcmp(buf, "SMP"))
> +         {
> +           pc->smp=strdup(delim);
> +         }
>         else if (!strcmp(buf, "DEBBUILDOPTS"))
>           {
>             pc->debbuildopts=strdup(delim);
> @@ -208,6 +212,7 @@ int cpbuilder_dumpconfig(pbuilderconfig* pc)
>    DUMPSTR(distribution);
>    DUMPSTR(components);
>    DUMPSTR(othermirror);
> +  DUMPSTR(smp);
>    DUMPSTR(debbuildopts);
>    DUMPINT(binary_arch);
>    DUMPSTR(http_proxy);
> @@ -259,6 +264,7 @@ int parse_parameter(int ac, char** av,
>      {"distribution", required_argument, 0, 0},
>      {"components", required_argument, 0, 0},
>      {"othermirror", required_argument, 0, 0},
> +    {"smp", required_argument, 0, 0},
>      {"debbuildopts", required_argument, 0, 0},
>      {"binary-arch", no_argument, 0, 0},
>      {"inputfile", required_argument, 0, 0},
> @@ -462,6 +468,14 @@ int parse_parameter(int ac, char** av,
>             /* pass it for cowbuilder */
>             PASS_TO_PBUILDER_WITH_PARAM
>           }
> +       else if (!strcmp(long_options[index_point].name,"smp"))
> +         {
> +           /* this is for qemubuilder */
> +           pc.smp=strdup(optarg);
> +
> +           /* pass it for cowbuilder */
> +           PASS_TO_PBUILDER_WITH_PARAM
> +         }
>         else if (!strcmp(long_options[index_point].name,"http-proxy"))
>           {
>             /* this is for qemubuilder */
> diff --git a/parameter.h b/parameter.h
> index e3d8536..bc72b3a 100644
> --- a/parameter.h
> +++ b/parameter.h
> @@ -54,6 +54,7 @@ typedef struct pbuilderconfig
>    /* more qemu-isque options */
>    char* kernel_image;
>    char* initrd;
> +  char* smp;
>    int memory_megs;           /* megabytes of memory */
>    char* arch;
>    char* arch_diskdevice;
> diff --git a/qemubuilder.c b/qemubuilder.c
> index 77c9282..db74d47 100755
> --- a/qemubuilder.c
> +++ b/qemubuilder.c
> @@ -355,6 +355,8 @@ static int fork_qemu(const char* hda, const char* hdb, 
> const struct pbuilderconf
>        argv[argc++]=strdupa(machine);
>        argv[argc++]="-m";
>        argv[argc++]=mem;
> +      argv[argc++]="-smp";
> +      argv[argc++]=strdupa(pc->smp);
>        argv[argc++]="-kernel";
>        argv[argc++]=strdupa(kernel_image);
>        if (initrd && strcmp(initrd, ""))
> -- 
> 1.7.2.5
> 
> [2 Digitale PGP-Unterschrift <application/pgp-signature (7bit)>]
> 



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to