getfs_by_devname (const char *devname) {
	struct mntentchn *mc, *mc0;

	mc0 = fstab_head();

	/* canonical devname in fstab */
	for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
		if (streq(mc->m.mnt_fsname, devname))
			return mc;

	/* noncanonical devname in fstab */
	for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
		char *fs;

		if (strncmp(mc->m.mnt_fsname, "LABEL=", 6) == 0 ||
				strncmp(mc->m.mnt_fsname, "UUID=", 5) == 0)
			continue;

		fs = canonicalize_spec(mc->m.mnt_fsname);
		if (streq(fs, devname)) {
			free(fs);
			return mc;
		}
		free(fs);
	}

	return NULL;
}
getfs_by_devname (const char *devname) {
	struct mntentchn *mc, *mc0;

	mc0 = fstab_head();

	 
	for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
		if (streq(mc->m.mnt_fsname, devname))
			return mc;

	 
	for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
		char *fs;

		if (strncmp(mc->m.mnt_fsname, "LABEL=", 6) == 0 ||
				strncmp(mc->m.mnt_fsname, "UUID=", 5) == 0)
			continue;

		fs = canonicalize_spec(mc->m.mnt_fsname);
		if (streq(fs, devname)) {
			free(fs);
			return mc;
		}
		free(fs);
	}

	return NULL;
}