- /* Desired file formats either start with digit+space or "trace32". */
- if (g_strcmp0(format_name_sig, "trace32")) {
- if (inc)
- inc->format = AD_FORMAT_BINHDR;
- } else if (g_ascii_isdigit(format_name[0]) && (format_name[1] == 0x20)) {
- if (inc)
- inc->format = AD_FORMAT_TXTHDR;
- g_free(format_name_sig);
+ format = AD_FORMAT_UNKNOWN;
+ if (has_trace32) {
+ /* Literal "trace32" leader, binary header follows. */
+ format = AD_FORMAT_BINHDR;
+ } else if (g_ascii_isdigit(format_name[0]) && (format_name[1] == SPACE)) {
+ /* Digit and SPACE leader, currently unsupported text header. */
+ format = AD_FORMAT_TXTHDR;