oem: meta: Add decode_oem_meta_file_io_write_req()

Add decode_oem_meta_file_io_write_req function.
Deprecate decode_oem_meta_file_io_req function.

The difference between functions decode_oem_meta_file_io_req and
decode_oem_meta_file_io_write_req:

- decode_oem_meta_file_io_write_req:
  - return 0 on success and return a negative errno value on failure.
  - input parameters is structure.
  - add req_length parameter to check whether the total length of
    the request is buffer overflow.
- decode_oem_meta_file_io_req:
  - return PLDM_SUCCESS on success and return another PLDM completion
    code on failure.
  - input parameters is passing individual pointers.

Change-Id: Iae3c7f24128bc25c5af6951f34fdc6d8a7b90381
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Signed-off-by: Lora Lin <lora.lin.wiwynn@gmail.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/src/api.h b/src/api.h
index 3f1fed0..f99f3ed 100644
--- a/src/api.h
+++ b/src/api.h
@@ -32,6 +32,10 @@
 	case -ENOMSG:
 		rc = PLDM_ERROR_INVALID_PLDM_TYPE;
 		break;
+	case -EBADMSG:
+	case -EOVERFLOW:
+		rc = PLDM_ERROR_INVALID_LENGTH;
+		break;
 	default:
 		assert(false);
 		rc = PLDM_ERROR;