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=1564406065; cv=none; d=zoho.com; s=zohoarc; b=Mb+pRUWNJAmJjcf6Via5SOLnRBq/1KS3orc8cMDro78fLumKDEjk2YfwE0Byb8rxKa+jWv5zBXaYAx/I5L2uAnnfVnxtmXhBmYglE9klLE1Cl6UfRrbvVzmY/sODRhrqOTyR/m/Z+4nGGVuTRznH7G+LeB6APjW4kZgILcdqQzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564406065; 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=5JqfVkcfyUbaLfF8X0BKRyauqcXoUC1lC8KRRVzLHns=; b=UjjigO3qgiEFeL+vWBc/7Ed4rXBu2L+Nhv+/Gi8G5Rvys/h4r0vNaIvN8Zgk14L95qggEXoQzS1kE6/FiBx5Cnzx6JlanrGoErjbevkQ4Vx74EyDxE2Zo0xCyR+j4icom7rH7n6Z5gPRaXEj5QaN5jJ1UvqsGYpY0ATxG1HQcpo= 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 1564406065618641.234416423113; Mon, 29 Jul 2019 06:14:25 -0700 (PDT) Received: from localhost ([::1]:52072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hs5Ts-0008UI-L9 for importer@patchew.org; Mon, 29 Jul 2019 09:14:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40826) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hs5Qu-0003Wu-8Y for qemu-devel@nongnu.org; Mon, 29 Jul 2019 09:11:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hs5Qt-0003VF-8O for qemu-devel@nongnu.org; Mon, 29 Jul 2019 09:11:20 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:50065 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 1hs5Qt-0001cC-1z for qemu-devel@nongnu.org; Mon, 29 Jul 2019 09:11:19 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 611321A21BB; Mon, 29 Jul 2019 15:10:16 +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 4891F1A20A2; Mon, 29 Jul 2019 15:10:16 +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:48 +0200 Message-Id: <1564405791-9147-5-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 4/7] linux-user: Add support for FDFMTBEG, FDFMTTRK, and FDFMTEND 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 FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls provide means for controlling formatting of a floppy drive. Signed-off-by: Aleksandar Markovic --- 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 ab4ef2e..e393ad6 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -114,6 +114,9 @@ =20 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 4185391..1ca115d 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -887,6 +887,9 @@ struct target_pollfd { =20 #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_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 */ =20 +STRUCT(format_descr, + TYPE_INT, /* device */ + TYPE_INT, /* head */ + TYPE_INT) /* track */ + #if defined(CONFIG_USBFS) /* usb device ioctls */ STRUCT(usbdevfs_ctrltransfer, --=20 2.7.4