22#include "../btrfsioctl.h"
33#define WIN32_NO_STATUS
41#define NO_SHLWAPI_STRFCNS
47 bool alloc_bqs2 =
false;
53 uint64_t recoverable_errors = 0, unrecoverable_errors = 0;
127 recoverable_errors++;
129 unrecoverable_errors++;
141 else if (bse->
metadata.firstitem.obj_id == 0 && bse->
metadata.firstitem.obj_type == 0 && bse->
metadata.firstitem.offset == 0)
151 else if (bse->
metadata.firstitem.obj_id == 0 && bse->
metadata.firstitem.obj_type == 0 && bse->
metadata.firstitem.offset == 0)
161 else if (bse->
data.subvol != 0)
171 else if (bse->
data.subvol != 0)
173 bse->
data.filename_length /
sizeof(
WCHAR), bse->
data.filename, bse->
data.offset);
176 bse->
data.filename, bse->
data.offset);
431 SetTimer(hwndDlg, 1, 1000,
nullptr);
498 tp.PrivilegeCount = 1;
499 tp.Privileges[0].Luid = luid;
520 if (
args.size() >= 1) {
533 tp.PrivilegeCount = 1;
534 tp.Privileges[0].Luid = luid;
556 if (
args.size() >= 1) {
569 tp.PrivilegeCount = 1;
570 tp.Privileges[0].Luid = luid;
#define FSCTL_BTRFS_QUERY_SCRUB
#define FSCTL_BTRFS_STOP_SCRUB
#define FSCTL_BTRFS_PAUSE_SCRUB
#define FSCTL_BTRFS_QUERY_BALANCE
#define FSCTL_BTRFS_RESUME_SCRUB
#define FSCTL_BTRFS_START_SCRUB
#define BTRFS_SCRUB_PAUSED
#define BTRFS_BALANCE_RUNNING
#define BTRFS_SCRUB_STOPPED
#define BTRFS_BALANCE_PAUSED
void StopScrub(HWND hwndDlg)
INT_PTR CALLBACK ScrubDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
void StartScrub(HWND hwndDlg)
void RefreshScrubDlg(HWND hwndDlg, bool first_time)
void UpdateTextBox(HWND hwndDlg, btrfs_query_scrub *bqs)
void PauseScrub(HWND hwndDlg)
#define NT_SUCCESS(StatCode)
void error_message(HWND hwnd, const char *msg)
void wstring_sprintf(wstring &s, wstring fmt,...)
void format_size(uint64_t size, wstring &s, bool show_bytes)
void command_line_to_args(LPWSTR cmdline, vector< wstring > &args)
#define IDS_SCRUB_MSG_RECOVERABLE_DATA
#define IDS_SCRUB_MSG_RECOVERABLE_PARITY
#define IDS_SCRUB_MSG_SUMMARY
#define IDC_SCRUB_PROGRESS
#define IDS_SCRUB_MSG_SUMMARY_ERRORS_RECOVERABLE
#define IDS_SCRUB_MSG_RECOVERABLE_METADATA
#define IDS_SCRUB_MSG_UNRECOVERABLE_METADATA
#define IDS_SCRUB_MSG_UNRECOVERABLE_METADATA_FIRSTITEM
#define IDS_SCRUB_MSG_UNRECOVERABLE_DATA
#define IDS_SCRUB_MSG_SUMMARY_ERRORS_UNRECOVERABLE
#define IDS_SCRUB_MSG_STARTED
#define IDS_SCRUB_MSG_UNRECOVERABLE_DATA_SUBVOL
#define IDS_SCRUB_FINISHED
#define IDS_SCRUB_BALANCE_RUNNING
#define IDS_SCRUB_MSG_FINISHED
#define IDS_SCRUB_RUNNING
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
#define INVALID_HANDLE_VALUE
#define GetCurrentProcess()
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
BOOL WINAPI SystemTimeToTzSpecificLocalTime(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime)
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
static struct msdos_boot_sector bs
#define FILE_FLAG_OPEN_REPARSE_POINT
#define FILE_FLAG_BACKUP_SEMANTICS
static PIO_STATUS_BLOCK iosb
static float(__cdecl *square_half_float)(float x
static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars)
#define FILE_SHARE_DELETE
NTSYSAPI NTSTATUS NTAPI NtFsControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
#define LOCALE_USER_DEFAULT
static INT_PTR CALLBACK stub_ScrubDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
void CALLBACK StopScrubW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
void CALLBACK ShowScrubW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
void CALLBACK StartScrubW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
#define STATUS_DEVICE_NOT_READY
#define STATUS_BUFFER_OVERFLOW
LARGE_INTEGER finish_time
struct btrfs_scrub_error::@666::@669 metadata
struct btrfs_scrub_error::@666::@668 data
DWORD WINAPI GetLastError(void)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED