On Thu, Jan 04, 2007 at 10:34:47AM +0530, Ankita Garg wrote:
> Hi,
> 
> o Patch to add a generic function to append a string eg. reset_devices, to 
> the 
>   second kernel command line.
> 
> Signed-off-by: Ankita Garg <[EMAIL PROTECTED]>
It seems like a fine idea, but why would you add this feature to kexec,
when its already implemented in the initscripts via the KEXEC_COMMANDLINE_APPEND
variable?

Thanks & Regards
Neil


> --
> 
>  kexec.c |   16 ++++++++++++++++
>  kexec.h |    2 +-
>  2 files changed, 17 insertions(+), 1 deletion(-)
> 
> Index: kexec-tools-testing-20061214/kexec/kexec.c
> ===================================================================
> --- kexec-tools-testing-20061214.orig/kexec/kexec.c   2008-04-11 
> 03:05:38.000000000 -0500
> +++ kexec-tools-testing-20061214/kexec/kexec.c        2008-04-11 
> 03:10:05.000000000 -0500
> @@ -347,6 +347,22 @@
>       return base;
>  }
>  
> +int cmdline_append_string(char *cmdline, char *append_str, int cmdline_size)
> +{
> +     int cmdlen;
> +
> +     if(cmdline_size)
> +     {
> +             cmdlen = strlen(cmdline) + strlen(append_str);
> +             if (cmdlen > (cmdline_size - 1))
> +                     die("Command line overflow\n");
> +     }
> +     strcat(cmdline, append_str);
> +     dfprintf(stdout, "Command line after adding reset_devices\n");
> +     dfprintf(stdout, "%s\n", cmdline);
> +     return 0;
> +}
> +
>  char *slurp_file(const char *filename, off_t *r_size)
>  {
>       int fd;
> Index: kexec-tools-testing-20061214/kexec/kexec.h
> ===================================================================
> --- kexec-tools-testing-20061214.orig/kexec/kexec.h   2008-04-11 
> 03:05:38.000000000 -0500
> +++ kexec-tools-testing-20061214/kexec/kexec.h        2008-04-11 
> 19:33:25.000000000 -0500
> @@ -188,7 +188,8 @@
>       const void *buf, unsigned long bufsz, unsigned long memsz,
>       unsigned long buf_align, unsigned long buf_min, unsigned long buf_max,
>       int buf_end);
> -
> +extern int cmdline_append_string(char *cmdline, char *append_str,
> +     int cmdline_size);
>  extern unsigned char purgatory[];
>  extern size_t purgatory_size;
>  
> 
> Regards, 
> -- 
> Ankita Garg ([EMAIL PROTECTED])
> Linux Technology Center
> IBM India Systems & Technology Labs, 
> Bangalore, India   

-- 
/***************************************************
 *Neil Horman
 *Software Engineer
 *Red Hat, Inc.
 [EMAIL PROTECTED]
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to