[openbeosstorage] Re: Kernel Interface Design
- From: "Tyler Dauwalder" <tyler@xxxxxxxxxxxxx>
- To: <openbeosstorage@xxxxxxxxxxxxx>
- Date: Thu, 14 Feb 2002 00:21:30 -0800
> The reason I combined the read/readdir functions is that the NewOS
> kernel does it this way (see bootfs.c). The only problem with not
> managing our own file descriptors, is how do we know if its a file or
> directory? (mind you, thinking about it, since sizeof(int) ==
> sizeof(DIR*) - we could just check its size:
> if (fd <256) {
> // File
> } else {
> // Directory
> }
>
> since addresses in the range 0-255 are part of the kernel.
>
> What do you think?
You know, that probably *would* work. That's a neat idea. I'm a
little wary of including something like that in a high-use OS library
though; it seems like too much of a hack. Plus, it looks like you
can call rstat with a pathname to find out what the stream type is.
It'd probably be safer to go with that.
-Tyler
- Follow-Ups:
- [openbeosstorage] Re: Kernel Interface Design
- From: Keith Poole
- References:
- [openbeosstorage] Kernel Interface Design
- From: Tyler Dauwalder
- [openbeosstorage] Re: Kernel Interface Design
- From: Keith Poole
- [openbeosstorage] Re: Kernel Interface Design
- From: Tyler Dauwalder
- [openbeosstorage] Re: Kernel Interface Design
- From: Keith Poole
Other related posts:
- » [openbeosstorage] Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- » [openbeosstorage] Re: Kernel Interface Design
- [openbeosstorage] Re: Kernel Interface Design
- From: Keith Poole
- [openbeosstorage] Kernel Interface Design
- From: Tyler Dauwalder
- [openbeosstorage] Re: Kernel Interface Design
- From: Keith Poole
- [openbeosstorage] Re: Kernel Interface Design
- From: Tyler Dauwalder
- [openbeosstorage] Re: Kernel Interface Design
- From: Keith Poole