VirtualBox

source: vbox/trunk/src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp@ 40949

Last change on this file since 40949 was 40949, checked in by vboxsync, 13 years ago

Runtime/Dvm: Include asm.h for ASMByteSwapU32 used when converting endianess on big endian architectures

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 18.2 KB
Line 
1/* $Id: dvmbsdlabel.cpp 40949 2012-04-16 18:53:51Z vboxsync $ */
2/** @file
3 * IPRT Disk Volume Management API (DVM) - BSD disklabel format backend.
4 */
5
6/*
7 * Copyright (C) 2011 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#include <iprt/types.h>
28#include <iprt/assert.h>
29#include <iprt/mem.h>
30#include <iprt/dvm.h>
31#include <iprt/string.h>
32#include <iprt/asm.h>
33#include "internal/dvm.h"
34
35/*******************************************************************************
36* Structures and Typedefs *
37*******************************************************************************/
38
39/*
40 * Below are the on disk structures of a bsd disklabel as found in
41 * /usr/include/sys/disklabel.h from a FreeBSD system.
42 *
43 * Everything is stored in little endian on the disk.
44 */
45
46/** BSD disklabel magic. */
47#define RTDVM_BSDLBL_MAGIC UINT32_C(0x82564557)
48/** Maximum number of partitions in the label. */
49#define RTDVM_BSDLBL_MAX_PARTITIONS 8
50
51/**
52 * A BSD disk label partition.
53 */
54#pragma pack(1)
55typedef struct BsdLabelPartition
56{
57 /** Number of sectors in the partition. */
58 uint32_t cSectors;
59 /** Start sector. */
60 uint32_t offSectorStart;
61 /** Filesystem fragment size. */
62 uint32_t cbFsFragment;
63 /** Filesystem type. */
64 uint8_t bFsType;
65 /** Filesystem fragments per block. */
66 uint8_t cFsFragmentsPerBlock;
67 /** Filesystem cylinders per group. */
68 uint16_t cFsCylPerGroup;
69} BsdLabelPartition;
70#pragma pack()
71AssertCompileSize(BsdLabelPartition, 16);
72/** Pointer to a BSD disklabel partition structure. */
73typedef BsdLabelPartition *PBsdLabelPartition;
74
75/**
76 * On disk BSD label structure.
77 */
78#pragma pack(1)
79typedef struct BsdLabel
80{
81 /** Magic identifying the BSD disk label. */
82 uint32_t u32Magic;
83 /** Drive type */
84 uint16_t u16DriveType;
85 /** Subtype depending on the drive type above. */
86 uint16_t u16SubType;
87 /** Type name. */
88 uint8_t abTypeName[16];
89 /** Pack identifier. */
90 uint8_t abPackName[16];
91 /** Number of bytes per sector. */
92 uint32_t cbSector;
93 /** Number of sectors per track. */
94 uint32_t cSectorsPerTrack;
95 /** Number of tracks per cylinder. */
96 uint32_t cTracksPerCylinder;
97 /** Number of data cylinders pre unit. */
98 uint32_t cDataCylindersPerUnit;
99 /** Number of data sectors per cylinder. */
100 uint32_t cDataSectorsPerCylinder;
101 /** Number of data sectors per unit (unit as in disk drive?). */
102 uint32_t cSectorsPerUnit;
103 /** Number of spare sectors per track. */
104 uint16_t cSpareSectorsPerTrack;
105 /** Number of spare sectors per cylinder. */
106 uint16_t cSpareSectorsPerCylinder;
107 /** Number of alternate cylinders per unit. */
108 uint32_t cSpareCylindersPerUnit;
109 /** Rotational speed of the disk drive in rotations per minute. */
110 uint16_t cRotationsPerMinute;
111 /** Sector interleave. */
112 uint16_t uSectorInterleave;
113 /** Sector 0 skew, per track. */
114 uint16_t uSectorSkewPerTrack;
115 /** Sector 0 skew, per cylinder. */
116 uint16_t uSectorSkewPerCylinder;
117 /** Head switch time in us. */
118 uint32_t usHeadSwitch;
119 /** Time of a track-to-track seek in us. */
120 uint32_t usTrackSeek;
121 /** Flags. */
122 uint32_t fFlags;
123 /** Drive type sepcific information. */
124 uint32_t au32DriveData[5];
125 /** Reserved. */
126 uint32_t au32Reserved[5];
127 /** The magic number again. */
128 uint32_t u32Magic2;
129 /** Checksum (xor of the whole structure). */
130 uint16_t u16ChkSum;
131 /** Number of partitions in the array. */
132 uint16_t cPartitions;
133 /** Boot area size in bytes. */
134 uint32_t cbBootArea;
135 /** Maximum size of the filesystem super block. */
136 uint32_t cbFsSuperBlock;
137 /** The partition array. */
138 BsdLabelPartition aPartitions[RTDVM_BSDLBL_MAX_PARTITIONS];
139} BsdLabel;
140#pragma pack()
141AssertCompileSize(BsdLabel, 148 + RTDVM_BSDLBL_MAX_PARTITIONS * 16);
142/** Pointer to a BSD disklabel structure. */
143typedef BsdLabel *PBsdLabel;
144
145/**
146 * BSD disk label volume manager data.
147 */
148typedef struct RTDVMFMTINTERNAL
149{
150 /** Pointer to the underlying disk. */
151 PCRTDVMDISK pDisk;
152 /** Number of used partitions. */
153 uint32_t cPartitions;
154 /** Saved BSD disklabel structure. */
155 BsdLabel DiskLabel;
156} RTDVMFMTINTERNAL;
157/** Pointer to the MBR volume manager. */
158typedef RTDVMFMTINTERNAL *PRTDVMFMTINTERNAL;
159
160/**
161 * MBR volume data.
162 */
163typedef struct RTDVMVOLUMEFMTINTERNAL
164{
165 /** Pointer to the volume manager. */
166 PRTDVMFMTINTERNAL pVolMgr;
167 /** Partition table entry index. */
168 uint32_t idxEntry;
169 /** Start offset of the volume. */
170 uint64_t offStart;
171 /** Size of the volume. */
172 uint64_t cbVolume;
173 /** Pointer to the raw partition table entry. */
174 PBsdLabelPartition pBsdPartitionEntry;
175} RTDVMVOLUMEFMTINTERNAL;
176/** Pointer to an MBR volume. */
177typedef RTDVMVOLUMEFMTINTERNAL *PRTDVMVOLUMEFMTINTERNAL;
178
179/** Converts a LBA number to the byte offset. */
180#define RTDVM_BSDLBL_LBA2BYTE(lba, disk) ((lba) * (disk)->cbSector)
181/** Converts a Byte offset to the LBA number. */
182#define RTDVM_BSDLBL_BYTE2LBA(lba, disk) ((lba) / (disk)->cbSector)
183
184/**
185 * Calculates the checksum of the entire bsd disklabel structure.
186 *
187 * @returns The checksum.
188 * @param pBsdLabel BSD disklabel to get teh checksum for.
189 */
190static uint16_t rtDvmFmtBsdLblDiskLabelChkSum(PBsdLabel pBsdLabel)
191{
192 uint16_t uChkSum = 0;
193 uint16_t *pCurr = (uint16_t *)pBsdLabel;
194 uint16_t *pEnd = (uint16_t *)&pBsdLabel->aPartitions[pBsdLabel->cPartitions];
195
196 while (pCurr < pEnd)
197 uChkSum ^= *pCurr++;
198
199 return uChkSum;
200}
201
202/**
203 * Converts a partition entry to the host endianness.
204 *
205 * @returns nothing.
206 * @param pPartition The partition to decode.
207 */
208static void rtDvmFmtBsdLblDiskLabelDecodePartition(PBsdLabelPartition pPartition)
209{
210 pPartition->cSectors = RT_LE2H_U32(pPartition->cSectors);
211 pPartition->offSectorStart = RT_LE2H_U32(pPartition->offSectorStart);
212 pPartition->cbFsFragment = RT_LE2H_U32(pPartition->cbFsFragment);
213 pPartition->cFsCylPerGroup = RT_LE2H_U16(pPartition->cFsCylPerGroup);
214}
215
216/**
217 * Converts the on disk BSD label to the host endianness.
218 *
219 * @returns Whether the given label structure is a valid BSD disklabel.
220 * @param pBsdLabel Pointer to the BSD disklabel to decode.
221 */
222static bool rtDvmFmtBsdLblDiskLabelDecode(PBsdLabel pBsdLabel)
223{
224 pBsdLabel->u32Magic = RT_LE2H_U32(pBsdLabel->u32Magic);
225 pBsdLabel->u16DriveType = RT_LE2H_U16(pBsdLabel->u16DriveType);
226 pBsdLabel->u16SubType = RT_LE2H_U16(pBsdLabel->u16SubType);
227 pBsdLabel->cbSector = RT_LE2H_U32(pBsdLabel->cbSector);
228 pBsdLabel->cSectorsPerTrack = RT_LE2H_U32(pBsdLabel->cSectorsPerTrack);
229 pBsdLabel->cTracksPerCylinder = RT_LE2H_U32(pBsdLabel->cTracksPerCylinder);
230 pBsdLabel->cDataCylindersPerUnit = RT_LE2H_U32(pBsdLabel->cDataCylindersPerUnit);
231 pBsdLabel->cDataSectorsPerCylinder = RT_LE2H_U32(pBsdLabel->cDataSectorsPerCylinder);
232 pBsdLabel->cSectorsPerUnit = RT_LE2H_U32(pBsdLabel->cSectorsPerUnit);
233 pBsdLabel->cSpareSectorsPerTrack = RT_LE2H_U16(pBsdLabel->cSpareSectorsPerTrack);
234 pBsdLabel->cSpareSectorsPerCylinder = RT_LE2H_U16(pBsdLabel->cSpareSectorsPerCylinder);
235 pBsdLabel->cSpareCylindersPerUnit = RT_LE2H_U32(pBsdLabel->cSpareCylindersPerUnit);
236 pBsdLabel->cRotationsPerMinute = RT_LE2H_U16(pBsdLabel->cRotationsPerMinute);
237 pBsdLabel->uSectorInterleave = RT_LE2H_U16(pBsdLabel->uSectorInterleave);
238 pBsdLabel->uSectorSkewPerTrack = RT_LE2H_U16(pBsdLabel->uSectorSkewPerTrack);
239 pBsdLabel->uSectorSkewPerCylinder = RT_LE2H_U16(pBsdLabel->uSectorSkewPerCylinder);
240 pBsdLabel->usHeadSwitch = RT_LE2H_U16(pBsdLabel->usHeadSwitch);
241 pBsdLabel->usTrackSeek = RT_LE2H_U16(pBsdLabel->usTrackSeek);
242 pBsdLabel->fFlags = RT_LE2H_U32(pBsdLabel->fFlags);
243
244 for (unsigned i = 0; i < RT_ELEMENTS(pBsdLabel->au32DriveData); i++)
245 pBsdLabel->au32DriveData[i] = RT_LE2H_U32(pBsdLabel->au32DriveData[i]);
246 for (unsigned i = 0; i < RT_ELEMENTS(pBsdLabel->au32Reserved); i++)
247 pBsdLabel->au32Reserved[i] = RT_LE2H_U32(pBsdLabel->au32Reserved[i]);
248
249 pBsdLabel->u32Magic2 = RT_LE2H_U32(pBsdLabel->u32Magic2);
250 pBsdLabel->u16ChkSum = RT_LE2H_U16(pBsdLabel->u16ChkSum);
251 pBsdLabel->cPartitions = RT_LE2H_U16(pBsdLabel->cPartitions);
252 pBsdLabel->cbBootArea = RT_LE2H_U32(pBsdLabel->cbBootArea);
253 pBsdLabel->cbFsSuperBlock = RT_LE2H_U32(pBsdLabel->cbFsSuperBlock);
254
255 /* Check the magics now. */
256 if ( pBsdLabel->u32Magic != RTDVM_BSDLBL_MAGIC
257 || pBsdLabel->u32Magic2 != RTDVM_BSDLBL_MAGIC
258 || pBsdLabel->cPartitions != RTDVM_BSDLBL_MAX_PARTITIONS)
259 return false;
260
261 /* Convert the partitions array. */
262 for (unsigned i = 0; i < RT_ELEMENTS(pBsdLabel->aPartitions); i++)
263 rtDvmFmtBsdLblDiskLabelDecodePartition(&pBsdLabel->aPartitions[i]);
264
265 /* Check the checksum now. */
266 uint16_t u16ChkSumSaved = pBsdLabel->u16ChkSum;
267
268 pBsdLabel->u16ChkSum = 0;
269 if (u16ChkSumSaved != rtDvmFmtBsdLblDiskLabelChkSum(pBsdLabel))
270 return false;
271
272 pBsdLabel->u16ChkSum = u16ChkSumSaved;
273 return true;
274}
275
276DECLCALLBACK(int) rtDvmFmtBsdLblProbe(PCRTDVMDISK pDisk, uint32_t *puScore)
277{
278 BsdLabel DiskLabel;
279 int rc = VINF_SUCCESS;
280
281 *puScore = RTDVM_MATCH_SCORE_UNSUPPORTED;
282
283 if (pDisk->cbDisk >= sizeof(BsdLabel))
284 {
285 /* Read from the disk and check for the disk label structure. */
286 rc = rtDvmDiskRead(pDisk, RTDVM_BSDLBL_LBA2BYTE(1, pDisk), &DiskLabel, sizeof(BsdLabel));
287 if ( RT_SUCCESS(rc)
288 && rtDvmFmtBsdLblDiskLabelDecode(&DiskLabel))
289 *puScore = RTDVM_MATCH_SCORE_PERFECT;
290 }
291 return rc;
292}
293
294DECLCALLBACK(int) rtDvmFmtBsdLblOpen(PCRTDVMDISK pDisk, PRTDVMFMT phVolMgrFmt)
295{
296 int rc = VINF_SUCCESS;
297 PRTDVMFMTINTERNAL pThis = NULL;
298
299 pThis = (PRTDVMFMTINTERNAL)RTMemAllocZ(sizeof(RTDVMFMTINTERNAL));
300 if (pThis)
301 {
302 pThis->pDisk = pDisk;
303 pThis->cPartitions = 0;
304
305 /* Read from the disk and check for the disk label structure. */
306 rc = rtDvmDiskRead(pDisk, RTDVM_BSDLBL_LBA2BYTE(1, pDisk), &pThis->DiskLabel, sizeof(BsdLabel));
307 if ( RT_SUCCESS(rc)
308 && rtDvmFmtBsdLblDiskLabelDecode(&pThis->DiskLabel))
309 {
310 /* Count number of used entries. */
311 for (unsigned i = 0; i < pThis->DiskLabel.cPartitions; i++)
312 if (pThis->DiskLabel.aPartitions[i].cSectors)
313 pThis->cPartitions++;
314
315 *phVolMgrFmt = pThis;
316 }
317 else
318 {
319 RTMemFree(pThis);
320 rc = VERR_INVALID_MAGIC;
321 }
322 }
323 else
324 rc = VERR_NO_MEMORY;
325
326 return rc;
327}
328
329DECLCALLBACK(int) rtDvmFmtBsdLblInitialize(PCRTDVMDISK pDisk, PRTDVMFMT phVolMgrFmt)
330{
331 NOREF(pDisk); NOREF(phVolMgrFmt);
332 return VERR_NOT_IMPLEMENTED;
333}
334
335DECLCALLBACK(void) rtDvmFmtBsdLblClose(RTDVMFMT hVolMgrFmt)
336{
337 PRTDVMFMTINTERNAL pThis = hVolMgrFmt;
338
339 pThis->pDisk = NULL;
340 pThis->cPartitions = 0;
341 memset(&pThis->DiskLabel, 0, sizeof(BsdLabel));
342 RTMemFree(pThis);
343}
344
345DECLCALLBACK(uint32_t) rtDvmFmtBsdLblGetValidVolumes(RTDVMFMT hVolMgrFmt)
346{
347 PRTDVMFMTINTERNAL pThis = hVolMgrFmt;
348 return pThis->cPartitions;
349}
350
351DECLCALLBACK(uint32_t) rtDvmFmtBsdLblGetMaxVolumes(RTDVMFMT hVolMgrFmt)
352{
353 PRTDVMFMTINTERNAL pThis = hVolMgrFmt;
354 return pThis->DiskLabel.cPartitions;
355}
356
357/**
358 * Creates a new volume.
359 *
360 * @returns IPRT status code.
361 * @param pThis The MBR volume manager data.
362 * @param pbBsdLblEntry The raw MBR entry data.
363 * @param idx The index in the partition table.
364 * @param phVolFmt Where to store the volume data on success.
365 */
366static int rtDvmFmtBsdLblVolumeCreate(PRTDVMFMTINTERNAL pThis, PBsdLabelPartition pBsdPartitionEntry,
367 uint32_t idx, PRTDVMVOLUMEFMT phVolFmt)
368{
369 int rc = VINF_SUCCESS;
370 PRTDVMVOLUMEFMTINTERNAL pVol = (PRTDVMVOLUMEFMTINTERNAL)RTMemAllocZ(sizeof(RTDVMVOLUMEFMTINTERNAL));
371
372 if (pVol)
373 {
374 pVol->pVolMgr = pThis;
375 pVol->idxEntry = idx;
376 pVol->pBsdPartitionEntry = pBsdPartitionEntry;
377 pVol->offStart = (uint64_t)pBsdPartitionEntry->offSectorStart * pThis->DiskLabel.cbSector;
378 pVol->cbVolume = (uint64_t)pBsdPartitionEntry->cSectors * pThis->DiskLabel.cbSector;
379
380 *phVolFmt = pVol;
381 }
382 else
383 rc = VERR_NO_MEMORY;
384
385 return rc;
386}
387
388DECLCALLBACK(int) rtDvmFmtBsdLblQueryFirstVolume(RTDVMFMT hVolMgrFmt, PRTDVMVOLUMEFMT phVolFmt)
389{
390 int rc = VINF_SUCCESS;
391 PRTDVMFMTINTERNAL pThis = hVolMgrFmt;
392
393 if (pThis->cPartitions != 0)
394 {
395 /* Search for the first non empty entry. */
396 for (unsigned i = 0; i < pThis->DiskLabel.cPartitions; i++)
397 {
398 if (pThis->DiskLabel.aPartitions[i].cSectors)
399 {
400 rc = rtDvmFmtBsdLblVolumeCreate(pThis, &pThis->DiskLabel.aPartitions[i],
401 i, phVolFmt);
402 break;
403 }
404 }
405 }
406 else
407 rc = VERR_DVM_MAP_EMPTY;
408
409 return rc;
410}
411
412DECLCALLBACK(int) rtDvmFmtBsdLblQueryNextVolume(RTDVMFMT hVolMgrFmt, RTDVMVOLUMEFMT hVolFmt, PRTDVMVOLUMEFMT phVolFmtNext)
413{
414 int rc = VERR_DVM_MAP_NO_VOLUME;
415 PRTDVMFMTINTERNAL pThis = hVolMgrFmt;
416 PRTDVMVOLUMEFMTINTERNAL pVol = hVolFmt;
417 PBsdLabelPartition pBsdPartitionEntry = pVol->pBsdPartitionEntry + 1;
418
419 for (unsigned i = pVol->idxEntry + 1; i < pThis->DiskLabel.cPartitions; i++)
420 {
421 if (pBsdPartitionEntry->cSectors)
422 {
423 rc = rtDvmFmtBsdLblVolumeCreate(pThis, pBsdPartitionEntry, i, phVolFmtNext);
424 break;
425 }
426 pBsdPartitionEntry++;
427 }
428
429 return rc;
430}
431
432DECLCALLBACK(void) rtDvmFmtBsdLblVolumeClose(RTDVMVOLUMEFMT hVolFmt)
433{
434 PRTDVMVOLUMEFMTINTERNAL pVol = hVolFmt;
435
436 pVol->pVolMgr = NULL;
437 pVol->offStart = 0;
438 pVol->cbVolume = 0;
439 pVol->pBsdPartitionEntry = NULL;
440
441 RTMemFree(pVol);
442}
443
444DECLCALLBACK(uint64_t) rtDvmFmtBsdLblVolumeGetSize(RTDVMVOLUMEFMT hVolFmt)
445{
446 PRTDVMVOLUMEFMTINTERNAL pVol = hVolFmt;
447
448 return pVol->cbVolume;
449}
450
451DECLCALLBACK(int) rtDvmFmtBsdLblVolumeQueryName(RTDVMVOLUMEFMT hVolFmt, char **ppszVolName)
452{
453 NOREF(hVolFmt); NOREF(ppszVolName);
454 return VERR_NOT_SUPPORTED;
455}
456
457DECLCALLBACK(RTDVMVOLTYPE) rtDvmFmtBsdLblVolumeGetType(RTDVMVOLUMEFMT hVolFmt)
458{
459 NOREF(hVolFmt);
460 return RTDVMVOLTYPE_UNKNOWN;
461}
462
463DECLCALLBACK(uint64_t) rtDvmFmtBsdLblVolumeGetFlags(RTDVMVOLUMEFMT hVolFmt)
464{
465 NOREF(hVolFmt);
466 return 0;
467}
468
469DECLCALLBACK(bool) rtDvmFmtBsdLblVolumeIsRangeIntersecting(RTDVMVOLUMEFMT hVolFmt,
470 uint64_t offStart, size_t cbRange,
471 uint64_t *poffVol,
472 uint64_t *pcbIntersect)
473{
474 bool fIntersect = false;
475 PRTDVMVOLUMEFMTINTERNAL pVol = hVolFmt;
476
477 if (RTDVM_RANGE_IS_INTERSECTING(pVol->offStart, pVol->cbVolume, offStart))
478 {
479 fIntersect = true;
480 *poffVol = offStart - pVol->offStart;
481 *pcbIntersect = RT_MIN(cbRange, pVol->offStart + pVol->cbVolume - offStart);
482 }
483
484 return fIntersect;
485}
486
487DECLCALLBACK(int) rtDvmFmtBsdLblVolumeRead(RTDVMVOLUMEFMT hVolFmt, uint64_t off, void *pvBuf, size_t cbRead)
488{
489 PRTDVMVOLUMEFMTINTERNAL pVol = hVolFmt;
490 AssertReturn(off + cbRead <= pVol->cbVolume, VERR_INVALID_PARAMETER);
491
492 return rtDvmDiskRead(pVol->pVolMgr->pDisk, pVol->offStart + off, pvBuf, cbRead);
493}
494
495DECLCALLBACK(int) rtDvmFmtBsdLblVolumeWrite(RTDVMVOLUMEFMT hVolFmt, uint64_t off, const void *pvBuf, size_t cbWrite)
496{
497 PRTDVMVOLUMEFMTINTERNAL pVol = hVolFmt;
498 AssertReturn(off + cbWrite <= pVol->cbVolume, VERR_INVALID_PARAMETER);
499
500 return rtDvmDiskWrite(pVol->pVolMgr->pDisk, pVol->offStart + off, pvBuf, cbWrite);
501}
502
503DECLHIDDEN(RTDVMFMTOPS) g_rtDvmFmtBsdLbl =
504{
505 /* pcszFmt */
506 "BsdLabel",
507 /* pfnProbe */
508 rtDvmFmtBsdLblProbe,
509 /* pfnOpen */
510 rtDvmFmtBsdLblOpen,
511 /* pfnInitialize */
512 rtDvmFmtBsdLblInitialize,
513 /* pfnClose */
514 rtDvmFmtBsdLblClose,
515 /* pfnGetValidVolumes */
516 rtDvmFmtBsdLblGetValidVolumes,
517 /* pfnGetMaxVolumes */
518 rtDvmFmtBsdLblGetMaxVolumes,
519 /* pfnQueryFirstVolume */
520 rtDvmFmtBsdLblQueryFirstVolume,
521 /* pfnQueryNextVolume */
522 rtDvmFmtBsdLblQueryNextVolume,
523 /* pfnVolumeClose */
524 rtDvmFmtBsdLblVolumeClose,
525 /* pfnVolumeGetSize */
526 rtDvmFmtBsdLblVolumeGetSize,
527 /* pfnVolumeQueryName */
528 rtDvmFmtBsdLblVolumeQueryName,
529 /* pfnVolumeGetType */
530 rtDvmFmtBsdLblVolumeGetType,
531 /* pfnVolumeGetFlags */
532 rtDvmFmtBsdLblVolumeGetFlags,
533 /* pfnVolumeIsRangeIntersecting */
534 rtDvmFmtBsdLblVolumeIsRangeIntersecting,
535 /* pfnVolumeRead */
536 rtDvmFmtBsdLblVolumeRead,
537 /* pfnVolumeWrite */
538 rtDvmFmtBsdLblVolumeWrite
539};
540
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