FreeBSD Bugzilla – Attachment 189351 Details for
Bug 224851
Bug in getmntinfo(3) / getfsstat(2) ?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
test file to demonstrate the problem
mnt-test.c (text/x-csrc), 668 bytes, created by
Jamie Landeg-Jones
on 2018-01-02 23:15:19 UTC
(
hide
)
Description:
test file to demonstrate the problem
Filename:
MIME Type:
Creator:
Jamie Landeg-Jones
Created:
2018-01-02 23:15:19 UTC
Size:
668 bytes
patch
obsolete
>#include <stdio.h> >#include <string.h> >#include <sys/mount.h> > >int main(int argc, char **argv) >{ > struct statfs *mntbuf; > int i, nitems; > > nitems = getmntinfo(&mntbuf, (argc == 1) ? MNT_WAIT : MNT_NOWAIT); > if (nitems <= 0) > printf ("getmntinfo fail\n"); > > for (i = 0; i < nitems; i++) { > if (strcmp(mntbuf[i].f_fstypename, "autofs") == 0) { > printf("skipping %s, filesystem type is autofs\n", > mntbuf[i].f_mntonname); > continue; > } > > if ((mntbuf[i].f_flags & MNT_AUTOMOUNTED) == 0) { > printf("skipping %s, not automounted\n", > mntbuf[i].f_mntonname); > continue; > } > > printf("%s IS automounted!!!!!!!!!\n", > mntbuf[i].f_mntonname); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 224851
: 189351