Fix smm_variable getNextVariable invalid parameter handling

The case where a non-empty variable name that doesn't exist
was being reported with a status of EFI_NOT_FOUND. This
error condition should have the status EFI_INVALID_PARAMETER
to allow a client to distinguish between the normal termination
case and the case where a variable name that no longer exists
is passed.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: Ia67b5ff25782676a554842365d5c15640ed101da
diff --git a/components/service/smm_variable/backend/variable_index.h b/components/service/smm_variable/backend/variable_index.h
index 63f42ab..2f0197d 100644
--- a/components/service/smm_variable/backend/variable_index.h
+++ b/components/service/smm_variable/backend/variable_index.h
@@ -132,6 +132,7 @@
  * @param[in]  guid The variable's guid
  * @param[in]  name_size The name parameter's size
  * @param[in]  name The variable's name
+ * @param[out] status Provides error status
  *
  * @return     Pointer to variable_info or NULL
  */
@@ -139,7 +140,8 @@
 	const struct variable_index *context,
 	const EFI_GUID *guid,
 	size_t name_size,
-	const int16_t *name);
+	const int16_t *name,
+	efi_status_t *status);
 
 /**
  * @brief      Add a new entry to the index