Module Name: src
Committed By: hannken
Date: Thu Apr 13 09:44:48 UTC 2017
Modified Files:
src/sys/compat/ndis: subr_ndis.c
Log Message:
Switch NdisOpenFile() to mountlist iterator.
XXX: Do we need a function or variable to retrieve the root mount or NULL?
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/compat/ndis/subr_ndis.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/compat/ndis/subr_ndis.c
diff -u src/sys/compat/ndis/subr_ndis.c:1.28 src/sys/compat/ndis/subr_ndis.c:1.29
--- src/sys/compat/ndis/subr_ndis.c:1.28 Tue Mar 25 16:23:58 2014
+++ src/sys/compat/ndis/subr_ndis.c Thu Apr 13 09:44:48 2017
@@ -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 @@ NdisOpenFile(ndis_status *status, ndis_h
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 @@ NdisOpenFile(ndis_status *status, ndis_h
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",