dosemu-1.3.2
Hello.
Quoted 2 lines · Zoltan Boszormenyi
eject the CD util I exit dosemu. The dosemu internal eject command didn't work.
The problem is most likely not in dosemu itself (kernel? udev?) Dosemu does what's the attached simple test-case does, which fails on FC3 too.
Quoted 3 lines
I have a question. At present, dosemu doesn't run on Linux/x86-64 (in 64-bit mode) as the vm86 mode is disabled on the hardware. How hard would it be to write an in-kernel vm86 emulation?
There are the already-written CPU emulators. I was playing around the qemu, which has the vm86() syscall emulation. It was possible to run dosemu entirely under the qemu user-mode emulation, so it was very promising. I almost got it to work inside the dosemu, but at some point its author abandonned the user-mode support and dosemu no longer runs under it, and so I had to abandon my porting effors. If/when (which is now unlikely) qemu is fixed, I'll probably look up that code and complete the work. There are the other CPU emulators too, but qemu have the ready-to-use vm86() emulation, not just the CPU emulation, so it is the primary target of course.
Another interesting thing would be to have the Windows port - someone already built the dosemu with help of coLinux, and it even worked.
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h> #include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h> #include <linux/cdrom.h>
int main() {
int fd;
if ((fd = open("/dev/cdrom", O_RDONLY)) < 0) {
perror("open");
return 1;
}
if (ioctl(fd, CDROMEJECT)) {
perror("ioctl"); }
return 0;
}
Quoted 8 lines · Stas Sergeev
Quoted 2 lines · Zoltan Boszormenyi
eject the CD util I exit dosemu. The dosemu internal eject command didn't work.
The problem is most likely not in dosemu itself (kernel? udev?) Dosemu does what's the attached simple test-case does, which fails on FC3 too.
Hi Stas,
I built and ran your little program on my Slackware 10.1 system, and the cdrom drive wouldn't eject if there was no disc in it; it would just give a "No medium found" error message. If I changed your code to open the device using the O_RDONLY | O_NONBLOCK options (as recommended in <linux/cdrom.h>), then the drive would always eject, even if it was empty. I don't know if this would solve Zoltan's problem, but it is probably worth changing the open statements in src/dosext/drivers/cdrom.c to use O_NONBLOCK.
Cheers,
Rob Komar
Hello.
Quoted 3 lines · Robert Komar
even if it was empty. I don't know if this would solve Zoltan's problem, but it is probably worth changing the open statements in
src/dosext/drivers/cdrom.cto useO_NONBLOCK.
Done, thanks. It works better now, but still not 100% reliably for me. There might be some other bug too (for example, if I start dosemu, then mount the cdrom under linux, then unmount it, dosemu can't eject it again - I'll see what happens with it). The strange thing is that this code was never changed, and dosemu was able to get away without O_NONBLOCK in the past somehow (which doesn't mean it was doing the right thing of course).
Hi all,
my name is David Cavazzini and I live Italy.
Several years ago I started to use dosemu, always with some troubles, but it worked and it was usefull :-) : thanks to programmers. I'm now asking you if redirection now works in dosemu with freedos or it doesn't yet. So if is possible to use lredir.exe or emufs.sys other with the MS-DOS or Caldera OpenDos
I'm still looking a way to use dos partitions in a freedos box without unloading them from the linux fs prior, being able so to upgrade dbfiles without stopping programs.
Someone experienced something similar?
Thanks in advance for your kind attention,
have a good evening
David
Il giorno dom, 22-05-2005 alle 21:10 +0400, Stas Sergeev ha scritto:
Quoted 61 lines
Hello.
Quoted 2 lines · Zoltan Boszormenyi
eject the CD util I exit dosemu. The dosemu internal eject command didn't work.
The problem is most likely not in dosemu itself (kernel? udev?) Dosemu does what's the attached simple test-case does, which fails on FC3 too.
Quoted 3 lines
I have a question. At present, dosemu doesn't run on Linux/x86-64 (in 64-bit mode) as the vm86 mode is disabled on the hardware. How hard would it be to write an in-kernel vm86 emulation?
There are the already-written CPU emulators. I was playing around the qemu, which has the
vm86()syscall emulation. It was possible to run dosemu entirely under the qemu user-mode emulation, so it was very promising. I almost got it to work inside the dosemu, but at some point its author abandonned the user-mode support and dosemu no longer runs under it, and so I had to abandon my porting effors. If/when (which is now unlikely) qemu is fixed, I'll probably look up that code and complete the work. There are the other CPU emulators too, but qemu have the ready-to-usevm86()emulation, not just the CPU emulation, so it is the primary target of course.Another interesting thing would be to have the Windows port - someone already built the dosemu with help of coLinux, and it even worked.
plain text document allegato (
cd.c) #include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h> #include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h> #include <linux/cdrom.h>int
main(){
int fd;if ((fd = open("/dev/cdrom", O_RDONLY)) < 0) { perror("open"); return 1; } if (ioctl(fd, CDROMEJECT)) { perror("ioctl");}
return 0;
}
Signature · 1 line
Luigi D. C. <[email protected]>