From nobody Tue Nov 11 17:34:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1564406012; cv=none; d=zoho.com; s=zohoarc; b=cbEZfsWD4ID5Mu+E9xFze0UMlx3r5OZLfdTc3bmbf259HUxk5JIMF4uMjVXbJXkhnvjhC66kOpyy6Oa/RAtzdN4J18PIXR4PiD8jFVEYpnS3jKdDT0iXhVZpRwRGmQ1r8Mvzbi2723lq3ZmVcLcyj3YDwIUnqzdLY/nM8n5CTus= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564406012; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=NcZxaboLcVMSllcLf0GfYD4m4GT/qrsjPme3YSexVCQ=; b=GhQhmHKA6YC6o7TFs0Ji7XqJVdJsZzJE5Bimt1/Pge673vg88jW3cJbwID9sTARJKPql+eToQTVEIRSjEvRkQpwQa81dCHjlBRG6kUctQnCd//0Wx9gOeOXWjansOLKygYzyC2JbdNWF3+H5OMMRcldSsLe109tU+Xr9fCUwr40= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1564406012521246.92635071388747; Mon, 29 Jul 2019 06:13:32 -0700 (PDT) Received: from localhost ([::1]:52064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hs5T1-0007GO-Ja for importer@patchew.org; Mon, 29 Jul 2019 09:13:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40734) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hs5Ql-000368-5O for qemu-devel@nongnu.org; Mon, 29 Jul 2019 09:11:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hs5Qk-0003GP-2K for qemu-devel@nongnu.org; Mon, 29 Jul 2019 09:11:11 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:51387 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hs5Qj-0003DD-Re for qemu-devel@nongnu.org; Mon, 29 Jul 2019 09:11:10 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 4C84A1A210C; Mon, 29 Jul 2019 15:10:17 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 34F701A20A2; Mon, 29 Jul 2019 15:10:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Mon, 29 Jul 2019 15:09:49 +0200 Message-Id: <1564405791-9147-6-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564405791-9147-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1564405791-9147-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH for 4.1 v2 5/7] linux-user: Add support for FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls are commands for controlling error reporting of a floppy drive. Signed-off-by: Aleksandar Markovic --- 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 e393ad6..6551938 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)= )) 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 1ca115d..36256b0 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -885,12 +885,31 @@ struct target_pollfd { =20 /* From */ =20 +struct target_floppy_max_errors { + abi_uint abort; + abi_uint read_track; + abi_uint reset; + abi_uint recal; + abi_uint reporting; +}; + +struct target_format_descr { + abi_uint device; + abi_uint head; + abi_uint track; +}; + #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_desc= r) #define TARGET_FDFMTEND TARGET_IO(2, 0x49) +#define TARGET_FDSETEMSGTRESH TARGET_IO(2, 0x4a) #define TARGET_FDFLUSH TARGET_IO(2, 0x4b) +#define TARGET_FDSETMAXERRS TARGET_IOW(2, 0x4c, = \ + struct target_floppy_max_errors) +#define TARGET_FDGETMAXERRS TARGET_IOR(2, 0x0e, = \ + struct target_floppy_max_errors) #define TARGET_FDRESET TARGET_IO(2, 0x54) #define TARGET_FDRAWCMD TARGET_IO(2, 0x58) #define TARGET_FDTWADDLE TARGET_IO(2, 0x59) diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index d82d1a5..5ba7c34 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -261,6 +261,13 @@ STRUCT(blkpg_ioctl_arg, TYPE_INT, /* datalen */ TYPE_PTRVOID) /* data */ =20 +STRUCT(floppy_max_errors, + TYPE_INT, /* abort */ + TYPE_INT, /* read_track */ + TYPE_INT, /* reset */ + TYPE_INT, /* recal */ + TYPE_INT) /* reporting */ + STRUCT(format_descr, TYPE_INT, /* device */ TYPE_INT, /* head */ --=20 2.7.4