Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/lib/libc/gen Pull up revision 1.14 (requested by bouyer i...
details: https://anonhg.NetBSD.org/src/rev/e44e552b8467
branches: netbsd-3
changeset: 575310:e44e552b8467
user: tron <tron%NetBSD.org@localhost>
date: Fri Apr 08 13:38:11 2005 +0000
description:
Pull up revision 1.14 (requested by bouyer in ticket #125):
PR/29919: Evaldo Gardenali: getmntinfo() calling deprecated function getfsstat()
Fixed by defining an _getfsstat() internal function and calling that instead.
diffstat:
lib/libc/gen/getmntinfo.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (49 lines):
diff -r b9643b9a6e80 -r e44e552b8467 lib/libc/gen/getmntinfo.c
--- a/lib/libc/gen/getmntinfo.c Fri Apr 08 13:38:06 2005 +0000
+++ b/lib/libc/gen/getmntinfo.c Fri Apr 08 13:38:11 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getmntinfo.c,v 1.13 2004/04/21 01:05:32 christos Exp $ */
+/* $NetBSD: getmntinfo.c,v 1.13.2.1 2005/04/08 13:38:11 tron Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getmntinfo.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: getmntinfo.c,v 1.13 2004/04/21 01:05:32 christos Exp $");
+__RCSID("$NetBSD: getmntinfo.c,v 1.13.2.1 2005/04/08 13:38:11 tron Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -53,6 +53,8 @@
__weak_alias(getmntinfo,_getmntinfo)
#endif
+int _getfsstat(struct statfs12 *, long, int);
+
/*
* Return information about mounted filesystems.
*/
@@ -68,10 +70,10 @@
_DIAGASSERT(mntbufp != NULL);
if (mntsize <= 0 &&
- (mntsize = getfsstat(NULL, 0L, MNT_NOWAIT)) == -1)
+ (mntsize = _getfsstat(NULL, 0L, MNT_NOWAIT)) == -1)
return (0);
if (bufsize > 0 &&
- (mntsize = getfsstat(mntbuf, (long)bufsize, flags)) == -1)
+ (mntsize = _getfsstat(mntbuf, (long)bufsize, flags)) == -1)
return (0);
while (bufsize <= mntsize * sizeof(struct statfs12)) {
if (mntbuf)
@@ -79,7 +81,7 @@
bufsize = (mntsize + 1) * sizeof(struct statfs12);
if ((mntbuf = malloc(bufsize)) == NULL)
return (0);
- if ((mntsize = getfsstat(mntbuf, (long)bufsize, flags)) == -1)
+ if ((mntsize = _getfsstat(mntbuf, (long)bufsize, flags)) == -1)
return (0);
}
*mntbufp = mntbuf;
Home |
Main Index |
Thread Index |
Old Index