VirtualBox

source: vbox/trunk/src/VBox/Devices/Storage/DrvHostFloppy.cpp@ 98110

Last change on this file since 98110 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: DrvHostFloppy.cpp 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 *
4 * VBox storage devices:
5 * Host floppy block driver
6 */
7
8/*
9 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
10 *
11 * This file is part of VirtualBox base platform packages, as
12 * available from https://www.virtualbox.org.
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation, in version 3 of the
17 * License.
18 *
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see <https://www.gnu.org/licenses>.
26 *
27 * SPDX-License-Identifier: GPL-3.0-only
28 */
29
30
31/*********************************************************************************************************************************
32* Header Files *
33*********************************************************************************************************************************/
34#define LOG_GROUP LOG_GROUP_DRV_HOST_FLOPPY
35
36#include <VBox/vmm/pdmdrv.h>
37#include <VBox/vmm/pdmstorageifs.h>
38#include <iprt/assert.h>
39#include <iprt/file.h>
40#include <iprt/string.h>
41#include <iprt/thread.h>
42#include <iprt/semaphore.h>
43#include <iprt/uuid.h>
44#include <iprt/asm.h>
45#include <iprt/critsect.h>
46
47#include "VBoxDD.h"
48#include "DrvHostBase.h"
49
50
51
52/**
53 * @copydoc FNPDMDRVCONSTRUCT
54 */
55static DECLCALLBACK(int) drvHostFloppyConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
56{
57 RT_NOREF(fFlags);
58 LogFlow(("drvHostFloppyConstruct: iInstance=%d\n", pDrvIns->iInstance));
59
60 /*
61 * Init instance data.
62 */
63 int rc = DRVHostBaseInit(pDrvIns, pCfg, "Path\0ReadOnly\0Interval\0BIOSVisible\0",
64 PDMMEDIATYPE_FLOPPY_1_44);
65 LogFlow(("drvHostFloppyConstruct: returns %Rrc\n", rc));
66 return rc;
67}
68
69
70/**
71 * Block driver registration record.
72 */
73const PDMDRVREG g_DrvHostFloppy =
74{
75 /* u32Version */
76 PDM_DRVREG_VERSION,
77 /* szName */
78 "HostFloppy",
79 /* szRCMod */
80 "",
81 /* szR0Mod */
82 "",
83 /* pszDescription */
84 "Host Floppy Block Driver.",
85 /* fFlags */
86 PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
87 /* fClass. */
88 PDM_DRVREG_CLASS_BLOCK,
89 /* cMaxInstances */
90 ~0U,
91 /* cbInstance */
92 sizeof(DRVHOSTBASE),
93 /* pfnConstruct */
94 drvHostFloppyConstruct,
95 /* pfnDestruct */
96 DRVHostBaseDestruct,
97 /* pfnRelocate */
98 NULL,
99 /* pfnIOCtl */
100 NULL,
101 /* pfnPowerOn */
102 NULL,
103 /* pfnReset */
104 NULL,
105 /* pfnSuspend */
106 NULL,
107 /* pfnResume */
108 NULL,
109 /* pfnAttach */
110 NULL,
111 /* pfnDetach */
112 NULL,
113 /* pfnPowerOff */
114 NULL,
115 /* pfnSoftReset */
116 NULL,
117 /* u32EndVersion */
118 PDM_DRVREG_VERSION
119};
120
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette