\r
CONST EFI_GUID gZeroGuid = { 0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } };\r
\r
+//\r
+// Module Global:\r
+// Since this driver will only ever produce one instance of the Logging Hub\r
+// protocol you are not required to dynamically allocate the PrivateData.\r
+//\r
+DATA_HUB_INSTANCE mPrivateData;\r
+\r
//\r
// Worker functions private to this file\r
//\r
-STATIC\r
DATA_HUB_FILTER_DRIVER *\r
FindFilterDriverByEvent (\r
IN LIST_ENTRY *Head,\r
IN EFI_EVENT Event\r
);\r
\r
-STATIC\r
EFI_DATA_RECORD_HEADER *\r
GetNextDataRecord (\r
IN LIST_ENTRY *Head,\r
@retval EFI_OUT_OF_RESOURCES - If data was not logged due to lack of system \r
resources.\r
**/\r
-STATIC\r
EFI_STATUS\r
EFIAPI\r
DataHubLogData (\r
@retval EFI_OUT_OF_RESOURCES - Record was not returned due to lack of system resources.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
EFIAPI\r
DataHubGetNextRecord (\r
// Use the MTC from the Filter Driver.\r
//\r
FilterMonotonicCount = FilterDriver->GetNextMonotonicCount;\r
+ \r
+ //\r
+ // The GetNextMonotonicCount field remembers the last value from the previous time.\r
+ // But we already processed this vaule, so we need to find the next one.\r
+ //\r
+ *Record = GetNextDataRecord (&Private->DataListHead, ClassFilter, &FilterMonotonicCount);\r
if (FilterMonotonicCount != 0) {\r
+ *MonotonicCount = FilterMonotonicCount;\r
+ }\r
+ \r
+ if ((FilterDriver->GetNextMonotonicCount != 0) && (FilterMonotonicCount == 0)) {\r
//\r
- // The GetNextMonotonicCount field remembers the last value from the previous time.\r
- // But we already processed this vaule, so we need to find the next one.\r
+ // If there is no new record to get exit now.\r
//\r
- *Record = GetNextDataRecord (&Private->DataListHead, ClassFilter, &FilterMonotonicCount);\r
- *MonotonicCount = FilterMonotonicCount;\r
- if (FilterMonotonicCount == 0) {\r
- //\r
- // If there is no new record to get exit now.\r
- //\r
- return EFI_NOT_FOUND;\r
- }\r
+ *MonotonicCount = 0;\r
+ return EFI_NOT_FOUND;\r
}\r
}\r
}\r
system resources.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
EFIAPI\r
DataHubRegisterFilterDriver (\r
@retval EFI_NOT_FOUND - If FilterEvent does not exist\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
EFIAPI\r
DataHubUnregisterFilterDriver (\r
@retval NULL - If Event is not in the list\r
\r
**/\r
-STATIC\r
DATA_HUB_FILTER_DRIVER *\r
FindFilterDriverByEvent (\r
IN LIST_ENTRY *Head,\r
@retval NULL - If no data record exists.\r
\r
**/\r
-STATIC\r
EFI_DATA_RECORD_HEADER *\r
GetNextDataRecord (\r
IN LIST_ENTRY *Head,\r
\r
return Record;\r
}\r
-//\r
-// Module Global:\r
-// Since this driver will only ever produce one instance of the Logging Hub\r
-// protocol you are not required to dynamically allocate the PrivateData.\r
-//\r
-DATA_HUB_INSTANCE mPrivateData;\r
\r
/**\r
\r