aws-nitro-enclaves-nsm-api icon indicating copy to clipboard operation
aws-nitro-enclaves-nsm-api copied to clipboard

driver: wrap fd returned from nsm_init in Option

Open crawford opened this issue 8 months ago • 0 comments

Returning an Option instead of the raw file descriptor makes it easier for the caller to ensure that the file was opened successfully. It also forces them to handle any errors instead of allowing them to assume that it was successful, only to be met with "InternalError" when nsm_process_request is later used.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

crawford avatar Oct 11 '23 20:10 crawford