
|
[openbeosstorage]
||
[Date Prev]
[02-2002 Date Index]
[Date Next]
||
[Thread Prev]
[02-2002 Thread Index]
[Thread Next]
[openbeosstorage] Re: Kernel Interface Design
- From: Keith Poole <keef@xxxxxxxxxxxxxxx>
- To: openbeosstorage@xxxxxxxxxxxxx
- Date: Thu, 14 Feb 2002 21:12:45 +0000
I'm only suggesting it for the emulator - the kerel will produce it's
own handles & the storage kit won't have any need to understand those.
Keith
Tyler Dauwalder wrote:
>>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
>
>
>
>
>
>
>
>
|

|