mountpoint.c revision b494ffed8ded8d170d9ace3dc607b1d278048241
/* Copyright (c) 2006 Timo Sirainen */
#include "lib.h"
#include "mountpoint.h"
#ifdef HAVE_STATFS_MNTFROMNAME
#elif defined(HAVE_MNTENT_H)
# include <stdio.h>
# include <mntent.h> /* Linux */
#elif defined(HAVE_SYS_MNTTAB_H)
# include <stdio.h>
#else
# define MOUNTPOINT_UNKNOWN
#endif
/* AIX doesn't have these defined */
#ifndef MNTTYPE_SWAP
# define MNTTYPE_SWAP "swap"
#endif
#ifndef MNTTYPE_IGNORE
# define MNTTYPE_IGNORE "ignore"
#endif
{
#ifdef MOUNTPOINT_UNKNOWN
return -1;
#elif defined (HAVE_STATFS_MNTFROMNAME)
/* BSDs */
return -1;
}
return 1;
#else
#ifdef HAVE_SYS_MNTTAB_H
#else
#endif
unsigned int block_size;
FILE *f;
return -1;
}
#ifdef HAVE_SYS_MNTTAB_H
/* Solaris */
if (f == NULL) {
return -1;
}
continue;
break;
}
}
fclose(f);
#else
/* Linux */
if (f == NULL) {
return -1;
}
continue;
break;
}
}
endmntent(f);
#endif
if (device_path == NULL)
return 0;
return 1;
#endif
}