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 */
maximilian attems wrote:> 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 >See, this is exactly the reason for having a minimal mount rather than fullblown util-linux-ng stuff... When we're talking about making it 30 times bigger, there better be motivation for *everything*. It doesn't really make sense to have a minimal klibc and then compile full-fat utilities against it, at least not without providing alternatives. But in the case of mount(8), there is a whole bunch of stuff that definitely are not needed in a klibc-style environment, especially now when NFS mountd stuff has moved into the kernel. -hpa
On Wed, Jul 23, 2008 at 12:24:47PM +0200, maximilian attems wrote:> 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.s/mount/swapon/ mount(8) uses "struct my_mntent", see mount/mount_mntent.h. Karel -- Karel Zak <kzak at redhat.com>
Apparently Analagous Threads
- [git pull v2] initial mntent.h, mount features, ipconfig fixes
- initial mntent.h, mount features, ipconfig fixes
- [PATCH] include: [mntent.h] Add MNTTYPE_SWAP definition
- [mntent]: line x in /etc/fstab is bad
- [PATCH] kinit: Add ability to mount filesystems via /etc/fstab or cmdline