Some farther info:
- mntent.h from AIX 4.3.3 included
- i sought some useful strings as arg. for setmntent()
through /usr/inlude/, but was unsuccessful.
- i try pass, as arg 1 of setmntent() NULL, but result is
[zito@p16 fileutils-4.1]$ ./src/df
./src/df: cannot read table of mounted filesystems
- i sought on http://www.rs6000.ibm.com/cgi-bin/ds_form,
but functions from mntent.h are not documented here.
- i try disassemble function setmntent() using gdb
(i am not expert), i found that arg is compared with strings
"/etc/filesystems" or "/etc/fstab". When string
match neither, function returns.
File /etc/filesystems really exists, but /etc/fstab not.
When i try to pass these strings to function setmntent(),
then ./src/df returns information accordingly
to /etc/filesystems definitions.
[zito@p16 fileutils-4.1]$ ./src/df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hd4 16384 14288 2096 88% /
/dev/hd1 16384 860 15524 6% /home
/dev/hd2 802816 738364 64452 92% /usr
/dev/hd9var 65536 24184 41352 37% /var
/dev/hd3 49152 2680 46472 6% /tmp
/dev/cd0 16384 14288 2096 88% /cdrom
/dev/cd0 16384 14288 2096 88% /infocd
/dev/lv00 2097152 869108 1228044 42% /iczfs
- old binaries of fileutils-4.0, compiled on AIX4.2.1 returns
following:
[zito@p16 fileutils-4.1]$ /iczfs/opt/fileutils-4.0/bin/df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hd4 16384 14288 2096 87% /
/dev/hd2 802816 738364 64452 92% /usr
/dev/hd9var 65536 24188 41348 37% /var
/dev/hd3 49152 2680 46472 5% /tmp
/dev/hd1 16384 860 15524 5% /home
/dev/lv00 2097152 869108 1228044 41% /iczfs
I deduce, that functions from /usr/include/mntent.h on AIX 4.3.3
are not implemented for tracking information on mounted filesystems,
or information "mount/not mounted" must be found in some way.
I think configure should found /usr/include/sys/mntctl.h
and /usr/include/sys/vmount.h (like on AIX4.2.1)
and ignore new /usr/include/mntent.h in AIX4.3.3.
Maybe searching in reverse order - first vmount
and after that mntent or something else ...
When I manually correct values in config.h, fileutils-4.1 succesfuly
compiled.
[zito@p16 fileutils-4.1]$ ./src/df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hd4 16384 14288 2096 88% /
/dev/hd2 802816 738364 64452 92% /usr
/dev/hd9var 65536 24196 41340 37% /var
/dev/hd3 49152 2680 46472 6% /tmp
/dev/hd1 16384 860 15524 6% /home
/dev/lv00 2097152 869164 1227988 42% /iczfs
[zito@p16 fileutils-4.1]$ /iczfs/opt/fileutils-4.0/bin/df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hd4 16384 14288 2096 87% /
/dev/hd2 802816 738364 64452 92% /usr
/dev/hd9var 65536 24196 41340 37% /var
/dev/hd3 49152 2680 46472 5% /tmp
/dev/hd1 16384 860 15524 5% /home
/dev/lv00 2097152 869164 1227988 41% /iczfs
--
Vaclav Ovsik email: [EMAIL PROTECTED]
ICZ a.s. phone: +420 19 7488511
fax: +420 19 7488506
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* bos43V src/bos/usr/include/mntent.h 1.1 */
/* */
/* Licensed Materials - Property of IBM */
/* */
/* (C) COPYRIGHT International Business Machines Corp. 2001 */
/* All Rights Reserved */
/* */
/* US Government Users Restricted Rights - Use, duplication or */
/* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */
/* */
/* IBM_PROLOG_END_TAG */
/*
* Structures, defines, and prototypes for the
* System V mntent functions.
*/
#ifndef _H_MNTENT
#define _H_MNTENT
#ifndef _H_STDIO
#include <stdio.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Generic mount options. */
#define MNTOPT_DEFAULTS "defaults" /* Use all default options. */
#define MNTOPT_RO "ro" /* Read only. */
#define MNTOPT_RW "rw" /* Read/write. */
#define MNTOPT_SUID "suid" /* Set uid allowed. */
#define MNTOPT_NOSUID "nosuid" /* No set uid allowed. */
#define MNTOPT_NOAUTO "noauto" /* Do not auto mount. */
/*
* Structure section.
*/
struct mntent {
char *mnt_fsname; /* Name of block special */
char *mnt_dir; /* Mount point */
char *mnt_type; /* vfs type */
char *mnt_opts; /* mount options */
int mnt_freq; /* dump frequency */
int mnt_passno; /* fsck pass number */
};
/*
* Function prototype section.
*/
#ifdef _NO_PROTO
extern FILE *setmntent();
extern int endmntent();
extern struct mntent *getmntent();
extern int addmntent();
extern char *hasmntopt();
#else
extern FILE *setmntent(const char *, const char *);
extern int endmntent(FILE *);
extern struct mntent *getmntent(FILE *);
extern int addmntent(FILE *, const struct mntent *);
extern char *hasmntopt(const struct mntent *, const char *);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _H_MNTENT */