qvm_parse_block()

Parse a string to populate a structure that describes a data element

Synopsis:

#include <qvm/utils.h>
char* qvm_parse_block(const char *str,
                      struct qvm_state_block *bp,
                      int *pci_idp)

Arguments:

str
A pointer to the character string containing the location to be parsed.
bp
A pointer to a block structure for storing the parsed information.
pci_idp
If non-NULL, and the pci:vid/did/didx is encountered, store true.

Description:

See qvm_state_block for information about the structure. The string is formatted as follows: [type:]location.

You can set a default type by pre-populating the type field referenced by bp. However, if you explicitly specify type, this type will override your pre-populated default type.

CAUTION:

If you call this function after startup is complete, your guest system may terminate.

Returns:

A pointer to the first character following the parsed location.