since the Epoch). Otherwise, Mtime is not written\r
to.\r
\r
- @retval EFI_SUCCESS Output parameters have been set successfully.\r
-\r
- @retval EFI_ACCESS_DENIED NewInfo requests changing both CreateTime and\r
- ModificationTime, but to values that differ from\r
- each other. The Virtio Filesystem device does not\r
- support this.\r
+ @retval EFI_SUCCESS Output parameters have been set successfully.\r
+\r
+ @retval EFI_INVALID_PARAMETER At least one of the CreateTime, LastAccessTime\r
+ and ModificationTime fields in NewInfo\r
+ represents an actual update relative to the\r
+ current state of the file (expressed in Info),\r
+ but does not satisfy the UEFI spec\r
+ requirements on EFI_TIME.\r
+\r
+ @retval EFI_ACCESS_DENIED NewInfo requests changing both CreateTime and\r
+ ModificationTime, but to values that differ\r
+ from each other. The Virtio Filesystem device\r
+ does not support this.\r
**/\r
EFI_STATUS\r
VirtioFsGetFuseTimeUpdates (\r
CompareMem (NewTime[Idx], Time[Idx], sizeof (EFI_TIME)) == 0) {\r
Change[Idx] = FALSE;\r
} else {\r
+ if (!IsTimeValid (NewTime[Idx])) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
Change[Idx] = TRUE;\r
Seconds[Idx] = EfiTimeToEpoch (NewTime[Idx]);\r
}\r