/* fs_remount.c
 *
 * $Id: fs_unmount.c,v 1.2 2000/12/18 00:08:37 alderman Exp $
 *
 * Unmount and then remount the filesystem.  Works for flushing
 * the buffer cache.  Should be portable to FreeBSD with a change
 * in the device name and mount point.
 *
 * Linux will require some ioctl - see brian forney's email.
 */
#include <stdio.h>
#include <errno.h>

#include <sys/types.h>
#ifdef __SOLARIS__
#include <sys/mount.h>
#include <sys/mntent.h>
#else
#include <sys/param.h>
#include <sys/mount.h>
#include <ufs/ufs/ufsmount.h>
#endif /* __SOLARIS__ */

#include "global.h"

int main() {
        char dir[] = DIRNAME;
        char dev[] = DEVNAME;
	
#ifdef __SOLARIS__
	umount(dir);
#else
	unmount(dir, NULL);
#endif
}
