[OE-core] [PATCH v2] makedevs: Do not return error if the fifo exisits

Phil Blundell pb at pbcl.net
Tue Oct 1 20:07:08 UTC 2013


On Tue, 2013-10-01 at 12:58 -0700, Saul Wold wrote:
> 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'm not quite sure I understand the last sentence you wrote above.  Can
you expand on why stat() rather than lstat() is the right thing?

>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.

Righto.  I am blissfully ignorant of the criteria for the release so I
am happy to defer to your judgement on that.

p.





More information about the Openembedded-core mailing list