static int tab_is_kernel(struct libmnt_table *tb)
{
	struct libmnt_fs *fs = NULL;
	struct libmnt_iter *itr;

	itr = mnt_new_iter(MNT_ITER_BACKWARD);
	if (!itr)
		return 0;

	while (mnt_table_next_fs(tb, itr, &fs) == 0) {
		if (!mnt_fs_is_kernel(fs)) {
			mnt_free_iter(itr);
			return 0;
		}
	}

	mnt_free_iter(itr);
	return 1;
}
static int tab_is_kernel(struct libmnt_table *tb)
{
	struct libmnt_fs *fs = NULL;
	struct libmnt_iter *itr;

	itr = mnt_new_iter(MNT_ITER_BACKWARD);
	if (!itr)
		return 0;

	while (mnt_table_next_fs(tb, itr, &fs) == 0) {
		if (!mnt_fs_is_kernel(fs)) {
			mnt_free_iter(itr);
			return 0;
		}
	}

	mnt_free_iter(itr);
	return 1;
}