Can we use block devices as named files using the 'open' call?

Can we use block devices as named files using the 'open' call?

Post by arizv » Sat, 01 Oct 2005 00:59:54


Hi,

Can we use the open call (below) to open block devices such as hard
drives, as in Unix/Linux where 'file' can be "/dev/hdc"?

int open(const char *file, int mode /*, int permissions */);

Thanks,
Ahmad
 
 
 

Can we use block devices as named files using the 'open' call?

Post by DJ Delori » Sat, 01 Oct 2005 07:02:55


Sorry, no.

Feel free to implement such a thing through DJGPP's file system
extensions though :-) (look up "fsext")