aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-05-08 23:54:11 +0000
committerUlrich Drepper <drepper@redhat.com>1998-05-08 23:54:11 +0000
commit444518fedfcd3200d78744365373cebbbb9016fd (patch)
treeed3a758ad8c2f5765d6756ea1a052506d9e2bc59 /misc
parent5bc2f642a77010ef3d118dc286b39fa4a7f21699 (diff)
downloadglibc-444518fedfcd3200d78744365373cebbbb9016fd.zip
glibc-444518fedfcd3200d78744365373cebbbb9016fd.tar.gz
glibc-444518fedfcd3200d78744365373cebbbb9016fd.tar.bz2
Update.
1998-05-08 23:49 Ulrich Drepper <drepper@cygnus.com> * misc/Makefile (tests): Add tst-mntent. * misc/tst-mntent.c: New file.
Diffstat (limited to 'misc')
-rw-r--r--misc/Makefile2
-rw-r--r--misc/tst-mntent.c24
2 files changed, 25 insertions, 1 deletions
diff --git a/misc/Makefile b/misc/Makefile
index c8b2302..52bf339 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -61,7 +61,7 @@ aux := init-misc
install-lib := libbsd-compat.a libg.a
gpl2lgpl := error.c error.h
-tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt
+tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent
include ../Rules
diff --git a/misc/tst-mntent.c b/misc/tst-mntent.c
new file mode 100644
index 0000000..cd67c98
--- /dev/null
+++ b/misc/tst-mntent.c
@@ -0,0 +1,24 @@
+/* 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;
+}