check_mounted
static int check_mounted(const char *, mode_t);
if (check_mounted(fname, sb.st_mode) == -1)