dev_drvr_register and prefix

Hi,

I’m seeing some problem with prefix when enumerating multiple serial ports.
Whenever we pass string say ‘bhn00’ for 8 ports we see that dev entris are
bhn0, bhn1 etc, not bhn00, bhn01 etc. If we supply prefix as bh0n-00 then
entries are bh0, bh1 etc. The problem is that prefix is truncated when the
first numeric character is seen in the prefix. Is it designed this way or
I’m missing something? If it is designed such then I need to make dev entry
by the driver as wanted by the customer. Any hints of doing this in the
driver such as implementing ‘ln’ etc.?

Thanks,
Hakim

“Hakim” <ddrv2002@yahoo.ca> wrote in message
news:dq0md2$nca$1@inn.qnx.com

Hi,

I’m seeing some problem with prefix when enumerating multiple serial
ports. Whenever we pass string say ‘bhn00’ for 8 ports we see that dev
entris are bhn0, bhn1 etc, not bhn00, bhn01 etc. If we supply prefix as
bh0n-00 then entries are bh0, bh1 etc. The problem is that prefix is
truncated when the first numeric character is seen in the prefix. Is it
designed this way or I’m missing something? If it is designed such then I
need to make dev entry by the driver as wanted by the customer. Any hints
of doing this in the driver such as implementing ‘ln’ etc.?

Not sure what’s going on, since when I look at my /dev I see

hd0.0
hd0.1
hd0.0t77
hd0.1t77

So the kernel can definitely handling anything.

Looking at the source of Dev.ser (publicy avaible) the fonction
dev_drvr_register is called. Unfortunately the source to that function is
unavaible (AFAIK) as it’s provided in a library. I guess that is where the
magic is happening. Seems like unless you get the source to the driver and
write your own version of dev_drvr_register you are out of luck.

As far as using ln it’s possible but the link entry cannot be put in /dev

Hence you can do ln -s /dev/ser1 /ser1 but not ln -s /dev/ser1 /dev/ser1.1.2

That’s because /dev is handled by Dev and Dev doesn’t support links.


Maybe
Thanks,
Hakim

Thanks for taking a look in this matter.

I played with standard serial driver and I saw the same behaviour. The code
base of our driver is Dev.ser.

This should be treated as a bug and QNX should fix it.

Hakim

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:dq8ka3$a6j$1@inn.qnx.com

“Hakim” <> ddrv2002@yahoo.ca> > wrote in message
news:dq0md2$nca$> 1@inn.qnx.com> …
Hi,

I’m seeing some problem with prefix when enumerating multiple serial
ports. Whenever we pass string say ‘bhn00’ for 8 ports we see that dev
entris are bhn0, bhn1 etc, not bhn00, bhn01 etc. If we supply prefix as
bh0n-00 then entries are bh0, bh1 etc. The problem is that prefix is
truncated when the first numeric character is seen in the prefix. Is it
designed this way or I’m missing something? If it is designed such then I
need to make dev entry by the driver as wanted by the customer. Any hints
of doing this in the driver such as implementing ‘ln’ etc.?

Not sure what’s going on, since when I look at my /dev I see

hd0.0
hd0.1
hd0.0t77
hd0.1t77

So the kernel can definitely handling anything.

Looking at the source of Dev.ser (publicy avaible) the fonction
dev_drvr_register is called. Unfortunately the source to that function is
unavaible (AFAIK) as it’s provided in a library. I guess that is where
the magic is happening. Seems like unless you get the source to the
driver and write your own version of dev_drvr_register you are out of
luck.

As far as using ln it’s possible but the link entry cannot be put in /dev

Hence you can do ln -s /dev/ser1 /ser1 but not ln -s /dev/ser1
/dev/ser1.1.2

That’s because /dev is handled by Dev and Dev doesn’t support links.


Maybe
Thanks,
Hakim

“Hakim” <ddrv2002@yahoo.ca> wrote in message
news:dq918k$j56$1@inn.qnx.com

Thanks for taking a look in this matter.

I played with standard serial driver and I saw the same behaviour. The
code base of our driver is Dev.ser.

This should be treated as a bug and QNX should fix it.

I don’t think it’s a bug. I think it’s an undocumented behavior.

As for fixing it, don’t hold your breath.

Hakim

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:dq8ka3$a6j$> 1@inn.qnx.com> …

“Hakim” <> ddrv2002@yahoo.ca> > wrote in message
news:dq0md2$nca$> 1@inn.qnx.com> …
Hi,

I’m seeing some problem with prefix when enumerating multiple serial
ports. Whenever we pass string say ‘bhn00’ for 8 ports we see that dev
entris are bhn0, bhn1 etc, not bhn00, bhn01 etc. If we supply prefix as
bh0n-00 then entries are bh0, bh1 etc. The problem is that prefix is
truncated when the first numeric character is seen in the prefix. Is it
designed this way or I’m missing something? If it is designed such then
I need to make dev entry by the driver as wanted by the customer. Any
hints of doing this in the driver such as implementing ‘ln’ etc.?

Not sure what’s going on, since when I look at my /dev I see

hd0.0
hd0.1
hd0.0t77
hd0.1t77

So the kernel can definitely handling anything.

Looking at the source of Dev.ser (publicy avaible) the fonction
dev_drvr_register is called. Unfortunately the source to that function is
unavaible (AFAIK) as it’s provided in a library. I guess that is where
the magic is happening. Seems like unless you get the source to the
driver and write your own version of dev_drvr_register you are out of
luck.

As far as using ln it’s possible but the link entry cannot be put in /dev

Hence you can do ln -s /dev/ser1 /ser1 but not ln -s /dev/ser1
/dev/ser1.1.2

That’s because /dev is handled by Dev and Dev doesn’t support links.


Maybe
Thanks,
Hakim

\