qvm_parse_block()

Parse a string to populate a qvm_state_block structure

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 where the parsed information is to be stored.
pci_idp
If non-NULL, and the pci:vid/did/didx is encountered, store true.

Library:

Provided by qvm; no external library is required.

Description:

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

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

Note:

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

Returns:

A pointer to first character following the location.