Resmgr doubt

Hi all,
I am having a doubt in using block device resmgr …I had developed a resmgr
with block device type for my memory device and I am having few doubts
regarding that.
1.I am not taking care about major & minor numbers is this OK ?
2.Can I read and write a file into my new block device (say /dev/new)
without implementing filesystem over my device?
3.What should I do in my resmgr , so that i can use posix call like open,
close for accessing files in my memory device .
My doubt is /dev/new itself is a special device file if so i cant use
open("/dev/new/test.c",perms) …How do i go about ?
4.Can i use QNX .so files for giving msdosfs /qnx4fs support for my memory
device ?

Thanks & Regards
Scintill

“Scintill” <manigandanv@myw.ltindia.com> wrote in message
news:a9esve$6hj$1@inn.qnx.com

Hi all,
I am having a doubt in using block device resmgr …I had developed a
resmgr
with block device type for my memory device and I am having few doubts
regarding that.
1.I am not taking care about major & minor numbers is this OK ?

Yes

2.Can I read and write a file into my new block device (say /dev/new)
without implementing filesystem over my device?

Yes you can write the content of a file in the device (just like you
would in a serial port)

3.What should I do in my resmgr , so that i can use posix call like open,
close for accessing files in my memory device .

My doubt is /dev/new itself is a special device file if so i cant use
open("/dev/new/test.c",perms) …How do i go about ?

You have to handle it yourself.

4.Can i use QNX .so files for giving msdosfs /qnx4fs support for my memory
device ?

No you can’t. You would have to comply with the file system architecture
and write a “real” block device. A resource manager that can read/write
data is not a block device from the file system point of view.

Before suggesting a course of action, could you give more info about
your hardware?

Thanks & Regards
Scintill

Thank you Mario …
My memory device is Sandisk’s Multi Media Card 64MB .Main controller is ARM
We are planning for some other approach to develop resmgr for our device …
Let me explain
We are planning to develop a file system resmgr first …(say /mnt/mmc)
Then we will develop IO handlers for that entry
So our approach is
Our device wont have an entry in /dev directory …
It will not be classified as block/char device …
It will be a directory to user …He can use posix api’s for reading and
writing into files …

Are our assumptions basically wrong …??
Isn’t out approach odd (Normally devices should have entry in /dev with
special flags loke block/char right ??)
Can you point me to some reference about filesystem resmgr or resmgr in
general ??
Any comments …
Thankyou very much
Regards
Scintill

“Mario Charest” <goto@nothingness.com> wrote in message
news:a9evlt$8dr$1@inn.qnx.com

“Scintill” <> manigandanv@myw.ltindia.com> > wrote in message
news:a9esve$6hj$> 1@inn.qnx.com> …
Hi all,
I am having a doubt in using block device resmgr …I had developed a
resmgr
with block device type for my memory device and I am having few doubts
regarding that.
1.I am not taking care about major & minor numbers is this OK ?

Yes

2.Can I read and write a file into my new block device (say /dev/new)
without implementing filesystem over my device?

Yes you can write the content of a file in the device (just like you
would in a serial port)

3.What should I do in my resmgr , so that i can use posix call like
open,
close for accessing files in my memory device .

My doubt is /dev/new itself is a special device file if so i cant use
open("/dev/new/test.c",perms) …How do i go about ?

You have to handle it yourself.

4.Can i use QNX .so files for giving msdosfs /qnx4fs support for my
memory
device ?

No you can’t. You would have to comply with the file system
architecture
and write a “real” block device. A resource manager that can read/write
data is not a block device from the file system point of view.

Before suggesting a course of action, could you give more info about
your hardware?


Thanks & Regards
Scintill
\

“Scintill” <manigandanv@myw.ltindia.com> wrote in message
news:a9igq2$r1k$1@inn.qnx.com

Thank you Mario …
My memory device is Sandisk’s Multi Media Card 64MB .Main controller is
ARM

I don’t know about MultiMedia Card, but SanDisk card are supported by QNX
(don’t know about the ARM version though)

We are planning for some other approach to develop resmgr for our device

Let me explain

We are planning to develop a file system resmgr first …(say /mnt/mmc)
Then we will develop IO handlers for that entry
So our approach is

Our device wont have an entry in /dev directory …

It should, utility such as mkdosfsys uses the “raw” device
(/dev/hd0)

It will not be classified as block/char device …

It should be a block device.

It will be a directory to user …He can use posix api’s for reading and
writing into files …

That’s fine to.

Are our assumptions basically wrong …??

No

Isn’t out approach odd (Normally devices should have entry in /dev with
special flags loke block/char right ??)

Depends on the device.

Can you point me to some reference about filesystem resmgr or resmgr in
general ??

Online help and Robert Krten’s book are, to my knowledge the only info
available.

I found little information about MultiMediaCard and the type of interface
they use.
I’ll take a stab at it :wink: There are many ways to do this:

  • Check if the device provides an IDE type of interface, if it does it might
    be
    possible to use devb-eide

  • Write a custom resource manager from scratch (which is what you seems
    to be doing). That definitely not the easiest as you would be in essence
    handling everything down to dealing with were the data as to go in the
    flash.
    You would have to become a DOS FAT expert :wink:

  • Get source of devb-ram from QSSL (usually under NDA) and write
    a filesystem block device. If you can get this going that means you will
    be able to use all the utilities (such as mkdosfsys) transparently and this
    with very little code to write. Depending on the type of interface, this may
    not be suitable. If you have to deal with Flash erasure, wear leveling,
    reclamation etc, this can get pretty complicated. If so it’s quite possible
    the data on the flash is not layed out like normal FAT DOS HD. If that
    is the case mkdosfsys won’t do any good.

  • Other possibility is to use the embedded kit to write a flash filesystem
    driver (this takes cares of erasure/reclamation/wear leveling typicaly need
    for flash). But in this case it sure won’t be compatible with DOS.



Any comments …
Thankyou very much
Regards
Scintill

“Mario Charest” <> goto@nothingness.com> > wrote in message
news:a9evlt$8dr$> 1@inn.qnx.com> …

“Scintill” <> manigandanv@myw.ltindia.com> > wrote in message
news:a9esve$6hj$> 1@inn.qnx.com> …
Hi all,
I am having a doubt in using block device resmgr …I had developed a
resmgr
with block device type for my memory device and I am having few doubts
regarding that.
1.I am not taking care about major & minor numbers is this OK ?

Yes

2.Can I read and write a file into my new block device (say /dev/new)
without implementing filesystem over my device?

Yes you can write the content of a file in the device (just like you
would in a serial port)

3.What should I do in my resmgr , so that i can use posix call like
open,
close for accessing files in my memory device .

My doubt is /dev/new itself is a special device file if so i cant use
open("/dev/new/test.c",perms) …How do i go about ?

You have to handle it yourself.

4.Can i use QNX .so files for giving msdosfs /qnx4fs support for my
memory
device ?

No you can’t. You would have to comply with the file system
architecture
and write a “real” block device. A resource manager that can read/write
data is not a block device from the file system point of view.

Before suggesting a course of action, could you give more info about
your hardware?


Thanks & Regards
Scintill


\