From: Thierry Lafage <lafage@irisa.fr>
To: ultralinux@vger.kernel.org
Subject: Re: Question about sys32_ioctl()
Date: Fri, 02 Apr 1999 15:35:54 +0000 [thread overview]
Message-ID: <marc-linux-ultrasparc-92306770528448@msgid-missing> (raw)
Hello,
Nobody answered the question I posted yesterday, so I re-post it now
in case it was taken as a 1st april joke ;-). But this was not, even
if it sounds stupid from me to put my nose in the kernel sources...
The sys32_ioctl() code contains things I really do not understand, but
since I applied the modification I propose below, I would like to know
if it is a bad thing for the kernel stability and/or mechanisms. And
if it is, I apologize for the mailing lists pollution (as I should do
every time I post here).
Thierry Lafage.
------- Start of forwarded message -------
Hello,
I have made a personal char device driver. For the device, I would
like to add new ioctl commands (I have read the file
"Documentation/ioctl-number.txt" for that). But with sparc32 user
programs, the new ioctl commands cannot be serviced by my char driver:
sys32_ioctl: Unknown cmd fd(3) cmd(2000ee00) arg(00000000)
When looking in the code "arch/sparc64/kernel/ioctl32.c", the
sys32_ioctl() function never calls such added cmds:
asmlinkage int sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
{
[...]
switch (cmd) {
[...]
default:
do {
static int count = 0;
if (++count <= 20)
printk("sys32_ioctl: Unknown cmd fd(%d) "
"cmd(%08x) arg(%08x)\n",
(int)fd, (unsigned int)cmd, (unsigned int)arg);
} while(0);
error = -EINVAL;
break;
}
out:
unlock_kernel();
return error;
}
Would it be stupid to add something like what follows to the default
case (inspired from "fs/ioctl.c: sys_ioctl(...)")?
if (filp->f_op && filp->f_op->ioctl && filp->f_dentry && filp->f_dentry->d_inode)
error = filp->f_op->ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
Thierry Lafage.
- -
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of the message to majordomo@vger.rutgers.edu
------- End of forwarded message -------
next reply other threads:[~1999-04-02 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-02 15:35 Thierry Lafage [this message]
1999-04-02 15:45 ` Question about sys32_ioctl() David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ultrasparc-92306770528448@msgid-missing \
--to=lafage@irisa.fr \
--cc=ultralinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.