- /* FIXME maybe: this close could clobber errno from fopen failure. */
- if (0 <= lockfd)
- close (lockfd);
- return NULL;
- }
-
- while ((ret = getmntent (fp, &mnt)) == 0)
- {
- /* Don't show automounted filesystems twice on e.g., Solaris. */
- if (!all_fs && MNT_IGNORE (&mnt))
- continue;
-
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
- me->me_devname = xstrdup (mnt.mnt_special);
- me->me_mountdir = xstrdup (mnt.mnt_mountp);
- me->me_type = xstrdup (mnt.mnt_fstype);
- me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
- me->me_next = NULL;
+ while ((ret = getmntent (fp, &mnt)) == 0)
+ {
+ me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
+ me->me_devname = xstrdup (mnt.mnt_special);
+ me->me_mountdir = xstrdup (mnt.mnt_mountp);
+ me->me_type = xstrdup (mnt.mnt_fstype);
+ me->me_dummy = MNT_IGNORE (&mnt) != 0;
+ me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
+ me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
+
+ /* Add to the linked list. */
+ *mtail = me;
+ mtail = &me->me_next;
+ }