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

2013-10-01 Thread Saul Wold
This ensures that makedevs will not cause image creation failures when it encounters a pipe (fifo) that exists from a previous image. This handles mode changes and it will correctly fail for dangling symlinks. [YOCTO #5288] Signed-off-by: Saul Wold s...@linux.intel.com makedev Signed-off-by:

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

2013-10-01 Thread Phil Blundell
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

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

2013-10-01 Thread Saul Wold
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

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

2013-10-01 Thread Phil Blundell
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?

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

2013-10-01 Thread Saul Wold
On 10/01/2013 01:07 PM, Phil Blundell wrote: 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)); +