2
* Copyright © Jan Engelhardt, 2007 - 2009
4
* This file is part of pam_mount; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public License
6
* as published by the Free Software Foundation; either version 2.1
7
* of the License, or (at your option) any later version.
15
#include "pam_mount.h"
17
int pmt_already_mounted(const struct config *const config,
18
const struct vol *vpt, struct HXbtree *vinfo)
20
int (*xcmp)(const char *, const char *);
24
if ((dev = pmt_vol_to_dev(vpt)) == NULL) {
25
l0g("pmt::vol_to_dev: %s\n", strerror(errno));
29
xcmp = fstype2_icase(vpt->type) ? strcasecmp : strcmp;
31
cret = pmt_cmtab_mounted(dev, vpt->mountpoint);
32
sret = pmt_smtab_mounted(dev, vpt->mountpoint, xcmp);
33
if (cret > 0 || sret > 0)
35
if (cret == 0 && sret == 0)
43
#endif /* HAVE_GETMNTENT */