Message ID | 1567601968-26946-8-git-send-email-aleksandar.markovic@rt-rk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | linux-user: Misc patches for 4.2 | expand |
Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit : > From: Aleksandar Markovic <amarkovic@wavecomp.com> > > FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls provide means for controlling > formatting of a floppy drive. > > Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> > --- > linux-user/ioctls.h | 3 +++ > linux-user/syscall_defs.h | 3 +++ > linux-user/syscall_types.h | 5 +++++ > 3 files changed, 11 insertions(+) > > diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h > index c6b9d6a..622874b 100644 > --- a/linux-user/ioctls.h > +++ b/linux-user/ioctls.h > @@ -114,6 +114,9 @@ > > IOCTL(FDMSGON, 0, TYPE_NULL) > IOCTL(FDMSGOFF, 0, TYPE_NULL) > + IOCTL(FDFMTBEG, 0, TYPE_NULL) > + IOCTL(FDFMTTRK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_format_descr))) > + IOCTL(FDFMTEND, 0, TYPE_NULL) > IOCTL(FDFLUSH, 0, TYPE_NULL) > IOCTL(FDRESET, 0, TYPE_NULL) > IOCTL(FDRAWCMD, 0, TYPE_NULL) > diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h > index fa69c6a..834a085 100644 > --- a/linux-user/syscall_defs.h > +++ b/linux-user/syscall_defs.h > @@ -892,6 +892,9 @@ struct target_pollfd { > > #define TARGET_FDMSGON TARGET_IO(2, 0x45) > #define TARGET_FDMSGOFF TARGET_IO(2, 0x46) > +#define TARGET_FDFMTBEG TARGET_IO(2, 0x47) > +#define TARGET_FDFMTTRK TARGET_IOW(2, 0x48, struct target_format_descr) > +#define TARGET_FDFMTEND TARGET_IO(2, 0x49) > #define TARGET_FDFLUSH TARGET_IO(2, 0x4b) > #define TARGET_FDRESET TARGET_IO(2, 0x54) > #define TARGET_FDRAWCMD TARGET_IO(2, 0x58) > diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h > index 4e36983..d82d1a5 100644 > --- a/linux-user/syscall_types.h > +++ b/linux-user/syscall_types.h > @@ -261,6 +261,11 @@ STRUCT(blkpg_ioctl_arg, > TYPE_INT, /* datalen */ > TYPE_PTRVOID) /* data */ > > +STRUCT(format_descr, > + TYPE_INT, /* device */ > + TYPE_INT, /* head */ > + TYPE_INT) /* track */ > + > #if defined(CONFIG_USBFS) > /* usb device ioctls */ > STRUCT(usbdevfs_ctrltransfer, > Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit : > From: Aleksandar Markovic <amarkovic@wavecomp.com> > > FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls provide means for controlling > formatting of a floppy drive. > > Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> > --- > linux-user/ioctls.h | 3 +++ > linux-user/syscall_defs.h | 3 +++ > linux-user/syscall_types.h | 5 +++++ > 3 files changed, 11 insertions(+) > > diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h > index c6b9d6a..622874b 100644 > --- a/linux-user/ioctls.h > +++ b/linux-user/ioctls.h > @@ -114,6 +114,9 @@ > > IOCTL(FDMSGON, 0, TYPE_NULL) > IOCTL(FDMSGOFF, 0, TYPE_NULL) > + IOCTL(FDFMTBEG, 0, TYPE_NULL) > + IOCTL(FDFMTTRK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_format_descr))) > + IOCTL(FDFMTEND, 0, TYPE_NULL) > IOCTL(FDFLUSH, 0, TYPE_NULL) > IOCTL(FDRESET, 0, TYPE_NULL) > IOCTL(FDRAWCMD, 0, TYPE_NULL) > diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h > index fa69c6a..834a085 100644 > --- a/linux-user/syscall_defs.h > +++ b/linux-user/syscall_defs.h > @@ -892,6 +892,9 @@ struct target_pollfd { > > #define TARGET_FDMSGON TARGET_IO(2, 0x45) > #define TARGET_FDMSGOFF TARGET_IO(2, 0x46) > +#define TARGET_FDFMTBEG TARGET_IO(2, 0x47) > +#define TARGET_FDFMTTRK TARGET_IOW(2, 0x48, struct target_format_descr) target_format_descr is defined in the following patch. You don't need it. Use format_descr from <linux/fd.h> Thanks, Laurent
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index c6b9d6a..622874b 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -114,6 +114,9 @@ IOCTL(FDMSGON, 0, TYPE_NULL) IOCTL(FDMSGOFF, 0, TYPE_NULL) + IOCTL(FDFMTBEG, 0, TYPE_NULL) + IOCTL(FDFMTTRK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_format_descr))) + IOCTL(FDFMTEND, 0, TYPE_NULL) IOCTL(FDFLUSH, 0, TYPE_NULL) IOCTL(FDRESET, 0, TYPE_NULL) IOCTL(FDRAWCMD, 0, TYPE_NULL) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index fa69c6a..834a085 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -892,6 +892,9 @@ struct target_pollfd { #define TARGET_FDMSGON TARGET_IO(2, 0x45) #define TARGET_FDMSGOFF TARGET_IO(2, 0x46) +#define TARGET_FDFMTBEG TARGET_IO(2, 0x47) +#define TARGET_FDFMTTRK TARGET_IOW(2, 0x48, struct target_format_descr) +#define TARGET_FDFMTEND TARGET_IO(2, 0x49) #define TARGET_FDFLUSH TARGET_IO(2, 0x4b) #define TARGET_FDRESET TARGET_IO(2, 0x54) #define TARGET_FDRAWCMD TARGET_IO(2, 0x58) diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index 4e36983..d82d1a5 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -261,6 +261,11 @@ STRUCT(blkpg_ioctl_arg, TYPE_INT, /* datalen */ TYPE_PTRVOID) /* data */ +STRUCT(format_descr, + TYPE_INT, /* device */ + TYPE_INT, /* head */ + TYPE_INT) /* track */ + #if defined(CONFIG_USBFS) /* usb device ioctls */ STRUCT(usbdevfs_ctrltransfer,