XboxDev / nxdk

The cross-platform, open-source SDK to develop for original Xbox: *new* xdk
437 stars 66 forks source link

net: Allow for initialization to gracefully fail #633

Closed LoveMHz closed 1 year ago

LoveMHz commented 1 year ago

This PR modifies the return type of low_level_init() inside of nvnet to allow it to pass an error back to nvnetif_init() on failure to initialize.

With a retail kernel, calls to ExQueryNonVolatileSetting can fail if the EEPROM is corrupt. In its current state, nxdk, will bail via abort() after the call here to ExQueryNonVolatileSetting.

This PR addresses the above-mentioned issue and allows for the application to handle if nvnet was successful, or not, in initialization.