Re: Device Drivers Which Include mkdir("/dev")

2021-02-23 Thread Chris Johns
On 24/2/21 2:18 am, Joel Sherrill wrote: > On Tue, Feb 23, 2021 at 2:52 AM Daniel Hellstrom > wrote: > I think the main reason why the mkdir() is called in the first place, from > for example rasta-io driver, is that once other drivers register their >

Re: Device Drivers Which Include mkdir("/dev")

2021-02-23 Thread Joel Sherrill
On Tue, Feb 23, 2021 at 2:52 AM Daniel Hellstrom wrote: > Hi, > > I think the main reason why the mkdir() is called in the first place, from > for example rasta-io driver, is that once other drivers register their > device pciN.devM into the /dev/pciboardN/devM it would fail if the the >

Re: Device Drivers Which Include mkdir("/dev")

2021-02-23 Thread Daniel Hellstrom
Hi, I think the main reason why the mkdir() is called in the first place, from for example rasta-io driver, is that once other drivers register their device pciN.devM into the /dev/pciboardN/devM it would fail if the the directory /dev/pciboardN has not been created. So it is an attempt to

Re: Device Drivers Which Include mkdir("/dev")

2021-02-20 Thread Chris Johns
On 21/2/21 5:29 am, Gedare Bloom wrote: > On Fri, Feb 19, 2021 at 5:26 PM Joel Sherrill wrote: >> On Fri, Feb 19, 2021, 5:32 PM Chris Johns wrote: >>> >>> On 20/2/21 7:56 am, Joel Sherrill wrote: On Fri, Feb 19, 2021 at 2:51 PM Gedare Bloom >>> > wrote:

Re: Device Drivers Which Include mkdir("/dev")

2021-02-20 Thread Gedare Bloom
On Fri, Feb 19, 2021 at 5:26 PM Joel Sherrill wrote: > > > > On Fri, Feb 19, 2021, 5:32 PM Chris Johns wrote: >> >> On 20/2/21 7:56 am, Joel Sherrill wrote: >> > On Fri, Feb 19, 2021 at 2:51 PM Gedare Bloom > > > wrote: >> > >> > I think the suggestion is to provide

Re: Device Drivers Which Include mkdir("/dev")

2021-02-19 Thread Joel Sherrill
On Fri, Feb 19, 2021, 5:32 PM Chris Johns wrote: > On 20/2/21 7:56 am, Joel Sherrill wrote: > > On Fri, Feb 19, 2021 at 2:51 PM Gedare Bloom > > wrote: > > > > I think the suggestion is to provide a catch-all rather than try to > add new > > faults for every

Re: Device Drivers Which Include mkdir("/dev")

2021-02-19 Thread Chris Johns
On 20/2/21 7:56 am, Joel Sherrill wrote: > On Fri, Feb 19, 2021 at 2:51 PM Gedare Bloom > wrote: > > I think the suggestion is to provide a catch-all rather than try to add > new > faults for every possible condition. This mkdir is a pretty esoteric fault >

Re: Device Drivers Which Include mkdir("/dev")

2021-02-19 Thread Joel Sherrill
On Fri, Feb 19, 2021 at 2:51 PM Gedare Bloom wrote: > I think the suggestion is to provide a catch-all rather than try to add > new faults for every possible condition. This mkdir is a pretty esoteric > fault that is unlikely to happen in properly developed code. > Then why shouldn't this just

Re: Device Drivers Which Include mkdir("/dev")

2021-02-19 Thread Gedare Bloom
I think the suggestion is to provide a catch-all rather than try to add new faults for every possible condition. This mkdir is a pretty esoteric fault that is unlikely to happen in properly developed code. On Fri, Feb 19, 2021, 11:03 AM Joel Sherrill wrote: > > > On Fri, Feb 19, 2021 at 9:48 AM

Re: Device Drivers Which Include mkdir("/dev")

2021-02-19 Thread Joel Sherrill
On Fri, Feb 19, 2021 at 9:48 AM Gedare Bloom wrote: > On Thu, Feb 18, 2021 at 11:32 PM Sebastian Huber > wrote: > > > > On 18/02/2021 21:08, Gedare Bloom wrote: > > > > >> Grrr.. I've looked again at the code and it is all Gaisler code doing > something > > >> like mkdir("/dev/leonXXX"). It

