From: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
To: Laurent Vivier <laurent@vivier.eu>
Cc: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
riku.voipio@iki.fi, qemu-devel@nongnu.org,
amarkovic@wavecomp.com
Subject: Re: [Qemu-devel] [PATCH v6 8/8] linux-user: Add support for FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls
Date: Tue, 10 Sep 2019 20:59:09 +0200 [thread overview]
Message-ID: <CAL1e-=id9tL4-6eLgkd2SQ2W-5yU6Zp7WgVj0YFJ83wdG1qG6w@mail.gmail.com> (raw)
In-Reply-To: <2d5e7f28-7fa4-7637-c512-b443848eb61b@vivier.eu>
06.09.2019. 12.47, "Laurent Vivier" <laurent@vivier.eu> је написао/ла:
>
> Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit :
> > From: Aleksandar Markovic <amarkovic@wavecomp.com>
> >
> > FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls are commands
> > for controlling error reporting of a floppy drive.
> >
> > Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> > ---
> > linux-user/ioctls.h | 2 ++
> > linux-user/syscall_defs.h | 19 +++++++++++++++++++
> > linux-user/syscall_types.h | 7 +++++++
> > 3 files changed, 28 insertions(+)
> >
> > diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
> > index 622874b..0c75d03 100644
> > --- a/linux-user/ioctls.h
> > +++ b/linux-user/ioctls.h
> > @@ -118,6 +118,8 @@
> > IOCTL(FDFMTTRK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_format_descr)))
> > IOCTL(FDFMTEND, 0, TYPE_NULL)
> > IOCTL(FDFLUSH, 0, TYPE_NULL)
> > + IOCTL(FDSETMAXERRS, IOC_W,
MK_PTR(MK_STRUCT(STRUCT_floppy_max_errors)))
> > + IOCTL(FDGETMAXERRS, IOC_R,
MK_PTR(MK_STRUCT(STRUCT_floppy_max_errors)))
>
> where is FDSETEMSGTRESH?
>
> > IOCTL(FDRESET, 0, TYPE_NULL)
> > IOCTL(FDRAWCMD, 0, TYPE_NULL)
> > IOCTL(FDTWADDLE, 0, TYPE_NULL)
> > diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> > index 834a085..7c5b614 100644
> > --- a/linux-user/syscall_defs.h
> > +++ b/linux-user/syscall_defs.h
> > @@ -890,12 +890,31 @@ struct target_pollfd {
> >
> > /* From <linux/fd.h> */
> >
> > +struct target_floppy_max_errors {
> > + abi_uint abort;
> > + abi_uint read_track;
> > + abi_uint reset;
> > + abi_uint recal;
> > + abi_uint reporting;
> > +};
>
> You don't need this, you can use floppy_max_errors from <linux/fd.h>.
>
> But you can define it if you want because it is used to know the size of
> the target structure (and if alignment or data types differ it can
> mismatch. With "int" it's not the case).
>
Laurent, thanks for the review, I'll correct this in the next version.
Just a follow-up question:
If the structure of related to a (not-yet-supported in QEMU) ioctl was:
struct hd_geometry {
unsigned char heads;
unsigned char sectors;
unsigned short cylinders;
unsigned long start;
};
... would "target_hd_geometry" be needed, or not?
Regards,
Aleksandar
> > +struct target_format_descr {
> > + abi_uint device;
> > + abi_uint head;
> > + abi_uint track;
> > +};
> > +
>
> This one is for the previous patch. Same comment as above.
>
> Thanks,
> Laurent
>
next prev parent reply other threads:[~2019-09-10 19:07 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-04 12:59 [Qemu-devel] [PATCH v6 0/8] linux-user: Misc patches for 4.2 Aleksandar Markovic
2019-09-04 12:59 ` [Qemu-devel] [PATCH v6 1/8] linux-user: Add support for semtimedop() syscall Aleksandar Markovic
2019-09-04 13:16 ` Aleksandar Markovic
2019-09-06 9:59 ` Laurent Vivier
2019-09-04 12:59 ` [Qemu-devel] [PATCH v6 2/8] linux-user: Add support for RNDRESEEDCRNG ioctl Aleksandar Markovic
2019-09-10 8:33 ` Laurent Vivier
2019-09-04 12:59 ` [Qemu-devel] [PATCH v6 3/8] linux-user: Add support for FIOGETOWN and FIOSETOWN ioctls Aleksandar Markovic
2019-09-06 10:18 ` Laurent Vivier
2019-09-10 8:34 ` Laurent Vivier
2019-09-10 10:00 ` Aleksandar Markovic
2019-09-04 12:59 ` [Qemu-devel] [PATCH v6 4/8] linux user: Add support for FDFLUSH ioctl Aleksandar Markovic
2019-09-10 8:39 ` Laurent Vivier
2019-09-04 12:59 ` [Qemu-devel] [PATCH v6 5/8] linux-user: Add support for FDMSGON and FDMSGOFF ioctls Aleksandar Markovic
2019-09-06 10:20 ` Laurent Vivier
2019-09-10 8:41 ` Laurent Vivier
2019-09-04 12:59 ` [Qemu-devel] [PATCH v6 6/8] linux-user: Add support for FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls Aleksandar Markovic
2019-09-06 10:21 ` Laurent Vivier
2019-09-10 8:42 ` Laurent Vivier
2019-09-04 12:59 ` [Qemu-devel] [PATCH v6 7/8] linux-user: Add support for FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls Aleksandar Markovic
2019-09-06 10:30 ` Laurent Vivier
2019-09-06 10:38 ` Laurent Vivier
2019-09-04 12:59 ` [Qemu-devel] [PATCH v6 8/8] linux-user: Add support for FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls Aleksandar Markovic
2019-09-06 10:47 ` Laurent Vivier
2019-09-10 18:59 ` Aleksandar Markovic [this message]
2019-09-10 19:15 ` Aleksandar Markovic
2019-09-10 19:24 ` Laurent Vivier
2019-09-10 19:15 ` Laurent Vivier
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='CAL1e-=id9tL4-6eLgkd2SQ2W-5yU6Zp7WgVj0YFJ83wdG1qG6w@mail.gmail.com' \
--to=aleksandar.m.mail@gmail.com \
--cc=aleksandar.markovic@rt-rk.com \
--cc=amarkovic@wavecomp.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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.