inteltool: first preview for machine-readable output
Signed-off-by: Anton Kochkov <[email protected]>
---

This is only for preview and discussion, it's still ugly and dont safe/clear.

Attachment: inteltool_machine_readable_first_preview.patch
Description: Binary data

#include <stdio.h>

#include "inteltool.h"
/*
char *xml_header = "<?xml version="1.0" encoding="UTF-8"?> \
		<database xmlns="http://nouveau.freedesktop.org/"; \
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; \
		xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">"
*/

void machine_readable_printf(reg_t *reg) {

#ifdef XML
	printf("<register domain='%s' base='0x%x' offset='0x%x' size='%d' value='0x%x' name='%s' description='%s' />\n",
		reg->domain, reg->base_addr, reg->offset, reg->size, reg->value, reg->name, reg->desc);
#endif

#ifndef XML
	printf("domain: %s\n", reg->domain);
	printf("base addr: 0x%x\n", reg->base_addr);
	printf("offset: 0x%x\n", reg->offset);
	printf("size: %d\n", reg->size);
	printf("value: 0x%x\n", reg->value);
	printf("name: %s\n", reg->name);
	printf("description: %s\n", reg->desc);
#endif
}

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to