mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
25 lines
445 B
C
25 lines
445 B
C
|
/* Test case by Horst von Brand <vonbrand@sleipnir.valparaiso.cl>. */
|
||
|
#include <stdio.h>
|
||
|
#include <mntent.h>
|
||
|
|
||
|
int
|
||
|
main (int argc, char *argv[])
|
||
|
{
|
||
|
int result = 0;
|
||
|
struct mntent mef =
|
||
|
{
|
||
|
"/dev/hda1", "/", "ext2", "defaults", 1, 1
|
||
|
};
|
||
|
struct mntent *mnt = &mef;
|
||
|
|
||
|
if (hasmntopt (mnt, "defaults"))
|
||
|
printf("Found!\n");
|
||
|
else
|
||
|
{
|
||
|
printf("Didn't find it\n");
|
||
|
result = 1;
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
}
|