From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] makedevs: Do not return error if the fifo exisits
Date: Tue, 1 Oct 2013 12:01:17 -0500 [thread overview]
Message-ID: <524AFFDD.7090502@windriver.com> (raw)
In-Reply-To: <1380646260-15245-1-git-send-email-sgw@linux.intel.com>
On 10/1/13 11:51 AM, Saul Wold wrote:
> This ensures that makedevs will not cause image creation failures
> when it encounters a pipe (fifo) that exists from a previous image.
> The other file/device creation code either ignore this error or check
> for file type.
>
> [YOCTO #5288]
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
> meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
> index 5d2c45b..7b0487f 100644
> --- a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
> +++ b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
> @@ -274,7 +274,7 @@ static void add_new_file(char *name, char *path, unsigned long uid,
> static void add_new_fifo(char *name, char *path, unsigned long uid,
> unsigned long gid, unsigned long mode)
> {
> - if (mknod(path, mode, 0))
> + if (mknod(path, mode, 0) && errno != EEXIST)
> error_msg_and_die("%s: file can not be created with mknod!", path);
> chown(path, uid, gid);
> // printf("File: %s %s UID: %ld GID: %ld MODE: %04lo\n",
>
Ya, I'm happy with this. It avoids recreating it if it exists.. no error.
No idea if a warning is reasonable in this case, but I'm happy with the change.
--Mark
prev parent reply other threads:[~2013-10-01 17:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 16:51 [PATCH] makedevs: Do not return error if the fifo exisits Saul Wold
2013-10-01 16:56 ` Phil Blundell
2013-10-01 17:07 ` Khem Raj
2013-10-01 17:01 ` Mark Hatle [this message]
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=524AFFDD.7090502@windriver.com \
--to=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/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.