mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-21 10:20:06 +00:00
444518fedf
1998-05-08 23:49 Ulrich Drepper <drepper@cygnus.com> * misc/Makefile (tests): Add tst-mntent. * misc/tst-mntent.c: New file.
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;
|
|
}
|