New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Derive Default for Time #38
Conversation
Time cannot be a null pointer when passing to GetTime. Thus there needs to be a default initialization. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
Can you elaborate? How does a NULL-Pointer relate to default initialization? I would imagine using Generally, I don't mind the |
|
Under the Status Code Returned in This basically means that unless the Time parameter is initialized before being passed to the function, it well will just return an error. I also tried using it (Basically passing an uninitialized Time) and well, I got an error until I tried initializing a Time with everything 0 beforehand. |
Sorry, but this is not true. Your quote from the specification states that if you pass Now this does not mean that implementations follow this. But it is a crucial difference whether the spec mandates something, or whether implementations violate the spec and we try to adapt.
This is really weird. So you are saying passing the same structure to Anyway, if you happen to run across an UEFI firmware implementation that fails in |
|
Sorry, my bad. Using Of course, I am only testing on qemu with OVMF currently. |
No worries! I am just glad this is not a weird implementation quirk.
We all are :) But sooner or later people will report the weirdest behavior of their firmware... I will merge this nonetheless, as I think it is quite useful if you want to avoid the MaybeUninit dance. Thanks, and sorry for the long discussion! |
Time cannot be a null pointer when passing to GetTime. Thus there needs
to be a default initialization.
Signed-off-by: Ayush Singh ayushsingh1325@gmail.com