#ifndef H_MTAB #define H_MTAB #include "hd.h" #include "net.h" #include "newt.h" struct fstabEntry { char * device; /* malloced! */ char * netHost; /* malloced! */ char * netPath; /* malloced! */ char * mntpoint; /* malloced! */ char * tagName; int size; enum partitionTypes type; int isMounted; int doFormat; }; struct fstab { struct fstabEntry * entries; int numEntries; }; struct nfsMountCallbackInfo { newtComponent server, mntpoint, netpath; char * serverVal, * netpathVal, * mntpointVal; } ; void nfsMountCallback(newtComponent co, void * arg); char * nstrdup(const char * foo); int setupMountTable(struct partitionTable table, struct fstab * finalFstab, struct netInterface * intf, struct netConfig * netc, struct driversLoaded ** dl); int queryFormatFilesystems(struct fstab * fstab); int formatFilesystems(struct fstab * fstab); int activeSwapSpace(struct partitionTable * table, struct fstab * fstab); int mountFilesystems(struct fstab * fstab); int editNetMountPoint(struct fstabEntry * item); int doMount(char * dev, char * where, char * fs, int rdonly, int istty); int doPwMount(char * dev, char * where, char * fs, int rdonly, int istty, char * acct, char * pw); int umountFilesystems(struct fstab * fstab); int writeFstab(struct fstab * fstab); int readMountTable(struct partitionTable table, struct fstab * finalFstab); int addFstabEntry(struct fstab * fstab, struct fstabEntry entry); void initFstabEntry(struct fstabEntry * e); void freeFstabEntry(struct fstabEntry * e); void freeFstab(struct fstab fstab); void fstabSort(struct fstab * fstab); struct fstab copyFstab(struct fstab * fstab); newtComponent addPartitionListbox(struct partitionTable table, newtComponent form, int left, int top, int height, int type, int (*filter)(struct partition * part), int * numItems); extern int canEnableSwap; #endif