git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changes to the module loader to handle specific errors from modules
[tpg/acess2.git]
/
Modules
/
Network
/
NE2000
/
ne2000.c
diff --git
a/Modules/Network/NE2000/ne2000.c
b/Modules/Network/NE2000/ne2000.c
index
14314b8
..
700c35e
100644
(file)
--- a/
Modules/Network/NE2000/ne2000.c
+++ b/
Modules/Network/NE2000/ne2000.c
@@
-127,6
+127,11
@@
int Ne2k_Install(char **Options)
giNe2k_CardCount += PCI_CountDevices( csaCOMPAT_DEVICES[i].Vendor, csaCOMPAT_DEVICES[i].Device, 0 );
}
giNe2k_CardCount += PCI_CountDevices( csaCOMPAT_DEVICES[i].Vendor, csaCOMPAT_DEVICES[i].Device, 0 );
}
+ if( giNe2k_CardCount == 0 ) {
+ Log("[Ne2k ] No cards detected\n");
+ return MODULE_ERR_NOTNEEDED;
+ }
+
// Enumerate Cards
k = 0;
gpNe2k_Cards = calloc( giNe2k_CardCount, sizeof(tCard) );
// Enumerate Cards
k = 0;
gpNe2k_Cards = calloc( giNe2k_CardCount, sizeof(tCard) );
@@
-216,7
+221,7
@@
int Ne2k_Install(char **Options)
gNe2k_DriverInfo.RootNode.Size = giNe2k_CardCount;
DevFS_AddDevice( &gNe2k_DriverInfo );
gNe2k_DriverInfo.RootNode.Size = giNe2k_CardCount;
DevFS_AddDevice( &gNe2k_DriverInfo );
- return
1
;
+ return
MODULE_ERR_OK
;
}
/**
}
/**
UCC
git Repository :: git.ucc.asn.au