home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1999 May / pcp151c.iso / misc / src / install / fs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-18  |  1.6 KB  |  54 lines

  1. #ifndef H_MTAB
  2. #define H_MTAB
  3.  
  4. #include "hd.h"
  5. #include "net.h"
  6. #include "newt.h"
  7.  
  8. struct fstabEntry {
  9.     char * device;        /* malloced! */
  10.     char * netHost;        /* malloced! */
  11.     char * netPath;        /* malloced! */
  12.     char * mntpoint;        /* malloced! */
  13.     char * tagName;
  14.     int size;
  15.     unsigned int type;
  16.     int isMounted;
  17.     int doFormat;
  18. }; 
  19.  
  20. struct fstab {
  21.     struct fstabEntry * entries;
  22.     int numEntries;
  23. };
  24.  
  25. struct nfsMountCallbackInfo {
  26.     newtComponent server, mntpoint, netpath;
  27.     char * serverVal, * netpathVal, * mntpointVal;
  28. } ;
  29. void nfsMountCallback(newtComponent co, void * arg);
  30.  
  31. char * nstrdup(const char * foo);
  32. int queryFormatFilesystems(struct fstab * fstab);
  33. int formatFilesystems(struct fstab * fstab);
  34. int mountFilesystems(struct fstab * fstab);
  35. int editNetMountPoint(struct fstabEntry * item);
  36. int doMount(char * dev, char * where, char * fs, int rdonly, int istty);
  37. int doPwMount(char * dev, char * where, char * fs, int rdonly, int istty,
  38.         char * acct, char * pw);
  39. int umountFilesystems(struct fstab * fstab);
  40. int writeFstab(struct fstab * fstab);
  41. int readMountTable(struct partitionTable table, struct fstab * finalFstab);
  42. int  addFstabEntry(struct fstab * fstab, struct fstabEntry entry);
  43. void initFstabEntry(struct fstabEntry * e);
  44. void freeFstabEntry(struct fstabEntry * e);
  45. void freeFstab(struct fstab fstab);
  46. void fstabSort(struct fstab * fstab);
  47. struct fstab copyFstab(struct fstab * fstab);
  48. void addPartitionListbox(struct partitionTable table, int maxHeight, int type, 
  49.              int (*filter)(struct partition * part),
  50.              int * numItems, newtGrid * gridPtr, 
  51.              newtComponent * listboxPtr);
  52.  
  53. #endif
  54.