- prom_getstring(node, "version", prom_version, sizeof(prom_version));
+ prom_getstring (node, "version", buffer, sizeof (buffer));
+
+ prom_printf ("\n");
+
+ if (strncmp (buffer, "OBP ", 4))
+ goto strange_version;
+
+ /*
+ * Version field is expected to be 'OBP xx.yy.zz date...'
+ * However, Sun can't stick to this format very well, so
+ * we need to check for 'OBP xx.yy.zz date...' and adjust
+ * accordingly. -spot
+ */
+
+ if (strncmp (buffer, "OBP ", 5))
+ bufadjust = 4;
+ else
+ bufadjust = 5;
+
+ p = buffer + bufadjust;
+ while (p && isdigit(*p) && i < 3) {
+ ints[i++] = simple_strtoul(p, NULL, 0);
+ if ((p = strchr(p, '.')) != NULL)
+ p++;
+ }
+ if (i != 3)
+ goto strange_version;
+
+ prom_rev = ints[1];
+ prom_prev = (ints[0] << 16) | (ints[1] << 8) | ints[2];
+
+ printk ("PROMLIB: Sun IEEE Boot Prom %s\n", buffer + bufadjust);