View topic - Lseek and dup in RM
Lseek and dup in RM
3 posts
• Page 1 of 1
Lseek and dup in RM
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!
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
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().
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: 2657
- Joined: Wed Jun 25, 2003 5:18 pm
Re: Lseek and dup in RM
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.

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
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest