Skip navigation.
Home
The QNX Community Portal

View topic - Lseek and dup in RM

Lseek and dup in RM

anything that doesn't fit to other groups.

Lseek and dup in RM

Postby Igorsv94 » Sun Jul 09, 2017 3:49 pm

Hello everybody!

I'm writing RM and I need some help with I/O lseek and dup.
I didn't find source code for it, so I'm here.

Please describe this functions for me or give me source code.

P.S. I had read so many times Krten's books about RM.

Thanks!
Igorsv94
New Member
 
Posts: 2
Joined: Fri Jul 07, 2017 7:44 am

Re: Lseek and dup in RM

Postby maschoen » Sun Jul 09, 2017 5:27 pm

The code for dup() is pretty standard. If you are using QNX 6 you should just use the default RM behavior. If you are using QNX 4 there are a number of available examples on how to implement this. If you can't find any, reply and I will get one for you.

lseek() is typically only supported in resource managers controlling a file system. Unless you are writing a file system manager for a new file system, you don't need to support it. Since QNX the company has always been rather tight lipped about QNX 6 file system code, you shouldn't need this. Just return a -1 to indicate that it is unsupported in your RM>

That said a non-disk device resource manager could support the call in some idiosyncratic purpose, for example it could be used to position a servo. A better way to do this would be using devctl().
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: Lseek and dup in RM

Postby Igorsv94 » Fri Jul 14, 2017 6:34 am

I'm writing file system RM :) forgot to say.
I'm using own ocb and iofunc_attr , so I need to modify both functions lseek and dup.
In lseek I want to set position in depends of data-field from my ocb.
In dup I want to modify my table of descriptors.
Igorsv94
New Member
 
Posts: 2
Joined: Fri Jul 07, 2017 7:44 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 0 guests