]>
Commit | Line | Data |
---|---|---|
224c7076 A |
1 | --- getmntinfo.c.orig 2007-01-21 11:53:36.000000000 -0800 |
2 | +++ getmntinfo.c 2007-01-21 17:05:23.000000000 -0800 | |
3 | @@ -46,25 +46,25 @@ | |
4 | * Return information about mounted filesystems. | |
5 | */ | |
6 | int | |
7 | -getmntinfo(mntbufp, flags) | |
8 | - struct statfs **mntbufp; | |
9 | +getmntinfo64(mntbufp, flags) | |
10 | + struct statfs64 **mntbufp; | |
11 | int flags; | |
12 | { | |
13 | - static struct statfs *mntbuf; | |
14 | + static struct statfs64 *mntbuf; | |
15 | static int mntsize; | |
16 | static long bufsize; | |
17 | ||
18 | - if (mntsize <= 0 && (mntsize = getfsstat(0, 0, MNT_NOWAIT)) < 0) | |
19 | + if (mntsize <= 0 && (mntsize = getfsstat64(0, 0, MNT_NOWAIT)) < 0) | |
20 | return (0); | |
21 | - if (bufsize > 0 && (mntsize = getfsstat(mntbuf, bufsize, flags)) < 0) | |
22 | + if (bufsize > 0 && (mntsize = getfsstat64(mntbuf, bufsize, flags)) < 0) | |
23 | return (0); | |
24 | - while (bufsize <= mntsize * sizeof(struct statfs)) { | |
25 | + while (bufsize <= mntsize * sizeof(struct statfs64)) { | |
26 | if (mntbuf) | |
27 | free(mntbuf); | |
28 | - bufsize = (mntsize + 1) * sizeof(struct statfs); | |
29 | - if ((mntbuf = (struct statfs *)malloc(bufsize)) == 0) | |
30 | + bufsize = (mntsize + 1) * sizeof(struct statfs64); | |
31 | + if ((mntbuf = (struct statfs64 *)malloc(bufsize)) == 0) | |
32 | return (0); | |
33 | - if ((mntsize = getfsstat(mntbuf, bufsize, flags)) < 0) | |
34 | + if ((mntsize = getfsstat64(mntbuf, bufsize, flags)) < 0) | |
35 | return (0); | |
36 | } | |
37 | *mntbufp = mntbuf; |