diff loadtools/ltmisc.c @ 70:e2698daf40d1

dieid implemented in fc-loadtool as well
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 26 Jul 2013 17:51:49 +0000
parents
children 0c1480317c18
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loadtools/ltmisc.c	Fri Jul 26 17:51:49 2013 +0000
@@ -0,0 +1,23 @@
+/*
+ * This module is a place to implement little miscellaneous fc-loadtool
+ * commands which don't belong anywhere else.
+ */
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdint.h>
+
+cmd_dieid()
+{
+	uint32_t addr;
+	uint16_t data;
+	int stat;
+
+	for (addr = 0xFFFEF010; addr <= 0xFFFEF016; addr += 2) {
+		stat = do_r16(addr, &data);
+		if (stat)
+			return(stat);
+		printf("%08lX: %04X\n", (u_long)addr, (int)data);
+	}
+	return(0);
+}