home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / system / filesyst / dosfs / dosfsck_.z / dosfsck_ / dosfsck / io.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-08  |  1.1 KB  |  41 lines

  1. /* io.h  -  Virtual disk input/output */
  2.  
  3. /* Written 1993 by Werner Almesberger */
  4.  
  5.  
  6. #ifndef _IO_H
  7. #define _IO_H
  8.  
  9. void fs_open(char *path,int rw);
  10.  
  11. /* Opens the file system PATH. If RW is zero, the file system is opened
  12.    read-only, otherwise, it is opened read-write. */
  13.  
  14. void fs_read(unsigned int pos,int size,void *data);
  15.  
  16. /* Reads SIZE bytes starting at POS into DATA. Performs all applicable
  17.    changes. */
  18.  
  19. int fs_test(unsigned int pos,int size);
  20.  
  21. /* Returns a non-zero integer if SIZE bytes starting at POS can be read without
  22.    errors. Otherwise, it returns zero. */
  23.  
  24. void fs_write(unsigned int pos,int size,void *data);
  25.  
  26. /* If write_immed is non-zero, SIZE bytes are written from DATA to the disk,
  27.    starting at POS. If write_immed is zero, the change is added to a list in
  28.    memory. */
  29.  
  30. int fs_close(int write);
  31.  
  32. /* Closes the file system, performs all pending changes if WRITE is non-zero
  33.    and removes the list of changes. Returns a non-zero integer if the file
  34.    system has been changed since the last fs_open, zero otherwise. */
  35.  
  36. int fs_changed(void);
  37.  
  38. /* Determines whether the file system has changed. See fs_close. */
  39.  
  40. #endif
  41.