Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


created a test directory to hold test guest OSes
[palacios-OLD.git] / test / geekos_test_vm / scripts / generrs
1 #! /usr/bin/perl
2
3 # Script to process include/geekos/errno.h to produce a table
4 # of error description strings that can be compiled and
5 # linked into libc.
6
7 use strict qw(refs vars);
8
9 my @errs = ();
10 my @syms = ();
11
12 $errs[0] = 'No error';
13
14 while (<>) {
15         if (m,^#define\s*(\S+)\s*(-\d+)\s*/\*\s*(.*\S)\s*\*/\s*$,) {
16                 $errs[- $2] = $3;
17                 $syms[- $2] = $1;
18         }
19 }
20
21 print "const char *__strerrTable[] = {\n";
22 for (my $i = 0; $i < scalar(@errs); $i++) {
23         print "    \"", $errs[$i], "\", /* ", $syms[$i], " */\n";
24 }
25 print "};\n";
26 print "const int __strerrTableSize = sizeof(__strerrTable) / sizeof(const char *);\n";
27
28 # vim:ts=4