All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Phil Blundell <pb@pbcl.net>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2] makedevs: Do not return error if the fifo exisits
Date: Tue, 01 Oct 2013 12:58:52 -0700	[thread overview]
Message-ID: <524B297C.7090804@linux.intel.com> (raw)
In-Reply-To: <1380656968.3822.12.camel@x121e.pbcl.net>

On 10/01/2013 12:49 PM, Phil Blundell wrote:
> On Tue, 2013-10-01 at 12:15 -0700, Saul Wold wrote:
>> +	int status;
>> +	struct stat sb;
>> +
>> +	memset(&sb, 0, sizeof(struct stat));
>> +	status = stat(path, &sb);
>
> Don't you want lstat() there?  Also, I think *stat() is guaranteed to
> fill in all of sb if it returns anything other than an error, so the
> memset() may be redundant.
>
I was keeping the same code style from the file function in the same code.

I chose to use stat() to maintain the same failure and error handling we 
have currently.

> I sort of wonder whether just unlink()ing the destination prior to
> calling mknod would be a simpler and more robust way of fixing this
> problem.
>
I was attempting to get a point fix for the release, we can worry about 
a more robust handling of the error / upgrade case in 1.5.1 or 1.6.

> Also, on a tangential note, you seemed to have rather a surfeit of
> signed-off-by lines in your email.
>
Fixed on the branch!

Sau!

> p.
>
>
>
>


  reply	other threads:[~2013-10-01 19:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-01 19:15 [PATCH v2] makedevs: Do not return error if the fifo exisits Saul Wold
2013-10-01 19:49 ` Phil Blundell
2013-10-01 19:58   ` Saul Wold [this message]
2013-10-01 20:07     ` Phil Blundell
2013-10-01 20:34       ` Saul Wold

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=524B297C.7090804@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=pb@pbcl.net \
    /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.