VirtualBox

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

Last change on this file since 88956 was 82968, checked in by vboxsync, 5 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/* $Id: DrvHostFloppy.cpp 82968 2020-02-04 10:35:17Z vboxsync $ */
2/** @file
3 *
4 * VBox storage devices:
5 * Host floppy block driver
6 */
7
8/*
9 * Copyright (C) 2006-2020 Oracle Corporation
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.virtualbox.org. This file is free software;
13 * you can redistribute it and/or modify it under the terms of the GNU
14 * General Public License (GPL) as published by the Free Software
15 * Foundation, in version 2 as it comes in the "COPYING" file of the
16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 */
19
20
21/*********************************************************************************************************************************
22* Header Files *
23*********************************************************************************************************************************/
24#define LOG_GROUP LOG_GROUP_DRV_HOST_FLOPPY
25
26#include <VBox/vmm/pdmdrv.h>
27#include <VBox/vmm/pdmstorageifs.h>
28#include <iprt/assert.h>
29#include <iprt/file.h>
30#include <iprt/string.h>
31#include <iprt/thread.h>
32#include <iprt/semaphore.h>
33#include <iprt/uuid.h>
34#include <iprt/asm.h>
35#include <iprt/critsect.h>
36
37#include "VBoxDD.h"
38#include "DrvHostBase.h"
39
40
41
42/**
43 * @copydoc FNPDMDRVCONSTRUCT
44 */
45static DECLCALLBACK(int) drvHostFloppyConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
46{
47 RT_NOREF(fFlags);
48 LogFlow(("drvHostFloppyConstruct: iInstance=%d\n", pDrvIns->iInstance));
49
50 /*
51 * Init instance data.
52 */
53 int rc = DRVHostBaseInit(pDrvIns, pCfg, "Path\0ReadOnly\0Interval\0Locked\0BIOSVisible\0",
54 PDMMEDIATYPE_FLOPPY_1_44);
55 LogFlow(("drvHostFloppyConstruct: returns %Rrc\n", rc));
56 return rc;
57}
58
59
60/**
61 * Block driver registration record.
62 */
63const PDMDRVREG g_DrvHostFloppy =
64{
65 /* u32Version */
66 PDM_DRVREG_VERSION,
67 /* szName */
68 "HostFloppy",
69 /* szRCMod */
70 "",
71 /* szR0Mod */
72 "",
73 /* pszDescription */
74 "Host Floppy Block Driver.",
75 /* fFlags */
76 PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
77 /* fClass. */
78 PDM_DRVREG_CLASS_BLOCK,
79 /* cMaxInstances */
80 ~0U,
81 /* cbInstance */
82 sizeof(DRVHOSTBASE),
83 /* pfnConstruct */
84 drvHostFloppyConstruct,
85 /* pfnDestruct */
86 DRVHostBaseDestruct,
87 /* pfnRelocate */
88 NULL,
89 /* pfnIOCtl */
90 NULL,
91 /* pfnPowerOn */
92 NULL,
93 /* pfnReset */
94 NULL,
95 /* pfnSuspend */
96 NULL,
97 /* pfnResume */
98 NULL,
99 /* pfnAttach */
100 NULL,
101 /* pfnDetach */
102 NULL,
103 /* pfnPowerOff */
104 NULL,
105 /* pfnSoftReset */
106 NULL,
107 /* u32EndVersion */
108 PDM_DRVREG_VERSION
109};
110
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