[OE-core] [PATCH v2] makedevs: Do not return error if the fifo exisits
Phil Blundell
pb at pbcl.net
Tue Oct 1 19:49:28 UTC 2013
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 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.
Also, on a tangential note, you seemed to have rather a surfeit of
signed-off-by lines in your email.
p.
More information about the Openembedded-core
mailing list