|
|
|
@ -58,13 +58,7 @@ typedef unsigned long long __u64;
|
|
|
|
|
#if defined(BSD_MOUNTTEST)
|
|
|
|
|
#include <mntent.h>
|
|
|
|
|
#else
|
|
|
|
|
/*
|
|
|
|
|
* this is for glibc 2.x which defines ust structure in
|
|
|
|
|
* ustat.h not stat.h
|
|
|
|
|
*/
|
|
|
|
|
#ifdef __GLIBC__
|
|
|
|
|
#include <sys/ustat.h>
|
|
|
|
|
#endif
|
|
|
|
|
#include <sys/statfs.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -604,7 +598,7 @@ gen_eject(struct wm_drive *d)
|
|
|
|
|
{
|
|
|
|
|
struct stat stbuf;
|
|
|
|
|
#if !defined(BSD_MOUNTTEST)
|
|
|
|
|
struct ustat ust;
|
|
|
|
|
struct statfs sfsbuf;
|
|
|
|
|
#else
|
|
|
|
|
struct mntent *mnt;
|
|
|
|
|
FILE *fp;
|
|
|
|
@ -619,7 +613,7 @@ gen_eject(struct wm_drive *d)
|
|
|
|
|
|
|
|
|
|
/* Is this a mounted filesystem? */
|
|
|
|
|
#if !defined(BSD_MOUNTTEST)
|
|
|
|
|
if (ustat(stbuf.st_rdev, &ust) == 0)
|
|
|
|
|
if (fstatfs(d->fd, &sfsbuf) == 0)
|
|
|
|
|
return (-3);
|
|
|
|
|
#else
|
|
|
|
|
/*
|
|
|
|
|