+}
+
+/* VMS by jwz (text sent by Roland Barmettler <roli@barmettler.net>)
+ */
+static void
+vms (Display *dpy, Window window, int delay)
+{
+ XWindowAttributes xgwa;
+ scrolling_window *ts;
+ const char *sysname;
+ int char_delay = 0;
+ int dot_delay = 40000;
+ int chunk_delay = 500000;
+ char *s, *s1;
+ int i;
+ int arg_count;
+
+# ifdef __GNUC__
+ __extension__ /* don't warn about "string length is greater than the
+ length ISO C89 compilers are required to support"
+ in the following string constant... */
+# endif
+
+ const char *lines[] = {
+ "%CNXMAN, Lost connection to system #\n"
+ "%SHADOW-I-VOLPROC, DSA0: shadow master has changed. "
+ "Dump file WILL be written if system crashes.\n"
+ "\n",
+ "",
+
+ "%CNXMAN, Quorum lost, blocking activity\n"
+ "%CNXMAN, Timed-out lost connection to system #\n"
+ "%CNXMAN, Timed-out lost connection to system #\n"
+ "%CNXMAN, Timed-out lost connection to system #\n"
+ "%CNXMAN, Proposing reconfiguration of the VMScluster\n",
+ "",
+
+ "%CNXMAN, Removed from VMScluster system #\n"
+ "%CNXMAN, Removed from VMScluster system #\n"
+ "%CNXMAN, Removed from VMScluster system #\n"
+ "%CNXMAN, Completing VMScluster state transition\n",
+
+ "\n"
+ "**** OpenVMS (TM) Alpha Operating system V7.3-1 - BUGCHECK ****\n"
+ "\n"
+ "** Bugcheck code = 000005DC: CLUEXIT, Node voluntarily exiting "
+ "VMScluster\n"
+ "** Crash CPU: 00 Primary CPU: 00 Active CPUs: 00000001\n"
+ "** Current Process = NULL\n"
+ "** Current PSB ID = 00000001\n"
+ "** Image Name =\n"
+ "\n"
+ "** Dumping error log buffers to HBVS unit 0\n"
+ "**** Unable to dump error log buffers to remaining shadow set members\n"
+ "** Error log buffers not dumped to HBVS unit 200\n"
+ "\n"
+ "** Dumping memory to HBVS unit 0\n"
+ "**** Starting compressed selective memory dump at #...\n",
+
+ "...",
+
+ "\n"
+ "**** Memory dump complete - not all processes or global pages saved\n",
+
+ "\n"
+ "halted CPU 0\n",
+ "",
+
+ "\n"
+ "halt code = 5\n"
+ "HALT instruction executed\n"
+ "PC = ffffffff800c3884\n",
+
+ "\n"
+ "CPU 0 booting\n",
+
+ "\n"
+ "resetting all I/O buses\n"
+ "\n"
+ "\n"
+ };
+ char *args[8];
+ int ids[3];
+
+ XGetWindowAttributes (dpy, window, &xgwa);
+ ts = make_scrolling_window (dpy, window, "VMS", False);
+ XClearWindow(dpy,window);
+ ts->sub_x = 0;
+ ts->sub_y = 0;
+ ts->sub_width = xgwa.width;
+ ts->sub_height = xgwa.height;
+
+ sysname = "VMS001";
+# ifdef HAVE_UNAME
+ {
+ struct utsname uts;
+ if (uname (&uts) >= 0)
+ sysname = uts.nodename;
+ s = strchr (sysname, '.');
+ if (s) *s = 0;
+ }
+# endif /* !HAVE_UNAME */
+
+ args[0] = malloc (strlen(sysname) + 7);
+ strcpy (args[0], sysname);
+ args[0][5] = 0;
+
+ /* Pick three numbers, 1-9, no overlaps. */
+ ids[0] = 1 + (random() % 9);
+ do { ids[1] = 1 + (random() % 9); } while (ids[1]==ids[0]);
+ do { ids[2] = 1 + (random() % 9); } while (ids[2]==ids[0] || ids[2]==ids[1]);
+
+ i = strlen(args[0])-1;
+ if (i < 6) i++;
+ args[0][i] = '0' + ids[0];
+ args[0][i+1] = 0;
+
+ for (s = args[0]; *s; s++)
+ if (isalpha(*s)) *s = toupper (*s);
+
+ args[1] = strdup (args[0]);
+ args[2] = strdup (args[0]); args[2][i] = '0' + ids[1];
+ args[3] = strdup (args[0]); args[3][i] = '0' + ids[2];
+
+ args[4] = strdup (args[1]);
+ args[5] = strdup (args[2]);
+ args[6] = strdup (args[3]);
+
+ {
+ time_t t = time ((time_t *) 0);
+ struct tm *tm = localtime (&t);
+ args[7] = malloc (30);
+ strftime (args[7], 29, "%d-%b-%Y %H:%M", tm);
+ for (s = args[7]; *s; s++)
+ if (isalpha(*s)) *s = toupper (*s);
+ }
+
+ arg_count = 0;
+ for (i = 0; i < countof(lines); i++)
+ {
+ const char *fmt = lines[i];
+ if (! strcmp (fmt, "..."))
+ {
+ int steps = 180 + (random() % 60);
+ while (--steps >= 0)
+ {
+ scrolling_puts (ts, ".", 0);
+ XSync (dpy, False);
+ usleep (dot_delay);
+ if (bsod_sleep (dpy, 0))
+ goto DONE;
+ }
+ }
+ else
+ {
+ char *fmt2 = malloc (strlen (fmt) * 2 + 1);
+ for (s = (char *) fmt, s1 = fmt2; *s; s++)
+ {
+ if (*s == '#')
+ {
+ strcpy (s1, args[arg_count++]);
+ s1 += strlen(s1);
+ }
+ else
+ *s1++ = *s;
+ }
+ *s1 = 0;
+ scrolling_puts (ts, fmt2, char_delay);
+ free (fmt2);
+ usleep (chunk_delay);
+ if (bsod_sleep (dpy, 0))
+ goto DONE;
+ }
+ }
+
+ XSync(dpy, False);
+ bsod_sleep(dpy, delay);
+
+ DONE:
+ free_scrolling_window (ts);
+ for (i = 0; i < countof (args); i++)
+ free (args[i]);
+}
+
+
+/* HVX (formerly GCOS6) and TPS6 crash
+ by Brian Garratt <brian-m.garratt@bull.co.uk>
+
+ GCOS6 is a Unix-like operating system developed by Honeywell in the
+ 1970s in collaboration with MIT and AT&T (who called their version
+ UNIX). Both are very much like MULTICS which Honeywell got from GE.
+
+ HVX ("High-performance Virtual System on Unix") is an AIX application
+ which emulates GCOS6 hardware on RS6000-like machines.
+ */
+static void
+hvx (Display *dpy, Window window, int delay)
+{
+ XWindowAttributes xgwa;
+ scrolling_window *ts;
+
+ int delay1 = 10000;
+ int delay2 = 100000;
+ const char *hvx_panic_1 =
+ ("(TP) Trap no E Effective address 00000000 Instruction D7DE\n"
+ "(TP) Registers :\n"
+ "(TP) B1 -> B7 03801B02 00000000 03880D45 038BABDB 0388AFFD"
+ " 0389B3F8 03972317\n"
+ "(TP) R1 -> R7 0001 0007 F10F 090F 0020 0106 0272\n"
+ "(TP) P I Z M1 0388A18B 3232 0000 FF00\n"
+ "(TP) Program counter is at offset 0028 from string YTPAD\n"
+ "(TP) User id of task which trapped is LT 626\n"
+ "(TP)?\n"
+ );
+ const char *hvx_panic_2 =
+ ("\n"
+ "(TP)?\n"
+ "Core dumps initiated for selected HVX processes ...\n"
+ "Core dumps complete.\n"
+ "Fri Jul 19 15:53:09 2002\n"
+ "Live registers for cp 0:\n"
+ " P = 7de3 IW=0000 I=32 CI=30000000 S=80006013"
+ " IV=aa0 Level=13\n"
+ " R1-7 = 1f 913 13 4 8 0 0\n"
+ " B1-7 = 64e71b a93 50e 64e73c 6c2c 7000 b54\n"
+ "Memory dump starting to file /var/hvx/dp01/diag/Level2 ...\n"
+ "Memory dump complete.\n"
+ );
+
+ XGetWindowAttributes (dpy, window, &xgwa);
+ ts = make_scrolling_window (dpy, window, "HVX", False);
+ XClearWindow(dpy, window);
+
+ scrolling_puts (ts, hvx_panic_1, delay1);
+ if (bsod_sleep(dpy, 1)) goto DONE;
+ scrolling_puts (ts, " TP CLOSE ALL", delay2);
+ scrolling_puts (ts, "\n(TP)?\n", delay1);
+ if (bsod_sleep(dpy, 1)) goto DONE;
+ scrolling_puts (ts, " TP ABORT -LT ALL", delay2);
+ scrolling_puts (ts, "\n(TP)?\n", delay1);
+ if (bsod_sleep(dpy, 1)) goto DONE;
+ scrolling_puts (ts, " TP STOP KILL", delay2);
+ scrolling_puts (ts, hvx_panic_2, delay1);
+
+ bsod_sleep(dpy, delay);
+ DONE:
+ XClearWindow(dpy, window);
+}
+
+
+\f
+
+/* HPUX panic, by Tobias Klausmann <klausman@schwarzvogel.de>
+ */
+
+static void
+hpux (Display* dpy, Window window, int delay)
+{
+ XWindowAttributes xgwa;
+ scrolling_window *ts;
+ const char *sysname;
+ char buf[2048];
+
+# ifdef __GNUC__
+ __extension__ /* don't warn about "string length is greater than the
+ length ISO C89 compilers are required to support"
+ in the following string constant... */
+# endif
+
+ const char *msg1 =
+ "Console Login:\n"
+ "\n"
+ " ******* Unexpected HPMC/TOC. Processor HPA FFFFFFFF'"
+ "FFFA0000 *******\n"
+ " GENERAL REGISTERS:\n"
+ "r00/03 00000000'00000000 00000000'00000000 00000000'00000000 00000000'"
+ "006C76C0\n"
+ "r04/07 00000000'00000001 00000000'0126E328 00000000'00000000 00000000'"
+ "0122B640\n"
+ "r08/11 00000000'00000000 00000000'0198CFC0 00000000'000476FE 00000000'"
+ "00000001\n"
+ "r12/15 00000000'40013EE8 00000000'08000080 00000000'4002530C 00000000'"
+ "4002530C\n"
+ "r16/19 00000000'7F7F2A00 00000000'00000001 00000000'00000000 00000000'"
+ "00000000\n"
+ "r20/23 00000000'006C8048 00000000'00000001 00000000'00000000 00000000'"
+ "00000000\n"
+ "r24/27 00000000'00000000 00000000'00000000 00000000'00000000 00000000'"
+ "00744378\n"
+ "r28/31 00000000'00000000 00000000'007DD628 00000000'0199F2B0 00000000'"
+ "00000000\n"
+ " CONTROL REGISTERS:\n"
+ "sr0/3 00000000'0F3B4000 00000000'0C2A2000 00000000'016FF800 00000000'"
+ "00000000\n"
+ "sr4/7 00000000'00000000 00000000'016FF800 00000000'0DBF1400 00000000'"
+ "00000000\n"
+ "pcq = 00000000'00000000.00000000'00104950 00000000'00000000.00000000'"
+ "00104A14\n"
+ "isr = 00000000'10240006 ior = 00000000'67D9E220 iir = 08000240 rctr = "
+ "7FF10BB6\n"
+ "\n"
+ "pid reg cr8/cr9 00007700'0000B3A9 00000000'0000C5D8\n"
+ "pid reg cr12/cr13 00000000'00000000 00000000'00000000\n"
+ "ipsw = 000000FF'080CFF1F iva = 00000000'0002C000 sar = 3A ccr = C0\n"
+ "tr0/3 00000000'006C76C0 00000000'00000001 00000000'00000000 00000000'"
+ "7F7CE000\n"
+ "tr4/7 00000000'03790000 0000000C'4FB68340 00000000'C07EE13F 00000000'"
+ "0199F2B0\n"
+ "eiem = FFFFFFF0'FFFFFFFF eirr = 80000000'00000000 itmr = 0000000C'"
+ "4FD8EDE1\n"
+ "cr1/4 00000000'00000000 00000000'00000000 00000000'00000000 00000000'"
+ "00000000\n"
+ "cr5/7 00000000'00000000 00000000'00000000 00000000'"
+ "00000000\n"
+ " MACHINE CHECK PARAMETERS:\n"
+ "Check Type = 00000000 CPU STATE = 9E000001 Cache Check = 00000000\n"
+ "TLB Check = 00000000 Bus Check = 00000000 PIM State = ? SIU "
+ "Status = ????????\n"
+ "Assists = 00000000 Processor = 00000000\n"
+ "Slave Addr = 00000000'00000000 Master Addr = 00000000'00000000\n"
+ "\n"
+ "\n"
+ "TOC, pcsq.pcoq = 0'0.0'104950 , isr.ior = 0'10240006.0'67d9e220\n"
+ "@(#)B2352B/9245XB HP-UX (B.11.00) #1: Wed Nov 5 22:38:19 PST 1997\n"
+ "Transfer of control: (display==0xd904, flags==0x0)\n"
+ "\n"
+ "\n"
+ "\n"
+ "*** A system crash has occurred. (See the above messages for details.)\n"
+ "*** The system is now preparing to dump physical memory to disk, for use\n"
+ "*** in debugging the crash.\n"
+ "\n"
+ "*** The dump will be a SELECTIVE dump: 40 of 256 megabytes.\n"
+ "*** To change this dump type, press any key within 10 seconds.\n"
+ "*** Proceeding with selective dump.\n"
+ "\n"
+ "*** The dump may be aborted at any time by pressing ESC.\n";
+ const char *msg2 =
+ "\n*** System rebooting.\n";
+
+ XGetWindowAttributes (dpy, window, &xgwa);
+ ts = make_scrolling_window (dpy, window, "HPUX", False);
+ XClearWindow(dpy,window);
+ ts->columns = 10000; /* never wrap */
+ ts->sub_x = 0;
+ ts->sub_y = 0;
+ ts->sub_width = xgwa.width;
+ ts->sub_height = xgwa.height;
+
+ sysname = "HPUX";
+# ifdef HAVE_UNAME
+ {
+ struct utsname uts;
+ char *s;
+ if (uname (&uts) >= 0)
+ sysname = uts.nodename;
+ s = strchr (sysname, '.');
+ if (s) *s = 0;
+ }
+# endif /* !HAVE_UNAME */
+
+ if (bsod_sleep (dpy, 1))
+ goto DONE;
+
+ scrolling_puts (ts,
+ " "
+ " "
+ " \n",
+ 0);
+ sprintf (buf, "%.100s [HP Release B.11.00] (see /etc/issue)\n", sysname);
+ scrolling_puts (ts, buf, 0);
+ if (bsod_sleep (dpy, 1))
+ goto DONE;
+ scrolling_puts (ts, msg1, 0);
+ {
+ int i;
+ int steps = 11;
+ int size = 40;
+ for (i = 0; i <= steps; i++)
+ {
+ if (i > steps) i = steps;
+ sprintf (buf,
+ "*** Dumping: %3d%% complete (%d of 40 MB) (device 64:0x2)\r",
+ i * 100 / steps,
+ i * size / steps);
+ scrolling_puts (ts, buf, 0);
+ XSync (dpy, False);
+ usleep (1500000);
+ if (bsod_sleep (dpy, 0))
+ goto DONE;
+ }
+ }
+
+ scrolling_puts (ts, msg2, 0);
+
+ XSync(dpy, False);
+ bsod_sleep(dpy, delay);
+
+ DONE:
+ free_scrolling_window (ts);
+}
+
+\f
+
+/* IBM OS/390 aka MVS aka z/OS.
+ Text from Dan Espen <dane@mk.telcordia.com>.
+ Apparently this isn't actually a crash, just a random session...
+ But who can tell.
+ */
+
+static void
+os390 (Display* dpy, Window window, int delay)
+{
+ GC gc;
+ XGCValues gcv;
+ XWindowAttributes xgwa;
+ scrolling_window *ts;
+ int i;
+
+ const char *msg[] = {
+ "* ISPF Subtask abend *\n",
+ "SPF ENDED DUE TO ERROR+\n",
+ "READY\n",
+ "\n",
+ "IEA995I SYMPTOM DUMP OUTPUT\n",
+ " USER COMPLETION CODE=0222\n",
+ " TIME=23.00.51 SEQ=03210 CPU=0000 ASID=00AE\n",
+ " PSW AT TIME OF ERROR 078D1000 859DAF18 ILC 2 INTC 0D\n",
+ " NO ACTIVE MODULE FOUND\n",
+ " NAME=UNKNOWN\n",
+ " DATA AT PSW 059DAF12 - 00181610 0A0D9180 70644710\n",
+ " AR/GR 0: 00000000/80000000 1: 00000000/800000DE\n",
+ " 2: 00000000/196504DC 3: 00000000/00037A78\n",
+ " 4: 00000000/00037B78 5: 00000000/0003351C\n",
+ " 6: 00000000/0000F0AD 7: 00000000/00012000\n",
+ " 8: 00000000/059DAF10 9: 00000000/0002D098\n",
+ " A: 00000000/059D9F10 B: 00000000/059D8F10\n",
+ " C: 00000000/859D7F10 D: 00000000/00032D60\n",
+ " E: 00000000/00033005 F: 01000002/00000041\n",
+ " END OF SYMPTOM DUMP\n",
+ "ISPS014 - ** Logical screen request failed - abend 0000DE **\n",
+ "ISPS015 - ** Contact your system programmer or dialog developer.**\n",
+ "*** ISPF Main task abend ***\n",
+ "IEA995I SYMPTOM DUMP OUTPUT\n",
+ " USER COMPLETION CODE=0222\n",
+ " TIME=23.00.52 SEQ=03211 CPU=0000 ASID=00AE\n",
+ " PSW AT TIME OF ERROR 078D1000 8585713C ILC 2 INTC 0D\n",
+ " ACTIVE LOAD MODULE ADDRESS=05855000 OFFSET=0000213C\n",
+ " NAME=ISPMAIN\n",
+ " DATA AT PSW 05857136 - 00181610 0A0D9180 D3304770\n",
+ " GR 0: 80000000 1: 800000DE\n",
+ " 2: 00015260 3: 00000038\n",
+ " 4: 00012508 5: 00000000\n",
+ " 6: 000173AC 7: FFFFFFF8\n",
+ " 8: 05858000 9: 00012CA0\n",
+ " A: 05857000 B: 05856000\n",
+ " C: 85855000 D: 00017020\n",
+ " E: 85857104 F: 00000000\n",
+ " END OF SYMPTOM DUMP\n",
+ "READY\n",
+ "***_\n"
+ };
+
+ XGetWindowAttributes (dpy, window, &xgwa);
+ ts = make_scrolling_window (dpy, window, "OS390", False);
+ ts->columns = 10000; /* never wrap */
+ ts->sub_x = 0;
+ ts->sub_y = 0;
+ ts->sub_width = xgwa.width;
+ ts->sub_height = xgwa.height;
+
+ gcv.foreground = get_pixel_resource ("390.background", "390.Background",
+ dpy, xgwa.colormap);
+ gc = XCreateGC (dpy, window, GCForeground, &gcv);
+ XFillRectangle (dpy, window, gc, 0, 0, xgwa.width, xgwa.height);
+ XFreeGC (dpy, gc);
+
+ for (i = 0; i < countof (msg); i++)
+ {
+ scrolling_puts (ts, msg[i], 0);
+ usleep (100000);
+ if (bsod_sleep(dpy, 0)) goto DONE;
+ }
+
+ XSync(dpy, False);
+ bsod_sleep(dpy, delay);
+DONE:
+ free_scrolling_window (ts);