[klibc] [RFC] klibc add minimal mntent.h

maximilian attems max at stro.at
Wed Jul 23 03:24:47 PDT 2008


belows patch is a first step towards a mntent.h
we'll need it anyways later for mdadm support.

it allows to compile util-linux-ng mount against klibc.

due to the missing features there is a severe size difference:
   text    data     bss     dec     hex filename
   1507       0      40    1547     60b /usr/lib/klibc/bin/mount
  58526    2544    4552   65622   10056 ~/src/util-linux-ng/mount/mount


diff --git a/usr/include/mntent.h b/usr/include/mntent.h
new file mode 100644
index 0000000..e1eaf60
--- /dev/null
+++ b/usr/include/mntent.h
@@ -0,0 +1,18 @@
+#ifndef _MNTENT_H
+#define _MNTENT_H       1
+
+#define MNTTYPE_IGNORE  "ignore"        /* Ignore this entry.  */
+#define MNTTYPE_SWAP    "swap"          /* Swap device.  */
+
+/* Structure describing a mount table entry.  */
+struct mntent
+{
+	char *mnt_fsname;	/* Device or server for filesystem.  */
+	char *mnt_dir;		/* Directory mounted on.  */
+	char *mnt_type;		/* Type of filesystem: ufs, nfs, etc.  */
+	char *mnt_opts;		/* Comma-separated options for fs.  */
+	int mnt_freq;		/* Dump frequency (in days).  */
+	int mnt_passno;		/* Pass number for `fsck'.  */
+};
+
+#endif  /* mntent.h */



More information about the klibc mailing list