From: linux@MichaelGeng.de (Michael Geng)
To: Gerd Knorr <kraxel@bytesex.org>, Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: video_usercopy() enforces change of VideoText IOCTLs since 2.6.8
Date: Mon, 11 Oct 2004 18:21:53 +0200 [thread overview]
Message-ID: <20041011162153.GA9101@t-online.de> (raw)
In-Reply-To: <20041011151455.GC23632@bytesex>
On Mon, Oct 11, 2004 at 05:14:55PM +0200, Gerd Knorr wrote:
> > +#define VTXIOCGETINFO _IOR (0x81, 1, vtx_info_t)
> > +#define VTXIOCCLRPAGE _IOW (0x81, 2, vtx_pagereq_t)
> > +#define VTXIOCCLRFOUND _IOW (0x81, 3, vtx_pagereq_t)
> > +#define VTXIOCPAGEREQ _IOW (0x81, 4, vtx_pagereq_t)
> > +#define VTXIOCGETSTAT _IOW (0x81, 5, vtx_pagereq_t)
> > +#define VTXIOCGETPAGE _IOW (0x81, 6, vtx_pagereq_t)
> > +#define VTXIOCSTOPDAU _IOW (0x81, 7, vtx_pagereq_t)
>
> Hmm, _IOW for VTXIOCGET* looks bogous, is that really correct?
This is the definition of the argument to the VTXIOCGET* IOCTLs:
typedef struct
{
int page; /* number of requested page (hexadecimal) */
int hour; /* requested hour (hexadecimal) */
int minute; /* requested minute (hexadecimal) */
int pagemask; /* mask defining which values of the above are set */
int pgbuf; /* buffer where page will be stored */
int start; /* start of requested part of page */
int end; /* end of requested part of page */
void __user *buffer; /* pointer to beginning of destination buffer */
}
vtx_pagereq_t;
The driver returns all data in the buffer field. Copying there is done by a seperate call to
copy_to_user(). All other fields are never changed by the driver. So the _IOW definition is ok.
> Note that you often need RW for read/get ioctls because even these
> often pass data to the driver as well (for example the vtx page number
> you want query the status for). Please double-check that. Otherwise
> the patch looks ok to me.
Thank you! Andrew, could you please forward the patch?
Suggestion for a comment line:
Videotext: IOCTLs changed to match _IO macros in linux/ioctl.h
Michael
next prev parent reply other threads:[~2004-10-11 16:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-07 16:54 video_usercopy() enforces change of VideoText IOCTLs since 2.6.8 Michael Geng
2004-10-08 10:52 ` Gerd Knorr
2004-10-08 21:00 ` Andrew Morton
2004-10-09 9:28 ` Gerd Knorr
2004-10-09 11:28 ` Michael Geng
2004-10-09 12:18 ` Gerd Knorr
2004-10-10 8:55 ` Michael Geng
2004-10-11 15:14 ` Gerd Knorr
2004-10-11 16:21 ` Michael Geng [this message]
2004-10-13 11:00 ` Alan Cox
2004-10-13 14:42 ` Michael Geng
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=20041011162153.GA9101@t-online.de \
--to=linux@michaelgeng.de \
--cc=akpm@osdl.org \
--cc=kraxel@bytesex.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox