From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
wwoods@redhat.com
Subject: Re: [PATCH] core_pattern: Add ability for core_pattern to parse arguments when pattern is a pipe
Date: Thu, 26 Jul 2007 15:02:19 -0700 [thread overview]
Message-ID: <46A919EB.9060102@goop.org> (raw)
In-Reply-To: <20070726173923.GA5701@hmsreliant.homelinux.net>
Neil Horman wrote:
> +static void free_argv_array(char **argv)
> +{
> + int i;
> + if (argv != NULL) {
> + for (i = 0; argv[i] != NULL; i++)
> + kfree(argv[i]);
> + kfree(argv);
> + }
> +
> +}
>
I've helpfully already provided free_argv() in lib/argv_split.c.
> +
> +/*
> + * format_corename_argv will inspect the corename string,
> + * and for every option found after the binary name
> + * it will remove the option from the string, and place it
> + * in the argv array, that can then be passed to the
> + * usermodehelper if core_pattern is a pipe
> + * Assumes that corename is declared on the stack of the caller
> + */
> +static char **format_corename_argv(char *corename)
> +{
>
And it looks like this could be adapted to use argv_split() with a bit
of additional processing.
J
next prev parent reply other threads:[~2007-07-26 22:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 17:40 [PATCH] core_pattern: Add ability for core_pattern to parse arguments when pattern is a pipe Neil Horman
2007-07-26 18:48 ` Andrew Morton
2007-07-26 19:31 ` Neil Horman
2007-07-26 19:47 ` Andrew Morton
2007-07-26 20:20 ` Neil Horman
2007-07-26 20:35 ` Andrew Morton
2007-07-26 21:46 ` Neil Horman
2007-07-26 19:36 ` Will Woods
2007-07-26 19:52 ` Andrew Morton
2007-07-26 22:02 ` Jeremy Fitzhardinge [this message]
2007-07-27 10:32 ` Neil Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46A919EB.9060102@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=wwoods@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.