aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2010-05-12 20:51:56 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2010-05-12 20:51:56 +0200
commit0edf6f7c05ea812231bac8eb4000498ca1400519 (patch)
tree056cf25866e346f644b7963cf1e1ee890a906d5e
parentebce0cf25db2a9f0bb4111d7e9ba00b9205e2d6f (diff)
parent3cb520bd67c3a270a8dfe38654674943d01ff541 (diff)
downloadcontrib-0edf6f7c05ea812231bac8eb4000498ca1400519.tar.gz
contrib-0edf6f7c05ea812231bac8eb4000498ca1400519.tar.xz
contrib-0edf6f7c05ea812231bac8eb4000498ca1400519.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/boot/syslinux/syslinux
-rw-r--r--com32/modules/Makefile2
-rw-r--r--com32/modules/cat.c (renamed from com32/samples/cat.c)15
-rw-r--r--com32/modules/disk.c2
-rw-r--r--com32/samples/Makefile2
4 files changed, 10 insertions, 11 deletions
diff --git a/com32/modules/Makefile b/com32/modules/Makefile
index 44bc1dfb..56f44026 100644
--- a/com32/modules/Makefile
+++ b/com32/modules/Makefile
@@ -22,7 +22,7 @@ MODULES = chain.c32 config.c32 ethersel.c32 dmitest.c32 cpuidtest.c32 \
disk.c32 pcitest.c32 elf.c32 linux.c32 reboot.c32 pmload.c32 \
meminfo.c32 sdi.c32 sanboot.c32 ifcpu64.c32 vesainfo.c32 \
kbdmap.c32 cmd.c32 vpdtest.c32 gpxecmd.c32 ifcpu.c32 \
- cpuid.c32
+ cpuid.c32 cat.c32
TESTFILES =
diff --git a/com32/samples/cat.c b/com32/modules/cat.c
index 16380b0e..8df47675 100644
--- a/com32/samples/cat.c
+++ b/com32/modules/cat.c
@@ -10,18 +10,17 @@ int main(int argc, char *argv[])
openconsole(&dev_stdcon_r, &dev_stdcon_w);
- printf("argv = %p\n", argv);
- for (i = 0; i <= argc; i++)
- printf("argv[%d] = %p = \"%s\"\n", i, argv[i], argv[i]);
-
if (argc < 2) {
- fprintf(stderr, "Missing file name!\n");
- exit(1);
+ fprintf(stderr, "Usage: cat.c32 filename\n");
+ return 1;
}
- printf("File = %s\n", argv[1]);
-
f = fopen(argv[1], "r");
+ if (!f) {
+ fprintf(stderr, "File \"%s\" does not exist.\n", argv[1]);
+ return 1;
+ }
+
while ((ch = getc(f)) != EOF)
putchar(ch);
diff --git a/com32/modules/disk.c b/com32/modules/disk.c
index e94a36bf..62914f47 100644
--- a/com32/modules/disk.c
+++ b/com32/modules/disk.c
@@ -33,7 +33,7 @@ int main(int argc __attribute__ (( unused )),
err = get_drive_parameters(d);
/* Do not print output when drive does not exists */
- if (err == -1)
+ if (err == -1 || !d->cbios)
continue;
if (err) {
diff --git a/com32/samples/Makefile b/com32/samples/Makefile
index 482769ef..bee2b992 100644
--- a/com32/samples/Makefile
+++ b/com32/samples/Makefile
@@ -17,7 +17,7 @@
topdir = ../..
include ../MCONFIG
-all: hello.c32 cat.c32 resolv.c32 serialinfo.c32 \
+all: hello.c32 resolv.c32 serialinfo.c32 \
localboot.c32 \
fancyhello.c32 fancyhello.lnx \
keytest.c32 keytest.lnx \