getfs_by_dir (const char *dir) {
	struct mntentchn *mc, *mc0;
	char *cdir;

	mc0 = fstab_head();
	for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
		if (streq(mc->m.mnt_dir, dir))
			return mc;

	cdir = canonicalize(dir);
	for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
		if (streq(mc->m.mnt_dir, cdir)) {
			free(cdir);
			return mc;
		}
	}
	free(cdir);
	return NULL;
}
getfs_by_dir (const char *dir) {
	struct mntentchn *mc, *mc0;
	char *cdir;

	mc0 = fstab_head();
	for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
		if (streq(mc->m.mnt_dir, dir))
			return mc;

	cdir = canonicalize(dir);
	for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
		if (streq(mc->m.mnt_dir, cdir)) {
			free(cdir);
			return mc;
		}
	}
	free(cdir);
	return NULL;
}