aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-12-18 23:07:42 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-12-18 23:07:42 +0000
commit079279f3e56d0e46ed83069aaa9eb9a06d5f70e4 (patch)
tree1141f3e3cf5717e6c9b2fa1a788553fd84914b5b /util-linux
parent3693ee3e722ac89fd4f01dbcf3ece7fc909b3799 (diff)
downloadbusybox-w32-079279f3e56d0e46ed83069aaa9eb9a06d5f70e4.tar.gz
busybox-w32-079279f3e56d0e46ed83069aaa9eb9a06d5f70e4.tar.bz2
busybox-w32-079279f3e56d0e46ed83069aaa9eb9a06d5f70e4.zip
mount: add getmntent_r stub for dietlibc
git-svn-id: svn://busybox.net/trunk/busybox@16999 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mount.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index f8ae1df19..35665a2b5 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -31,6 +31,20 @@
31#include <rpc/pmap_clnt.h> 31#include <rpc/pmap_clnt.h>
32 32
33 33
34#if defined(__dietlibc__)
35/* 16.12.2006, Sampo Kellomaki (sampo@iki.fi)
36 * dietlibc-0.30 does not have implementation of getmntent_r() */
37/* OTOH: why we use getmntent_r instead of getmntent? TODO... */
38struct mntent *getmntent_r(FILE* stream, struct mntent* result, char* buffer, int bufsize)
39{
40 /* *** XXX FIXME WARNING: This hack is NOT thread safe. --Sampo */
41 struct mntent* ment = getmntent(stream);
42 memcpy(result, ment, sizeof(struct mntent));
43 return result;
44}
45#endif
46
47
34// Not real flags, but we want to be able to check for this. 48// Not real flags, but we want to be able to check for this.
35enum { 49enum {
36 MOUNT_USERS = (1<<28)*ENABLE_DESKTOP, 50 MOUNT_USERS = (1<<28)*ENABLE_DESKTOP,
@@ -1564,7 +1578,8 @@ int mount_main(int argc, char **argv)
1564 sizeof(bb_common_bufsiz1))) 1578 sizeof(bb_common_bufsiz1)))
1565 { 1579 {
1566 // Don't show rootfs. FIXME: why?? 1580 // Don't show rootfs. FIXME: why??
1567 if (!strcmp(mtpair->mnt_fsname, "rootfs")) continue; 1581 // util-linux 2.12a happily shows rootfs...
1582 //if (!strcmp(mtpair->mnt_fsname, "rootfs")) continue;
1568 1583
1569 if (!fstype || !strcmp(mtpair->mnt_type, fstype)) 1584 if (!fstype || !strcmp(mtpair->mnt_type, fstype))
1570 printf("%s on %s type %s (%s)\n", mtpair->mnt_fsname, 1585 printf("%s on %s type %s (%s)\n", mtpair->mnt_fsname,