Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/ndis Switch NdisOpenFile() to mountlist iterator.
details: https://anonhg.NetBSD.org/src/rev/c239b4d6bd1e
branches: trunk
changeset: 823125:c239b4d6bd1e
user: hannken <hannken%NetBSD.org@localhost>
date: Thu Apr 13 09:44:48 2017 +0000
description:
Switch NdisOpenFile() to mountlist iterator.
XXX: Do we need a function or variable to retrieve the root mount or NULL?
diffstat:
sys/compat/ndis/subr_ndis.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r a25de7a2c794 -r c239b4d6bd1e sys/compat/ndis/subr_ndis.c
--- a/sys/compat/ndis/subr_ndis.c Thu Apr 13 09:41:28 2017 +0000
+++ b/sys/compat/ndis/subr_ndis.c Thu Apr 13 09:44:48 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_ndis.c,v 1.28 2014/03/25 16:23:58 christos Exp $ */
+/* $NetBSD: subr_ndis.c,v 1.29 2017/04/13 09:44:48 hannken Exp $ */
/*-
* Copyright (c) 2003
@@ -37,7 +37,7 @@
__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.67.2.7 2005/03/31 21:50:11 wpaul Exp $");
#endif
#ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.28 2014/03/25 16:23:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.29 2017/04/13 09:44:48 hannken Exp $");
#endif
/*
@@ -3042,6 +3042,8 @@
char *path;
linker_file_t head, lf;
void *kldstart, *kldend;
+ mount_iterator_t *iter;
+ struct mount *mp;
ndis_unicode_to_ascii(filename->us_buf,
filename->us_len, &afilename);
@@ -3094,7 +3096,10 @@
return;
}
- if (TAILQ_EMPTY(&mountlist)) {
+ mountlist_iterator_init(&iter);
+ mp = mountlist_iterator_next(iter);
+ mountlist_iterator_destroy(iter);
+ if (mp == NULL) {
ExFreePool(fh);
*status = NDIS_STATUS_FILE_NOT_FOUND;
printf("NDIS: could not find file %s in linker list\n",
Home |
Main Index |
Thread Index |
Old Index