Re: Device Drivers Which Include mkdir("/dev")

2021-02-19 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 11:32 PM Sebastian Huber wrote: > > On 18/02/2021 21:08, Gedare Bloom wrote: > > >> Grrr.. I've looked again at the code and it is all Gaisler code doing > >> something > >> like mkdir("/dev/leonXXX"). It really could fail. This should be a fatal > >> error > >> and

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Sebastian Huber
On 18/02/2021 21:08, Gedare Bloom wrote: Grrr.. I've looked again at the code and it is all Gaisler code doing something like mkdir("/dev/leonXXX"). It really could fail. This should be a fatal error and would seem to indicate that we need a grlib category of fatal BSP/driver errors. Given the

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Joel Sherrill
On Thu, Feb 18, 2021 at 3:28 PM Gedare Bloom wrote: > On Thu, Feb 18, 2021 at 2:18 PM Joel Sherrill wrote: > > > > > > > > On Thu, Feb 18, 2021 at 2:08 PM Gedare Bloom wrote: > >> > >> On Thu, Feb 18, 2021 at 12:52 PM Joel Sherrill wrote: > >> > > >> > > >> > > >> > On Thu, Feb 18, 2021 at

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 2:18 PM Joel Sherrill wrote: > > > > On Thu, Feb 18, 2021 at 2:08 PM Gedare Bloom wrote: >> >> On Thu, Feb 18, 2021 at 12:52 PM Joel Sherrill wrote: >> > >> > >> > >> > On Thu, Feb 18, 2021 at 11:52 AM Gedare Bloom wrote: >> >> >> >> On Thu, Feb 18, 2021 at 10:20 AM

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Joel Sherrill
On Thu, Feb 18, 2021 at 2:08 PM Gedare Bloom wrote: > On Thu, Feb 18, 2021 at 12:52 PM Joel Sherrill wrote: > > > > > > > > On Thu, Feb 18, 2021 at 11:52 AM Gedare Bloom wrote: > >> > >> On Thu, Feb 18, 2021 at 10:20 AM Joel Sherrill wrote: > >> > > >> > > >> > > >> > On Thu, Feb 18, 2021 at

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 12:52 PM Joel Sherrill wrote: > > > > On Thu, Feb 18, 2021 at 11:52 AM Gedare Bloom wrote: >> >> On Thu, Feb 18, 2021 at 10:20 AM Joel Sherrill wrote: >> > >> > >> > >> > On Thu, Feb 18, 2021 at 11:06 AM Gedare Bloom wrote: >> >> >> >> On Thu, Feb 18, 2021 at 8:56 AM

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Joel Sherrill
On Thu, Feb 18, 2021 at 11:52 AM Gedare Bloom wrote: > On Thu, Feb 18, 2021 at 10:20 AM Joel Sherrill wrote: > > > > > > > > On Thu, Feb 18, 2021 at 11:06 AM Gedare Bloom wrote: > >> > >> On Thu, Feb 18, 2021 at 8:56 AM Joel Sherrill wrote: > >> > > >> > Hi > >> > > >> > There are a lot of

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 10:20 AM Joel Sherrill wrote: > > > > On Thu, Feb 18, 2021 at 11:06 AM Gedare Bloom wrote: >> >> On Thu, Feb 18, 2021 at 8:56 AM Joel Sherrill wrote: >> > >> > Hi >> > >> > There are a lot of Coverity issues related to device drivers which call >> > mkdir("/dev") and

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Joel Sherrill
On Thu, Feb 18, 2021 at 11:06 AM Gedare Bloom wrote: > On Thu, Feb 18, 2021 at 8:56 AM Joel Sherrill wrote: > > > > Hi > > > > There are a lot of Coverity issues related to device drivers which call > mkdir("/dev") and ignore the return value. My first thought was that they > should have (void)

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 8:56 AM Joel Sherrill wrote: > > Hi > > There are a lot of Coverity issues related to device drivers which call > mkdir("/dev") and ignore the return value. My first thought was that they > should have (void) added since /dev could have been created by an earlier >

Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Joel Sherrill
Hi There are a lot of Coverity issues related to device drivers which call mkdir("/dev") and ignore the return value. My first thought was that they should have (void) added since /dev could have been created by an earlier driver. Then it occurred to me that libcsupport/src/base_fs.c includes