aboutsummaryrefslogtreecommitdiffstats
path: root/com32/samples
diff options
context:
space:
mode:
authorchandramouli narayanan <mouli@linux.intel.com>2012-06-25 12:50:11 -0700
committerchandramouli narayanan <mouli@linux.intel.com>2012-06-25 12:50:11 -0700
commita5759fa44611e372eccc01d85f2db1bc7050c77d (patch)
tree4c8d3d4396187cfb8f58fa9f7dd907e3d988c1e7 /com32/samples
parent357d40435e62ee1e8b3a96107375282fdc1dd6e6 (diff)
downloadsyslinux-a5759fa44611e372eccc01d85f2db1bc7050c77d.tar.gz
syslinux-a5759fa44611e372eccc01d85f2db1bc7050c77d.tar.xz
syslinux-a5759fa44611e372eccc01d85f2db1bc7050c77d.zip
Archicture-dependent get_cpuid in sysdump/cpuid is fixed.
In the following sample programs zzjson.c, advdump.c, entrydump.c, hello.c, resolv.c, serialinfo.c in com32/samples, the following code call hangs the program: openconsole(&dev_null_r, &dev_stdcon_w); The following fix works: openconsole(&dev_rawcon_r, &dev_ansiserial_w); Remanants of the unused old i386-only files, if any, need to be pruned.
Diffstat (limited to 'com32/samples')
-rw-r--r--com32/samples/advdump.c6
-rw-r--r--com32/samples/entrydump.c6
-rw-r--r--com32/samples/hello.c6
-rw-r--r--com32/samples/resolv.c6
-rw-r--r--com32/samples/serialinfo.c6
5 files changed, 30 insertions, 0 deletions
diff --git a/com32/samples/advdump.c b/com32/samples/advdump.c
index 2c786416..83fe8381 100644
--- a/com32/samples/advdump.c
+++ b/com32/samples/advdump.c
@@ -27,7 +27,13 @@ int main(void)
size_t s = syslinux_adv_size();
char buf[256];
+#if 0
+ /* this hangs! */
openconsole(&dev_stdcon_r, &dev_stdcon_w);
+#else
+ /* this works */
+ openconsole(&dev_rawcon_r, &dev_ansiserial_w);
+#endif
p = syslinux_adv_ptr();
diff --git a/com32/samples/entrydump.c b/com32/samples/entrydump.c
index d50859f4..56a683e3 100644
--- a/com32/samples/entrydump.c
+++ b/com32/samples/entrydump.c
@@ -36,7 +36,13 @@ int main(void)
const union syslinux_derivative_info *di;
const struct stack_frame *sf;
+#if 0
+ /* this hangs! */
openconsole(&dev_null_r, &dev_stdcon_w);
+#else
+ /* this works */
+ openconsole(&dev_rawcon_r, &dev_ansiserial_w);
+#endif
di = syslinux_derivative_info();
diff --git a/com32/samples/hello.c b/com32/samples/hello.c
index 77e93ac7..eef85283 100644
--- a/com32/samples/hello.c
+++ b/com32/samples/hello.c
@@ -24,7 +24,13 @@ int main(int argc, char *argv[])
{
int i;
+#if 0
+ /* this hangs! */
openconsole(&dev_stdcon_r, &dev_stdcon_w);
+#else
+ /* this works */
+ openconsole(&dev_rawcon_r, &dev_ansiserial_w);
+#endif
printf("Hello, World!\n");
diff --git a/com32/samples/resolv.c b/com32/samples/resolv.c
index bd49d9f9..fae6649b 100644
--- a/com32/samples/resolv.c
+++ b/com32/samples/resolv.c
@@ -45,7 +45,13 @@ int main(int argc, char *argv[])
{
uint32_t ip;
+#if 0
+ /* this hangs! */
openconsole(&dev_null_r, &dev_stdcon_w);
+#else
+ /* this works */
+ openconsole(&dev_rawcon_r, &dev_ansiserial_w);
+#endif
if (argc < 2) {
fputs("Usage: resolv hostname\n", stderr);
diff --git a/com32/samples/serialinfo.c b/com32/samples/serialinfo.c
index 10d02521..2936b4e5 100644
--- a/com32/samples/serialinfo.c
+++ b/com32/samples/serialinfo.c
@@ -25,7 +25,13 @@ int main(void)
{
const struct syslinux_serial_console_info *si;
+#if 0
+ /* this hangs! */
openconsole(&dev_null_r, &dev_stdcon_w);
+#else
+ /* this works */
+ openconsole(&dev_rawcon_r, &dev_ansiserial_w);
+#endif
si = syslinux_serial_console_info();