Re: VMWare 2.0R broken - linux ioctl(13, 1260, *) not implemented
At Sun, 5 Mar 2000 01:32:39 -0500 (EST), Andrew Atrens [EMAIL PROTECTED] wrote: A missing (not implemented) linux ioctl is breaking VMWare 2.0 - linux: 'ioctl' fd=13, cmd=1260 ('^R',96) not implemented After rummaging around in the 2.3 kernel, I found the following in `linux/include/linux/fs.h': Hmm? I'm using Win98 (Japanese), Win2K (Japanese), and FreeBSD-current on vmware 2.0 with linux emulator of yesterday's -current without any problems. Am I wrong? --- Tatsumi Hosokawa [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: VMWare 2.0R broken - linux ioctl(13, 1260, *) not implemented
Ah! I found it! --- linux_ioctl.h.orig Mon Feb 28 11:50:23 2000 +++ linux_ioctl.h Mon Feb 28 11:24:08 2000 @@ -32,6 +32,25 @@ #define_LINUX_IOCTL_H_ /* + * disk + */ +#define LINUX_BLKROSET 0x125d +#define LINUX_BLKROGET 0x125e +#define LINUX_BLKRRPART0x125f +#define LINUX_BLKGETSIZE 0x1260 +#define LINUX_BLKFLSBUF0x1261 +#define LINUX_BLKRASET 0x1262 +#define LINUX_BLKRAGET 0x1263 +#define LINUX_BLKFRASET0x1264 +#define LINUX_BLKFRAGET0x1265 +#define LINUX_BLKSECTSET 0x1266 +#define LINUX_BLKSECTGET 0x1267 +#define LINUX_BLKSSZGET0x1268 + +#defineLINUX_IOCTL_DISK_MINLINUX_BLKROSET +#defineLINUX_IOCTL_DISK_MAXLINUX_BLKSSZGET + +/* * cdrom */ #defineLINUX_CDROMPAUSE0x5301 --- linux_ioctl.c.orig Mon Feb 28 11:50:07 2000 +++ linux_ioctl.c Mon Feb 28 11:11:09 2000 @@ -46,6 +46,7 @@ #include net/if_types.h #include sys/sockio.h #include sys/soundcard.h +#include sys/disklabel.h #include machine/console.h @@ -55,12 +56,15 @@ #include i386/linux/linux_proto.h #include i386/linux/linux_util.h +static linux_ioctl_function_t linux_ioctl_disk; static linux_ioctl_function_t linux_ioctl_cdrom; static linux_ioctl_function_t linux_ioctl_console; static linux_ioctl_function_t linux_ioctl_socket; static linux_ioctl_function_t linux_ioctl_sound; static linux_ioctl_function_t linux_ioctl_termio; +static struct linux_ioctl_handler disk_handler = +{ linux_ioctl_disk, LINUX_IOCTL_DISK_MIN, LINUX_IOCTL_DISK_MAX }; static struct linux_ioctl_handler cdrom_handler = { linux_ioctl_cdrom, LINUX_IOCTL_CDROM_MIN, LINUX_IOCTL_CDROM_MAX }; static struct linux_ioctl_handler console_handler = @@ -72,6 +76,7 @@ static struct linux_ioctl_handler termio_handler = { linux_ioctl_termio, LINUX_IOCTL_TERMIO_MIN, LINUX_IOCTL_TERMIO_MAX }; +DATA_SET(linux_ioctl_handler_set, disk_handler); DATA_SET(linux_ioctl_handler_set, cdrom_handler); DATA_SET(linux_ioctl_handler_set, console_handler); DATA_SET(linux_ioctl_handler_set, socket_handler); @@ -87,6 +92,23 @@ static TAILQ_HEAD(, handler_element) handlers = TAILQ_HEAD_INITIALIZER(handlers); + +static int +linux_ioctl_disk(struct proc *p, struct linux_ioctl_args *args) +{ + struct file *fp = p-p_fd-fd_ofiles[args-fd]; + int error; + struct disklabel dl; + + switch (args-cmd 0x) { + case LINUX_BLKGETSIZE: + error = fo_ioctl(fp, DIOCGDINFO, (caddr_t)dl, p); + if (error) + return (error); + return copyout((dl.d_secperunit), (caddr_t)args-arg, sizeof(dl.d_secperunit)); + } + return (ENOIOCTL); +} /* * termio related ioctls To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: VMWare 2.0R broken - linux ioctl(13, 1260, *) not implemented
On Sun, Mar 05, 2000 at 01:35:27PM +, Nick Sayer wrote: Ah! I found it! --- linux_ioctl.h.orig Mon Feb 28 11:50:23 2000 +++ linux_ioctl.h Mon Feb 28 11:24:08 2000 @@ -32,6 +32,25 @@ #define_LINUX_IOCTL_H_ This patch is fubar'ed. Your mailer wrapped lines and turned tab into space's. Can you repost this patch w/o damaging it? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
VMWare 2.0R broken - linux ioctl(13, 1260, *) not implemented
A missing (not implemented) linux ioctl is breaking VMWare 2.0 - linux: 'ioctl' fd=13, cmd=1260 ('^R',96) not implemented After rummaging around in the 2.3 kernel, I found the following in `linux/include/linux/fs.h': /* the read-only stuff doesn't really belong here, but any other place is probably as bad and I don't want to create yet another include file. */ #define BLKROSET _IO(0x12,93) /* set device read-only (0 = read-write) */ #define BLKROGET _IO(0x12,94) /* get read-only status (0 = read_write) */ #define BLKRRPART _IO(0x12,95) /* re-read partition table */ #define BLKGETSIZE _IO(0x12,96) /* return device size */ #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ #define BLKRASET _IO(0x12,98) /* Set read ahead for block device */ #define BLKRAGET _IO(0x12,99) /* get current read ahead setting */ #define BLKFRASET _IO(0x12,100)/* set filesystem (mm/filemap.c) read-ahead */ #define BLKFRAGET _IO(0x12,101)/* get filesystem (mm/filemap.c) read-ahead */ #define BLKSECTSET _IO(0x12,102)/* set max sectors per request (ll_rw_blk.c) */ #define BLKSECTGET _IO(0x12,103)/* get max sectors per request (ll_rw_blk.c) */ #define BLKSSZGET _IO(0x12,104)/* get block device sector size */ So it looks like BLKGETSIZE is the missing ioctl. I'm not sure how to fix this, because well, we don't have block devices, the ATA driver doesn't support ioctls _or_ have a useful psize attribute in its cdevsw struct. I naively thought I could use fstat() then devsw() to map the file descriptor to a device, and then interrogate the device's psize. But that goofy attempt just resulted in a kernel panic. :) Please don't dis me on how stupid that was - instead tell me what I should do :) Seriously though, any help y'all could provide would be greatly appreciated. :) Andrew. -- +-- | Andrew Atrens Nortel Networks, Ottawa, Canada. | | All opinions expressed are my own, not those of any employer. | --+ Berkeley had what we called "copycenter", which is "take it down to the copy center and make as many copies as you want". -- Kirk McKusick +-- --+ Bill Gates is a white Persian cat and a monocle away from becoming another James Bond villain. "No Mr Bond, I expect you to upgrade." -- Dennis Miller +-- --+ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message