]>
glassweightruler.freedombox.rocks Git - Ventoy.git/blob - Ventoy2Disk/Ventoy2Disk/DiskService.h
1 /******************************************************************************
4 * Copyright (c) 2021, longpanda <admin@ventoy.net>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 3 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef __DISKSERVICE_H__
22 #define __DISKSERVICE_H__
24 typedef struct VDS_PARA
37 BOOL
DISK_CleanDisk(int DriveIndex
);
38 BOOL
DISK_DeleteVtoyEFIPartition(int DriveIndex
, UINT64 EfiPartOffset
);
39 BOOL
DISK_ChangeVtoyEFIAttr(int DriveIndex
, UINT64 Offset
, UINT64 Attr
);
40 BOOL
DISK_ChangeVtoyEFI2ESP(int DriveIndex
, UINT64 Offset
);
41 BOOL
DISK_ChangeVtoyEFI2Basic(int DriveIndex
, UINT64 Offset
);
42 BOOL
DISK_ShrinkVolume(int DriveIndex
, const char* VolumeGuid
, CHAR DriveLetter
, UINT64 OldBytes
, UINT64 ReduceBytes
);
43 BOOL
DISK_FormatVolume(char DriveLetter
, int fs
, UINT64 VolumeSize
);
47 BOOL
VDS_CleanDisk(int DriveIndex
);
48 BOOL
VDS_DeleteAllPartitions(int DriveIndex
);
49 BOOL
VDS_DeleteVtoyEFIPartition(int DriveIndex
, UINT64 EfiPartOffset
);
50 BOOL
VDS_ChangeVtoyEFIAttr(int DriveIndex
, UINT64 Offset
, UINT64 Attr
);
51 BOOL
VDS_ChangeVtoyEFI2ESP(int DriveIndex
, UINT64 Offset
);
52 BOOL
VDS_ChangeVtoyEFI2Basic(int DriveIndex
, UINT64 Offset
);
53 BOOL
VDS_ShrinkVolume(int DriveIndex
, const char* VolumeGuid
, CHAR DriveLetter
, UINT64 OldBytes
, UINT64 ReduceBytes
);
54 BOOL
VDS_IsLastAvaliable(void);
55 BOOL
VDS_FormatVolume(char DriveLetter
, int fs
, DWORD ClusterSize
);
58 BOOL
DSPT_CleanDisk(int DriveIndex
);
59 BOOL
DSPT_FormatVolume(char DriveLetter
, int fs
, DWORD ClusterSize
);
62 BOOL
PSHELL_CleanDisk(int DriveIndex
);
63 BOOL
PSHELL_DeleteVtoyEFIPartition(int DriveIndex
, UINT64 EfiPartOffset
);
64 BOOL
PSHELL_ChangeVtoyEFI2ESP(int DriveIndex
, UINT64 Offset
);
65 BOOL
PSHELL_ChangeVtoyEFI2Basic(int DriveIndex
, UINT64 Offset
);
66 BOOL
PSHELL_ShrinkVolume(int DriveIndex
, const char* VolumeGuid
, CHAR DriveLetter
, UINT64 OldBytes
, UINT64 ReduceBytes
);
67 BOOL
PSHELL_FormatVolume(char DriveLetter
, int fs
, DWORD ClusterSize
);