glibc/misc/tst-mntent.c
Ulrich Drepper 444518fedf Update.
1998-05-08 23:49  Ulrich Drepper  <drepper@cygnus.com>

	* misc/Makefile (tests): Add tst-mntent.
	* misc/tst-mntent.c: New file.
1998-05-08 23:54:11 +00:00

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;
}