aboutsummaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2015-04-18 01:52:35 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2015-04-18 01:52:35 +0000
commit73ec2b90d2d9445bf7109f4acf482ff996858f19 (patch)
tree22426c6dfc695ca3c1acedbd3358fa4149504ce8 /emulators
parent80c17d72de22331d4d342d3f87b9e715dbda511c (diff)
downloadports-73ec2b90d2d9445bf7109f4acf482ff996858f19.tar.gz
ports-73ec2b90d2d9445bf7109f4acf482ff996858f19.zip
Notes
Diffstat (limited to 'emulators')
-rw-r--r--emulators/doscmd/files/extra-patch-cwd.c16
-rw-r--r--emulators/doscmd/files/patch-config.c19
-rw-r--r--emulators/doscmd/files/patch-int13.c20
-rw-r--r--emulators/doscmd/files/patch-trap.c11
4 files changed, 66 insertions, 0 deletions
diff --git a/emulators/doscmd/files/extra-patch-cwd.c b/emulators/doscmd/files/extra-patch-cwd.c
new file mode 100644
index 000000000000..e44c97eb4c79
--- /dev/null
+++ b/emulators/doscmd/files/extra-patch-cwd.c
@@ -0,0 +1,16 @@
+This call changes internal descriptor in DIR structure so it's
+located at the top of file descriptor table. I guess it is needed
+to not interfere with other file descriptor order or to keep their
+values small. doscmd may work fine without it, but it should be
+tested.
+--- cwd.c.orig 2011-08-26 16:48:21 UTC
++++ cwd.c
+@@ -889,7 +889,7 @@ find_first(u_char *path, int attr, dosdi
+ ++search->searchend;
+ *search->searchend++ = '/';
+
+- search->dp->dd_fd = squirrel_fd(search->dp->dd_fd);
++ //search->dp->dd_fd = squirrel_fd(search->dp->dd_fd);
+
+ dta->drive = drive | 0x80;
+ to_dos_fcb(dta->pattern, slash);
diff --git a/emulators/doscmd/files/patch-config.c b/emulators/doscmd/files/patch-config.c
new file mode 100644
index 000000000000..5dc203212ef3
--- /dev/null
+++ b/emulators/doscmd/files/patch-config.c
@@ -0,0 +1,19 @@
+--- config.c.orig 2011-08-26 16:48:21 UTC
++++ config.c
+@@ -213,14 +213,14 @@ init_hard:
+ quit(1);
+ }
+ errno = 0;
+- addr = (int)strtol(av[3], '\0', 0);
++ addr = (int)strtol(av[3], NULL, 0);
+ /* XXX DEBUG ISA-specific */
+ if ((errno != 0) || (addr > MAXPORT)) {
+ fprintf(stderr, "usage: assign com[1-4] path addr irq\n");
+ quit(1);
+ }
+ errno = 0;
+- irq = (unsigned char)strtol(av[4], '\0', 0);
++ irq = (unsigned char)strtol(av[4], NULL, 0);
+ /* XXX DEBUG ISA-specific */
+ if ((errno != 0) || (irq < 2) || (irq > 7)) {
+ fprintf(stderr, "usage: assign com[1-4] path addr irq[2-7]\n");
diff --git a/emulators/doscmd/files/patch-int13.c b/emulators/doscmd/files/patch-int13.c
new file mode 100644
index 000000000000..8d613003debd
--- /dev/null
+++ b/emulators/doscmd/files/patch-int13.c
@@ -0,0 +1,20 @@
+--- int13.c.orig 2011-08-26 16:48:21 UTC
++++ int13.c
+@@ -487,7 +487,7 @@ diread(struct diskinfo *di, regcontext_t
+ off_t res;
+
+ int drive = di - diskinfo;
+- di->multi = -1;
++ di->multi = 3;
+
+ if (drive > 1) {
+ drive -= 2;
+@@ -536,7 +536,7 @@ diwrite(struct diskinfo *di, regcontext_
+ {
+ off_t res;
+ int drive = di - diskinfo;
+- di->multi = -1;
++ di->multi = 3;
+
+ if (drive > 1) {
+ drive -= 2;
diff --git a/emulators/doscmd/files/patch-trap.c b/emulators/doscmd/files/patch-trap.c
new file mode 100644
index 000000000000..8db98e35cf1c
--- /dev/null
+++ b/emulators/doscmd/files/patch-trap.c
@@ -0,0 +1,11 @@
+--- trap.c.orig 2011-08-26 16:48:21 UTC
++++ trap.c
+@@ -295,7 +295,7 @@ sigbus(struct sigframe *sf)
+ callback_t func;
+ regcontext_t *REGS = (regcontext_t *)(&sf->sf_uc.uc_mcontext);
+
+- if (!(R_EFLAGS && PSL_VM))
++ if (!(R_EFLAGS & PSL_VM))
+ fatal("SIGBUS in the emulator\n");
+
+ if ((int)sf->sf_siginfo != 0) {