svn commit: trunk/busybox/util-linux
vda at busybox.net
vda at busybox.net
Mon Dec 18 15:07:43 PST 2006
Author: vda
Date: 2006-12-18 15:07:42 -0800 (Mon, 18 Dec 2006)
New Revision: 16999
Log:
mount: add getmntent_r stub for dietlibc
Modified:
trunk/busybox/util-linux/mount.c
Changeset:
Modified: trunk/busybox/util-linux/mount.c
===================================================================
--- trunk/busybox/util-linux/mount.c 2006-12-18 22:32:45 UTC (rev 16998)
+++ trunk/busybox/util-linux/mount.c 2006-12-18 23:07:42 UTC (rev 16999)
@@ -31,6 +31,20 @@
#include <rpc/pmap_clnt.h>
+#if defined(__dietlibc__)
+/* 16.12.2006, Sampo Kellomaki (sampo at iki.fi)
+ * dietlibc-0.30 does not have implementation of getmntent_r() */
+/* OTOH: why we use getmntent_r instead of getmntent? TODO... */
+struct mntent *getmntent_r(FILE* stream, struct mntent* result, char* buffer, int bufsize)
+{
+ /* *** XXX FIXME WARNING: This hack is NOT thread safe. --Sampo */
+ struct mntent* ment = getmntent(stream);
+ memcpy(result, ment, sizeof(struct mntent));
+ return result;
+}
+#endif
+
+
// Not real flags, but we want to be able to check for this.
enum {
MOUNT_USERS = (1<<28)*ENABLE_DESKTOP,
@@ -1564,7 +1578,8 @@
sizeof(bb_common_bufsiz1)))
{
// Don't show rootfs. FIXME: why??
- if (!strcmp(mtpair->mnt_fsname, "rootfs")) continue;
+ // util-linux 2.12a happily shows rootfs...
+ //if (!strcmp(mtpair->mnt_fsname, "rootfs")) continue;
if (!fstype || !strcmp(mtpair->mnt_type, fstype))
printf("%s on %s type %s (%s)\n", mtpair->mnt_fsname,
More information about the busybox-cvs
mailing list