ReactOS  0.4.15-dev-321-g2d9b385
BtrfsPropSheet Class Reference

#include <propsheet.h>

Inheritance diagram for BtrfsPropSheet:
Collaboration diagram for BtrfsPropSheet:

Public Member Functions

 BtrfsPropSheet ()
 
virtual ~BtrfsPropSheet ()
 
HRESULT __stdcall QueryInterface (REFIID riid, void **ppObj)
 
ULONG __stdcall AddRef ()
 
ULONG __stdcall Release ()
 
virtual HRESULT __stdcall Initialize (PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)
 
virtual HRESULT __stdcall AddPages (LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
 
virtual HRESULT __stdcall ReplacePage (UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam)
 
void init_propsheet (HWND hwndDlg)
 
void change_inode_flag (HWND hDlg, uint64_t flag, UINT state)
 
void change_perm_flag (HWND hDlg, ULONG perm, UINT state)
 
void change_uid (HWND hDlg, uint32_t uid)
 
void change_gid (HWND hDlg, uint32_t gid)
 
void apply_changes (HWND hDlg)
 
void set_size_on_disk (HWND hwndDlg)
 
DWORD search_list_thread ()
 
void do_search (const wstring &fn)
 
void update_size_details_dialog (HWND hDlg)
 
void open_as_admin (HWND hwndDlg)
 
void set_cmdline (const wstring &cmdline)
 

Public Attributes

bool readonly
 
bool can_change_perms
 
bool can_change_nocow
 
WCHAR size_format [255]
 
WCHAR cr_format [255]
 
WCHAR frag_format [255]
 
HANDLE thread
 
uint32_t min_mode
 
uint32_t max_mode
 
uint32_t mode
 
uint32_t mode_set
 
uint64_t min_flags
 
uint64_t max_flags
 
uint64_t flags
 
uint64_t flags_set
 
uint64_t subvol
 
uint64_t inode
 
uint64_t rdev
 
uint8_t type
 
uint8_t min_compression_type
 
uint8_t max_compression_type
 
uint8_t compress_type
 
uint32_t uid
 
uint32_t gid
 
bool various_subvols
 
bool various_inodes
 
bool various_types
 
bool various_uids
 
bool various_gids
 
bool compress_type_changed
 
bool has_subvols
 
bool ro_subvol
 
bool various_ro
 
bool ro_changed
 
bool show_admin_button
 

Private Member Functions

void apply_changes_file (HWND hDlg, const wstring &fn)
 
HRESULT check_file (const wstring &fn, UINT i, UINT num_files, UINT *sv)
 
HRESULT load_file_list ()
 
- Private Member Functions inherited from IShellPropSheetExt
HRESULT AddPages ([in] LPFNSVADDPROPSHEETPAGE pfnAddPage, [in] LPARAM lParam)
 
HRESULT ReplacePage ([in] EXPPS uPageID, [in] LPFNSVADDPROPSHEETPAGE pfnReplaceWith, [in] LPARAM lParam)
 

Private Attributes

LONG refcount
 
bool ignore
 
STGMEDIUM stgm
 
bool stgm_set
 
bool flags_changed
 
bool perms_changed
 
bool uid_changed
 
bool gid_changed
 
uint64_t sizes [5]
 
uint64_t totalsize
 
uint64_t allocsize
 
uint64_t sparsesize
 
uint64_t num_extents
 
deque< wstring > search_list
 
wstring filename
 
uint32_t sector_size
 

Additional Inherited Members

- Public Types inherited from IShellExtInit
typedef IShellExtInitLPSHELLEXTINIT
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Private Types inherited from IShellPropSheetExt
enum  tagSHELLPROPSHEETEXTPAGEID { EXPPS_FILETYPES = 0x1 }
 
typedef UINT EXPPS
 
- Private Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 91 of file propsheet.h.

Constructor & Destructor Documentation

◆ BtrfsPropSheet()

BtrfsPropSheet::BtrfsPropSheet ( )
inline

Definition at line 93 of file propsheet.h.

93  {
94  refcount = 0;
95  ignore = true;
96  stgm_set = false;
97  readonly = false;
98  flags_changed = false;
99  perms_changed = false;
100  uid_changed = false;
101  gid_changed = false;
102  compress_type_changed = false;
103  ro_changed = false;
104  can_change_perms = false;
105  show_admin_button = false;
106  thread = nullptr;
107  mode = mode_set = 0;
108  flags = flags_set = 0;
109  has_subvols = false;
110  filename = L"";
111 
112  sizes[0] = sizes[1] = sizes[2] = sizes[3] = sizes[4] = 0;
114  num_extents = 0;
115  sector_size = 0;
116  size_format[0] = 0;
117  cr_format[0] = 0;
118  frag_format[0] = 0;
119 
121  }
bool uid_changed
Definition: propsheet.h:189
WCHAR frag_format[255]
Definition: propsheet.h:174
const char * filename
Definition: ioapi.h:135
WCHAR size_format[255]
Definition: propsheet.h:174
uint64_t totalsize
Definition: propsheet.h:190
uint64_t allocsize
Definition: propsheet.h:190
bool has_subvols
Definition: propsheet.h:181
LONG objs_loaded
Definition: main.cpp:48
uint64_t num_extents
Definition: propsheet.h:190
uint32_t sector_size
Definition: propsheet.h:193
uint32_t mode_set
Definition: propsheet.h:176
bool compress_type_changed
Definition: propsheet.h:181
bool perms_changed
Definition: propsheet.h:189
bool gid_changed
Definition: propsheet.h:189
GLbitfield flags
Definition: glext.h:7161
HANDLE thread
Definition: propsheet.h:175
uint64_t sparsesize
Definition: propsheet.h:190
WCHAR cr_format[255]
Definition: propsheet.h:174
bool can_change_perms
Definition: propsheet.h:172
static const WCHAR L[]
Definition: oid.c:1250
GLenum mode
Definition: glext.h:6217
bool flags_changed
Definition: propsheet.h:189
#define InterlockedIncrement
Definition: armddk.h:53
uint64_t sizes[5]
Definition: propsheet.h:190
bool show_admin_button
Definition: propsheet.h:181
uint64_t flags_set
Definition: propsheet.h:177

◆ ~BtrfsPropSheet()

virtual BtrfsPropSheet::~BtrfsPropSheet ( )
inlinevirtual

Definition at line 123 of file propsheet.h.

123  {
124  if (stgm_set) {
125  GlobalUnlock(stgm.hGlobal);
127  }
128 
130  }
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
LONG objs_loaded
Definition: main.cpp:48
#define InterlockedDecrement
Definition: armddk.h:52
STGMEDIUM stgm
Definition: propsheet.h:187
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190

Member Function Documentation

◆ AddPages()

HRESULT __stdcall BtrfsPropSheet::AddPages ( LPFNADDPROPSHEETPAGE  pfnAddPage,
LPARAM  lParam 
)
virtual

Definition at line 1300 of file propsheet.cpp.

1300  {
1301  try {
1302  PROPSHEETPAGE psp;
1303  HPROPSHEETPAGE hPage;
1304  INITCOMMONCONTROLSEX icex;
1305 
1306  if (ignore)
1307  return S_OK;
1308 
1309  icex.dwSize = sizeof(icex);
1310  icex.dwICC = ICC_LINK_CLASS;
1311 
1312  if (!InitCommonControlsEx(&icex))
1314 
1315  psp.dwSize = sizeof(psp);
1316  psp.dwFlags = PSP_USEREFPARENT | PSP_USETITLE;
1317  psp.hInstance = module;
1318  psp.pszTemplate = MAKEINTRESOURCE(IDD_PROP_SHEET);
1319  psp.hIcon = 0;
1320  psp.pszTitle = MAKEINTRESOURCE(IDS_PROP_SHEET_TITLE);
1321  psp.pfnDlgProc = (DLGPROC)PropSheetDlgProc;
1322  psp.pcRefParent = (UINT*)&objs_loaded;
1323  psp.pfnCallback = nullptr;
1324  psp.lParam = (LPARAM)this;
1325 
1326  hPage = CreatePropertySheetPage(&psp);
1327 
1328  if (hPage) {
1329  if (pfnAddPage(hPage, lParam)) {
1330  this->AddRef();
1331  return S_OK;
1332  } else
1333  DestroyPropertySheetPage(hPage);
1334  } else
1335  return E_OUTOFMEMORY;
1336  } catch (const exception& e) {
1337  error_message(nullptr, e.what());
1338  }
1339 
1340  return E_FAIL;
1341 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
HMODULE module
Definition: main.cpp:47
#define IDD_PROP_SHEET
Definition: resource.h:15
BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
Definition: propsheet.c:3144
#define IDS_INITCOMMONCONTROLSEX_FAILED
Definition: resource.h:205
#define E_FAIL
Definition: ddrawi.h:102
void error_message(HWND hwnd, const char *msg)
Definition: main.cpp:785
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define e
Definition: ke_i.h:82
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
LONG_PTR LPARAM
Definition: windef.h:208
#define CreatePropertySheetPage
Definition: prsht.h:399
#define PSP_USEREFPARENT
Definition: prsht.h:29
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
#define PSP_USETITLE
Definition: prsht.h:26
INT_PTR(CALLBACK * DLGPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2871
#define S_OK
Definition: intsafe.h:59
ULONG __stdcall AddRef()
Definition: propsheet.h:136
unsigned int UINT
Definition: ndis.h:50
LONG objs_loaded
Definition: main.cpp:48
LPARAM lParam
Definition: combotst.c:139
static INT_PTR CALLBACK PropSheetDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: propsheet.cpp:1085
#define ICC_LINK_CLASS
Definition: commctrl.h:74
#define PROPSHEETPAGE
Definition: prsht.h:389
#define IDS_PROP_SHEET_TITLE
Definition: resource.h:16

◆ AddRef()

ULONG __stdcall BtrfsPropSheet::AddRef ( void  )
inline

Implements IUnknown.

Definition at line 136 of file propsheet.h.

136  {
138  }
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by AddPages(), and QueryInterface().

◆ apply_changes()

void BtrfsPropSheet::apply_changes ( HWND  hDlg)

Definition at line 685 of file propsheet.cpp.

685  {
686  UINT num_files, i;
687  WCHAR fn[MAX_PATH]; // FIXME - is this long enough?
688 
689  if (various_uids)
690  uid_changed = false;
691 
692  if (various_gids)
693  gid_changed = false;
694 
696  return;
697 
698  if (filename[0] != 0)
700  else {
701  num_files = DragQueryFileW((HDROP)stgm.hGlobal, 0xFFFFFFFF, nullptr, 0);
702 
703  for (i = 0; i < num_files; i++) {
704  if (DragQueryFileW((HDROP)stgm.hGlobal, i, fn, sizeof(fn) / sizeof(MAX_PATH))) {
705  apply_changes_file(hDlg, fn);
706  }
707  }
708  }
709 
710  flags_changed = false;
711  perms_changed = false;
712  uid_changed = false;
713  gid_changed = false;
714  ro_changed = false;
715 }
bool uid_changed
Definition: propsheet.h:189
bool various_gids
Definition: propsheet.h:181
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
const char * filename
Definition: ioapi.h:135
void apply_changes_file(HWND hDlg, const wstring &fn)
Definition: propsheet.cpp:602
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 const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
bool various_uids
Definition: propsheet.h:181
bool compress_type_changed
Definition: propsheet.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180
bool perms_changed
Definition: propsheet.h:189
#define MAX_PATH
Definition: compat.h:26
bool gid_changed
Definition: propsheet.h:189
STGMEDIUM stgm
Definition: propsheet.h:187
bool flags_changed
Definition: propsheet.h:189
unsigned int UINT
Definition: ndis.h:50
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
Definition: shellole.c:627

Referenced by PropSheetDlgProc().

◆ apply_changes_file()

void BtrfsPropSheet::apply_changes_file ( HWND  hDlg,
const wstring &  fn 
)
private

Definition at line 602 of file propsheet.cpp.

602  {
603  win_handle h;
607  btrfs_inode_info bii2;
609 
610  if (flags_changed || ro_changed)
611  perms |= FILE_WRITE_ATTRIBUTES;
612 
614  perms |= WRITE_DAC;
615 
616  if (mode_set & S_ISUID && (((min_mode & S_ISUID) != (max_mode & S_ISUID)) || ((min_mode & S_ISUID) != (mode & S_ISUID))))
617  perms |= WRITE_OWNER;
618 
619  h = CreateFileW(fn.c_str(), perms, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, nullptr,
621 
622  if (h == INVALID_HANDLE_VALUE)
623  throw last_error(GetLastError());
624 
625  ZeroMemory(&bsii, sizeof(btrfs_set_inode_info));
626 
627  Status = NtFsControlFile(h, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_GET_INODE_INFO, nullptr, 0, &bii2, sizeof(btrfs_inode_info));
628 
629  if (!NT_SUCCESS(Status))
630  throw ntstatus_error(Status);
631 
632  if (bii2.inode == SUBVOL_ROOT_INODE && ro_changed) {
634  FILE_BASIC_INFO fbi;
635 
636  if (!GetFileInformationByHandle(h, &bhfi))
637  throw last_error(GetLastError());
638 
639  memset(&fbi, 0, sizeof(fbi));
640  fbi.FileAttributes = bhfi.dwFileAttributes;
641 
642  if (ro_subvol)
643  fbi.FileAttributes |= FILE_ATTRIBUTE_READONLY;
644  else
645  fbi.FileAttributes &= ~FILE_ATTRIBUTE_READONLY;
646 
647  Status = NtSetInformationFile(h, &iosb, &fbi, sizeof(FILE_BASIC_INFO), FileBasicInformation);
648  if (!NT_SUCCESS(Status))
649  throw ntstatus_error(Status);
650  }
651 
653  if (flags_changed) {
654  bsii.flags_changed = true;
655  bsii.flags = (bii2.flags & ~flags_set) | (flags & flags_set);
656  }
657 
658  if (perms_changed) {
659  bsii.mode_changed = true;
660  bsii.st_mode = (bii2.st_mode & ~mode_set) | (mode & mode_set);
661  }
662 
663  if (uid_changed) {
664  bsii.uid_changed = true;
665  bsii.st_uid = uid;
666  }
667 
668  if (gid_changed) {
669  bsii.gid_changed = true;
670  bsii.st_gid = gid;
671  }
672 
673  if (compress_type_changed) {
674  bsii.compression_type_changed = true;
676  }
677 
678  Status = NtFsControlFile(h, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_SET_INODE_INFO, &bsii, sizeof(btrfs_set_inode_info), nullptr, 0);
679 
680  if (!NT_SUCCESS(Status))
681  throw ntstatus_error(Status);
682  }
683 }
static PIO_STATUS_BLOCK iosb
Definition: file.c:98
bool uid_changed
Definition: propsheet.h:189
NTSTATUS NTAPI NtSetInformationFile(HANDLE hFile, PIO_STATUS_BLOCK io, PVOID ptr, ULONG len, FILE_INFORMATION_CLASS FileInformationClass)
uint8_t compression_type
Definition: btrfsioctl.h:97
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
#define SUBVOL_ROOT_INODE
Definition: propsheet.cpp:42
LONG NTSTATUS
Definition: precomp.h:26
#define INVALID_HANDLE_VALUE
Definition: compat.h:400
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define ZeroMemory
Definition: winbase.h:1648
NTSYSCALLAPI NTSTATUS NTAPI NtFsControlFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG FsControlCode, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength)
#define WRITE_OWNER
Definition: nt_native.h:60
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_WRITE_ATTRIBUTES
Definition: nt_native.h:649
uint32_t st_mode
Definition: btrfsioctl.h:75
#define FILE_SHARE_READ
Definition: compat.h:125
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define FILE_TRAVERSE
Definition: nt_native.h:643
uint32_t uid
Definition: propsheet.h:180
#define OPEN_EXISTING
Definition: compat.h:435
uint32_t mode_set
Definition: propsheet.h:176
bool compress_type_changed
Definition: propsheet.h:181
BOOL WINAPI GetFileInformationByHandle(HANDLE hFile, LPBY_HANDLE_FILE_INFORMATION lpFileInformation)
Definition: fileinfo.c:608
uint32_t min_mode
Definition: propsheet.h:176
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
bool perms_changed
Definition: propsheet.h:189
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
bool gid_changed
Definition: propsheet.h:189
#define WRITE_DAC
Definition: nt_native.h:59
uint64_t flags
Definition: btrfsioctl.h:77
GLbitfield flags
Definition: glext.h:7161
BOOL compression_type_changed
Definition: btrfsioctl.h:98
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
uint64_t inode
Definition: btrfsioctl.h:70
#define FSCTL_BTRFS_SET_INODE_INFO
Definition: btrfsioctl.h:11
GLenum mode
Definition: glext.h:6217
uint8_t compress_type
Definition: propsheet.h:179
Status
Definition: gdiplustypes.h:24
uint32_t gid
Definition: propsheet.h:180
bool flags_changed
Definition: propsheet.h:189
#define S_ISUID
Definition: propsheet.h:65
#define FSCTL_BTRFS_GET_INODE_INFO
Definition: btrfsioctl.h:10
#define CreateFileW
Definition: compat.h:409
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41
#define FILE_FLAG_OPEN_REPARSE_POINT
Definition: disk.h:39
unsigned int ULONG
Definition: retypes.h:1
uint32_t max_mode
Definition: propsheet.h:176
uint64_t flags_set
Definition: propsheet.h:177
#define memset(x, y, z)
Definition: compat.h:39

Referenced by apply_changes().

◆ change_gid()

void BtrfsPropSheet::change_gid ( HWND  hDlg,
uint32_t  gid 
)

Definition at line 784 of file propsheet.cpp.

784  {
785  if (this->gid != gid) {
786  this->gid = gid;
787  gid_changed = true;
788 
789  SendMessageW(GetParent(hDlg), PSM_CHANGED, (WPARAM)hDlg, 0);
790  }
791 }
UINT_PTR WPARAM
Definition: windef.h:207
bool gid_changed
Definition: propsheet.h:189
uint32_t gid
Definition: propsheet.h:180
HWND WINAPI GetParent(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define PSM_CHANGED
Definition: prsht.h:164

Referenced by PropSheetDlgProc().

◆ change_inode_flag()

void BtrfsPropSheet::change_inode_flag ( HWND  hDlg,
uint64_t  flag,
UINT  state 
)

Definition at line 583 of file propsheet.cpp.

583  {
586 
587  if (state == BST_CHECKED) {
588  flags |= flag;
589  flags_set |= flag;
590  } else if (state == BST_UNCHECKED) {
591  flags &= ~flag;
592  flags_set |= flag;
593  } else if (state == BST_INDETERMINATE) {
594  flags_set = ~flag;
595  }
596 
597  flags_changed = true;
598 
599  SendMessageW(GetParent(hDlg), PSM_CHANGED, (WPARAM)hDlg, 0);
600 }
#define BTRFS_INODE_NODATACOW
Definition: propsheet.h:77
UINT_PTR WPARAM
Definition: windef.h:207
#define BST_INDETERMINATE
Definition: winuser.h:198
#define BTRFS_INODE_NODATASUM
Definition: propsheet.h:76
GLbitfield flags
Definition: glext.h:7161
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 flag
Definition: glfuncs.h:52
static int state
Definition: maze.c:121
#define BST_UNCHECKED
Definition: winuser.h:199
HWND WINAPI GetParent(_In_ HWND)
bool flags_changed
Definition: propsheet.h:189
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define PSM_CHANGED
Definition: prsht.h:164
#define BST_CHECKED
Definition: winuser.h:197
uint64_t flags_set
Definition: propsheet.h:177

Referenced by PropSheetDlgProc().

◆ change_perm_flag()

void BtrfsPropSheet::change_perm_flag ( HWND  hDlg,
ULONG  perm,
UINT  state 
)

Definition at line 759 of file propsheet.cpp.

759  {
760  if (state == BST_CHECKED) {
761  mode |= flag;
762  mode_set |= flag;
763  } else if (state == BST_UNCHECKED) {
764  mode &= ~flag;
765  mode_set |= flag;
766  } else if (state == BST_INDETERMINATE) {
767  mode_set = ~flag;
768  }
769 
770  perms_changed = true;
771 
772  SendMessageW(GetParent(hDlg), PSM_CHANGED, (WPARAM)hDlg, 0);
773 }
UINT_PTR WPARAM
Definition: windef.h:207
#define BST_INDETERMINATE
Definition: winuser.h:198
uint32_t mode_set
Definition: propsheet.h:176
bool perms_changed
Definition: propsheet.h:189
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 flag
Definition: glfuncs.h:52
static int state
Definition: maze.c:121
GLenum mode
Definition: glext.h:6217
#define BST_UNCHECKED
Definition: winuser.h:199
HWND WINAPI GetParent(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define PSM_CHANGED
Definition: prsht.h:164
#define BST_CHECKED
Definition: winuser.h:197

Referenced by PropSheetDlgProc().

◆ change_uid()

void BtrfsPropSheet::change_uid ( HWND  hDlg,
uint32_t  uid 
)

Definition at line 775 of file propsheet.cpp.

775  {
776  if (this->uid != uid) {
777  this->uid = uid;
778  uid_changed = true;
779 
780  SendMessageW(GetParent(hDlg), PSM_CHANGED, (WPARAM)hDlg, 0);
781  }
782 }
bool uid_changed
Definition: propsheet.h:189
UINT_PTR WPARAM
Definition: windef.h:207
uint32_t uid
Definition: propsheet.h:180
HWND WINAPI GetParent(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define PSM_CHANGED
Definition: prsht.h:164

Referenced by PropSheetDlgProc().

◆ check_file()

HRESULT BtrfsPropSheet::check_file ( const wstring &  fn,
UINT  i,
UINT  num_files,
UINT sv 
)
private

Definition at line 172 of file propsheet.cpp.

172  {
173  win_handle h;
178  btrfs_inode_info bii2;
179 
182 
183  if (h == INVALID_HANDLE_VALUE)
184  return E_FAIL;
185 
187  if (!NT_SUCCESS(Status))
188  return E_FAIL;
189 
192 
194 
195  if (!readonly && num_files == 1 && !can_change_perms)
196  show_admin_button = true;
197 
200 
201  memset(&bii2, 0, sizeof(bii2));
202 
203  Status = NtFsControlFile(h, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_GET_INODE_INFO, nullptr, 0, &bii2, sizeof(btrfs_inode_info));
204 
205  if (NT_SUCCESS(Status) && !bii2.top) {
206  LARGE_INTEGER filesize;
207 
208  if (i == 0) {
209  subvol = bii2.subvol;
210  inode = bii2.inode;
211  type = bii2.type;
212  uid = bii2.st_uid;
213  gid = bii2.st_gid;
214  rdev = bii2.st_rdev;
215  } else {
216  if (subvol != bii2.subvol)
217  various_subvols = true;
218 
219  if (inode != bii2.inode)
220  various_inodes = true;
221 
222  if (type != bii2.type)
223  various_types = true;
224 
225  if (uid != bii2.st_uid)
226  various_uids = true;
227 
228  if (gid != bii2.st_gid)
229  various_gids = true;
230  }
231 
232  if (bii2.inline_length > 0) {
233  totalsize += bii2.inline_length;
234  sizes[0] += bii2.inline_length;
235  }
236 
237  if (bii2.disk_size_uncompressed > 0) {
239  sizes[1] += bii2.disk_size_uncompressed;
240  }
241 
242  if (bii2.disk_size_zlib > 0) {
243  totalsize += bii2.disk_size_zlib;
244  sizes[2] += bii2.disk_size_zlib;
245  }
246 
247  if (bii2.disk_size_lzo > 0) {
248  totalsize += bii2.disk_size_lzo;
249  sizes[3] += bii2.disk_size_lzo;
250  }
251 
252  if (bii2.disk_size_zstd > 0) {
253  totalsize += bii2.disk_size_zstd;
254  sizes[4] += bii2.disk_size_zstd;
255  }
256 
257  sparsesize += bii2.sparse_size;
258  num_extents += bii2.num_extents == 0 ? 0 : (bii2.num_extents - 1);
259 
261 
263 
264  if (!NT_SUCCESS(Status))
265  throw ntstatus_error(Status);
266 
267  if (bii2.inline_length > 0)
269  else
271 
272  min_mode |= ~bii2.st_mode;
273  max_mode |= bii2.st_mode;
274  min_flags |= ~bii2.flags;
275  max_flags |= bii2.flags;
278 
279  if (bii2.inode == SUBVOL_ROOT_INODE) {
280  bool ro = bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY;
281 
282  has_subvols = true;
283 
284  if (*sv == 0)
285  ro_subvol = ro;
286  else {
287  if (ro_subvol != ro)
288  various_ro = true;
289  }
290 
291  (*sv)++;
292  }
293 
294  ignore = false;
295 
296  if (bii2.type != BTRFS_TYPE_DIRECTORY && GetFileSizeEx(h, &filesize)) {
297  if (filesize.QuadPart != 0)
298  can_change_nocow = false;
299  }
300 
301  {
303 
305 
306  if (NT_SUCCESS(Status))
308 
309  if (sector_size == 0)
310  sector_size = 4096;
311  }
312  } else
313  return E_FAIL;
314 
315  return S_OK;
316 }
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
uint64_t subvol
Definition: propsheet.h:178
static PIO_STATUS_BLOCK iosb
Definition: file.c:98
#define FileAccessInformation
Definition: propsheet.cpp:51
uint64_t disk_size_lzo
Definition: btrfsioctl.h:81
bool various_inodes
Definition: propsheet.h:181
void push_back(const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _deque.h:668
bool various_gids
Definition: propsheet.h:181
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
uint8_t max_compression_type
Definition: propsheet.h:179
#define SUBVOL_ROOT_INODE
Definition: propsheet.cpp:42
LONG NTSTATUS
Definition: precomp.h:26
uint32_t st_uid
Definition: btrfsioctl.h:73
uint64_t max_flags
Definition: propsheet.h:177
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define INVALID_HANDLE_VALUE
Definition: compat.h:400
NTSYSCALLAPI NTSTATUS NTAPI NtFsControlFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG FsControlCode, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength)
uint32_t num_extents
Definition: btrfsioctl.h:85
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define E_FAIL
Definition: ddrawi.h:102
uint64_t disk_size_zstd
Definition: btrfsioctl.h:83
#define FILE_WRITE_ATTRIBUTES
Definition: nt_native.h:649
uint32_t st_mode
Definition: btrfsioctl.h:75
#define FILE_SHARE_READ
Definition: compat.h:125
uint64_t totalsize
Definition: propsheet.h:190
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
uint64_t allocsize
Definition: propsheet.h:190
Definition: fs.h:78
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 const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
uint32_t inline_length
Definition: btrfsioctl.h:78
uint32_t st_gid
Definition: btrfsioctl.h:74
uint8_t min_compression_type
Definition: propsheet.h:179
bool has_subvols
Definition: propsheet.h:181
uint64_t min_flags
Definition: propsheet.h:177
#define BTRFS_TYPE_DIRECTORY
Definition: shellext.h:86
uint64_t num_extents
Definition: propsheet.h:190
uint32_t sector_size
Definition: propsheet.h:193
uint64_t st_rdev
Definition: btrfsioctl.h:76
bool various_subvols
Definition: propsheet.h:181
uint32_t uid
Definition: propsheet.h:180
bool various_uids
Definition: propsheet.h:181
#define OPEN_EXISTING
Definition: compat.h:435
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
BOOL WINAPI GetFileInformationByHandle(HANDLE hFile, LPBY_HANDLE_FILE_INFORMATION lpFileInformation)
Definition: fileinfo.c:608
uint32_t min_mode
Definition: propsheet.h:176
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define WRITE_DAC
Definition: nt_native.h:59
uint64_t disk_size_zlib
Definition: btrfsioctl.h:80
uint64_t flags
Definition: btrfsioctl.h:77
deque< wstring > search_list
Definition: propsheet.h:191
LARGE_INTEGER AllocationSize
Definition: propsheet.cpp:54
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
uint64_t sparsesize
Definition: propsheet.h:190
#define GetFileSizeEx
Definition: compat.h:423
bool can_change_perms
Definition: propsheet.h:172
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
uint64_t inode
Definition: btrfsioctl.h:70
NTSTATUS NTAPI NtQueryInformationFile(HANDLE hFile, PIO_STATUS_BLOCK io, PVOID ptr, ULONG len, FILE_INFORMATION_CLASS FileInformationClass)
Status
Definition: gdiplustypes.h:24
uint32_t gid
Definition: propsheet.h:180
#define S_OK
Definition: intsafe.h:59
NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FsInformation, ULONG Length, FS_INFORMATION_CLASS FsInformationClass)
#define FSCTL_BTRFS_GET_INODE_INFO
Definition: btrfsioctl.h:10
uint64_t sizes[5]
Definition: propsheet.h:190
bool various_types
Definition: propsheet.h:181
#define FileStandardInformation
Definition: propsheet.cpp:61
#define CreateFileW
Definition: compat.h:409
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41
#define FILE_FLAG_OPEN_REPARSE_POINT
Definition: disk.h:39
uint8_t compression_type
Definition: btrfsioctl.h:82
bool show_admin_button
Definition: propsheet.h:181
uint32_t max_mode
Definition: propsheet.h:176
uint64_t rdev
Definition: propsheet.h:178
uint64_t sparse_size
Definition: btrfsioctl.h:84
#define memset(x, y, z)
Definition: compat.h:39
uint64_t disk_size_uncompressed
Definition: btrfsioctl.h:79
uint64_t subvol
Definition: btrfsioctl.h:69
bool can_change_nocow
Definition: propsheet.h:173
LONGLONG QuadPart
Definition: typedefs.h:113

Referenced by load_file_list().

◆ do_search()

void BtrfsPropSheet::do_search ( const wstring &  fn)

Definition at line 88 of file propsheet.cpp.

88  {
89  wstring ss;
90  WIN32_FIND_DATAW ffd;
91 
92 #ifndef __REACTOS__
93  ss = fn + L"\\*"s;
94 #else
95  ss = fn + wstring(L"\\*");
96 #endif
97 
98  fff_handle h = FindFirstFileW(ss.c_str(), &ffd);
99  if (h == INVALID_HANDLE_VALUE)
100  return;
101 
102  do {
103  if (ffd.cFileName[0] != '.' || ((ffd.cFileName[1] != 0) && (ffd.cFileName[1] != '.' || ffd.cFileName[2] != 0))) {
104  wstring fn2;
105 
106 #ifndef __REACTOS__
107  fn2 = fn + L"\\"s + ffd.cFileName;
108 #else
109  fn2 = fn + wstring(L"\\") + ffd.cFileName;
110 #endif
111 
112  if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
113  search_list.push_back(fn2);
114  else {
117 
118  if (fh != INVALID_HANDLE_VALUE) {
121  btrfs_inode_info bii2;
122 
123  memset(&bii2, 0, sizeof(bii2));
124 
125  Status = NtFsControlFile(fh, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_GET_INODE_INFO, nullptr, 0, &bii2, sizeof(btrfs_inode_info));
126 
127  if (NT_SUCCESS(Status)) {
128  sizes[0] += bii2.inline_length;
129  sizes[1] += bii2.disk_size_uncompressed;
130  sizes[2] += bii2.disk_size_zlib;
131  sizes[3] += bii2.disk_size_lzo;
132  sizes[4] += bii2.disk_size_zstd;
134  sparsesize += bii2.sparse_size;
135  num_extents += bii2.num_extents == 0 ? 0 : (bii2.num_extents - 1);
136  }
137 
139 
140  Status = NtQueryInformationFile(fh, &iosb, &fsi, sizeof(fsi), FileStandardInformation);
141 
142  if (NT_SUCCESS(Status)) {
143  if (bii2.inline_length > 0)
145  else
147  }
148  }
149  }
150  }
151  } while (FindNextFileW(h, &ffd));
152 }
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
static PIO_STATUS_BLOCK iosb
Definition: file.c:98
uint64_t disk_size_lzo
Definition: btrfsioctl.h:81
void push_back(const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _deque.h:668
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
LONG NTSTATUS
Definition: precomp.h:26
#define INVALID_HANDLE_VALUE
Definition: compat.h:400
NTSYSCALLAPI NTSTATUS NTAPI NtFsControlFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG FsControlCode, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength)
uint32_t num_extents
Definition: btrfsioctl.h:85
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
uint64_t disk_size_zstd
Definition: btrfsioctl.h:83
#define FILE_SHARE_READ
Definition: compat.h:125
uint64_t totalsize
Definition: propsheet.h:190
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
uint64_t allocsize
Definition: propsheet.h:190
#define FILE_TRAVERSE
Definition: nt_native.h:643
uint32_t inline_length
Definition: btrfsioctl.h:78
uint64_t num_extents
Definition: propsheet.h:190
#define OPEN_EXISTING
Definition: compat.h:435
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
uint64_t disk_size_zlib
Definition: btrfsioctl.h:80
deque< wstring > search_list
Definition: propsheet.h:191
LARGE_INTEGER AllocationSize
Definition: propsheet.cpp:54
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
uint64_t sparsesize
Definition: propsheet.h:190
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
static const WCHAR L[]
Definition: oid.c:1250
GLdouble s
Definition: gl.h:2039
NTSTATUS NTAPI NtQueryInformationFile(HANDLE hFile, PIO_STATUS_BLOCK io, PVOID ptr, ULONG len, FILE_INFORMATION_CLASS FileInformationClass)
Status
Definition: gdiplustypes.h:24
#define FSCTL_BTRFS_GET_INODE_INFO
Definition: btrfsioctl.h:10
uint64_t sizes[5]
Definition: propsheet.h:190
#define FileStandardInformation
Definition: propsheet.cpp:61
#define CreateFileW
Definition: compat.h:409
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41
#define FILE_FLAG_OPEN_REPARSE_POINT
Definition: disk.h:39
uint64_t sparse_size
Definition: btrfsioctl.h:84
#define ss
Definition: i386-dis.c:432
#define memset(x, y, z)
Definition: compat.h:39
uint64_t disk_size_uncompressed
Definition: btrfsioctl.h:79
LONGLONG QuadPart
Definition: typedefs.h:113
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320

Referenced by search_list_thread().

◆ init_propsheet()

void BtrfsPropSheet::init_propsheet ( HWND  hwndDlg)

Definition at line 919 of file propsheet.cpp.

919  {
920  wstring s;
921  ULONG sr;
922  int i;
923  HWND comptype;
924 
929 
930  if (various_subvols) {
932  throw last_error(GetLastError());
933  } else
934  wstring_sprintf(s, L"%llx", subvol);
935 
936  SetDlgItemTextW(hwndDlg, IDC_SUBVOL, s.c_str());
937 
938  if (various_inodes) {
940  throw last_error(GetLastError());
941  } else
942  wstring_sprintf(s, L"%llx", inode);
943 
944  SetDlgItemTextW(hwndDlg, IDC_INODE, s.c_str());
945 
946  if (various_types)
947  sr = IDS_VARIOUS;
948  else
950 
951  if (various_inodes) {
952  if (sr == IDS_INODE_CHAR)
954  else if (sr == IDS_INODE_BLOCK)
956  }
957 
958  if (sr == IDS_INODE_UNKNOWN) {
959  wstring t;
960 
961  if (!load_string(module, sr, t))
962  throw last_error(GetLastError());
963 
964  wstring_sprintf(s, t, type);
965  } else if (sr == IDS_INODE_CHAR || sr == IDS_INODE_BLOCK) {
966  wstring t;
967 
968  if (!load_string(module, sr, t))
969  throw last_error(GetLastError());
970 
972  } else {
973  if (!load_string(module, sr, s))
974  throw last_error(GetLastError());
975  }
976 
977  SetDlgItemTextW(hwndDlg, IDC_TYPE, s.c_str());
978 
979  if (size_format[0] == 0)
980  GetDlgItemTextW(hwndDlg, IDC_SIZE_ON_DISK, size_format, sizeof(size_format) / sizeof(WCHAR));
981 
982  if (cr_format[0] == 0)
983  GetDlgItemTextW(hwndDlg, IDC_COMPRESSION_RATIO, cr_format, sizeof(cr_format) / sizeof(WCHAR));
984 
985  if (frag_format[0] == 0)
986  GetDlgItemTextW(hwndDlg, IDC_FRAGMENTATION, frag_format, sizeof(frag_format) / sizeof(WCHAR));
987 
988  set_size_on_disk(hwndDlg);
989 
990  if (thread)
991  SetTimer(hwndDlg, 1, 250, nullptr);
992 
995 
996  comptype = GetDlgItem(hwndDlg, IDC_COMPRESS_TYPE);
997 
998  while (SendMessage(comptype, CB_GETCOUNT, 0, 0) > 0) {
999  SendMessage(comptype, CB_DELETESTRING, 0, 0);
1000  }
1001 
1003  SendMessage(comptype, CB_ADDSTRING, 0, (LPARAM)L"");
1004  SendMessage(comptype, CB_SETCURSEL, 0, 0);
1005  }
1006 
1007  i = 0;
1008  while (comp_types[i] != 0) {
1009  wstring t;
1010 
1011  if (!load_string(module, comp_types[i], t))
1012  throw last_error(GetLastError());
1013 
1014  SendMessage(comptype, CB_ADDSTRING, 0, (LPARAM)t.c_str());
1015 
1016  i++;
1017  }
1018 
1022  }
1023 
1025 
1026  i = 0;
1027  while (perm_controls[i] != 0) {
1028  set_check_box(hwndDlg, perm_controls[i], min_mode & perms[i], max_mode & perms[i]);
1029  i++;
1030  }
1031 
1032  if (various_uids) {
1033  if (!load_string(module, IDS_VARIOUS, s))
1034  throw last_error(GetLastError());
1035 
1036  EnableWindow(GetDlgItem(hwndDlg, IDC_UID), 0);
1037  } else
1038  s = to_wstring(uid);
1039 
1040  SetDlgItemTextW(hwndDlg, IDC_UID, s.c_str());
1041 
1042  if (various_gids) {
1043  if (!load_string(module, IDS_VARIOUS, s))
1044  throw last_error(GetLastError());
1045 
1046  EnableWindow(GetDlgItem(hwndDlg, IDC_GID), 0);
1047  } else
1048  s = to_wstring(gid);
1049 
1050  SetDlgItemTextW(hwndDlg, IDC_GID, s.c_str());
1051 
1053 
1054  if (has_subvols)
1056 
1057  if (!can_change_nocow)
1058  EnableWindow(GetDlgItem(hwndDlg, IDC_NODATACOW), 0);
1059 
1060  if (!can_change_perms) {
1061  i = 0;
1062  while (perm_controls[i] != 0) {
1063  EnableWindow(GetDlgItem(hwndDlg, perm_controls[i]), 0);
1064  i++;
1065  }
1066 
1067  EnableWindow(GetDlgItem(hwndDlg, IDC_UID), 0);
1068  EnableWindow(GetDlgItem(hwndDlg, IDC_GID), 0);
1069  EnableWindow(GetDlgItem(hwndDlg, IDC_SETUID), 0);
1070  }
1071 
1072  if (readonly) {
1073  EnableWindow(GetDlgItem(hwndDlg, IDC_NODATACOW), 0);
1074  EnableWindow(GetDlgItem(hwndDlg, IDC_COMPRESS), 0);
1076  }
1077 
1078  if (show_admin_button) {
1079  SendMessageW(GetDlgItem(hwndDlg, IDC_OPEN_ADMIN), BCM_SETSHIELD, 0, true);
1081  } else
1083 }
#define IDS_INODE_UNKNOWN
Definition: resource.h:27
#define IDC_USERW
Definition: resource.h:214
uint64_t subvol
Definition: propsheet.h:178
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2271
#define IDC_GROUPR
Definition: resource.h:212
WCHAR frag_format[255]
Definition: propsheet.h:174
#define BTRFS_INODE_NODATACOW
Definition: propsheet.h:77
#define S_ISGID
Definition: propsheet.h:69
#define IDC_UID
Definition: resource.h:209
bool various_inodes
Definition: propsheet.h:181
bool various_gids
Definition: propsheet.h:181
uint8_t max_compression_type
Definition: propsheet.h:179
#define SW_HIDE
Definition: winuser.h:762
#define IDC_USERR
Definition: resource.h:211
#define IDC_FRAGMENTATION
Definition: resource.h:242
uint64_t max_flags
Definition: propsheet.h:177
GLdouble GLdouble t
Definition: gl.h:2047
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define IDC_TYPE
Definition: resource.h:223
#define BCM_SETSHIELD
Definition: commctrl.h:4649
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define IDC_SUBVOL_RO
Definition: resource.h:320
#define IDC_USERX
Definition: resource.h:217
WCHAR size_format[255]
Definition: propsheet.h:174
#define IDS_INODE_BLOCK_SIMPLE
Definition: resource.h:40
#define IDC_COMPRESS
Definition: resource.h:224
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
Definition: fs.h:78
#define IDC_GID
Definition: resource.h:210
#define IDS_INODE_CHAR_SIMPLE
Definition: resource.h:39
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 const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
uint8_t min_compression_type
Definition: propsheet.h:179
bool has_subvols
Definition: propsheet.h:181
#define BTRFS_INODE_COMPRESS
Definition: propsheet.h:87
#define S_IRGRP
Definition: propsheet.h:41
#define S_IXOTH
Definition: propsheet.h:61
#define IDC_NODATACOW
Definition: resource.h:220
uint64_t min_flags
Definition: propsheet.h:177
#define CB_ADDSTRING
Definition: winuser.h:1918
LONG_PTR LPARAM
Definition: windef.h:208
#define IDS_INODE_BLOCK
Definition: resource.h:23
#define IDS_VARIOUS
Definition: resource.h:38
#define SW_SHOW
Definition: winuser.h:769
bool various_subvols
Definition: propsheet.h:181
uint32_t uid
Definition: propsheet.h:180
bool various_uids
Definition: propsheet.h:181
#define IDC_COMPRESS_TYPE
Definition: resource.h:318
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define IDC_GROUPX
Definition: resource.h:218
void wstring_sprintf(wstring &s, wstring fmt,...)
Definition: main.cpp:225
#define S_IWGRP
Definition: propsheet.h:45
#define S_IXGRP
Definition: propsheet.h:49
#define IDC_OTHERW
Definition: resource.h:216
#define S_IWUSR
Definition: propsheet.h:33
void set_size_on_disk(HWND hwndDlg)
Definition: propsheet.cpp:717
uint32_t min_mode
Definition: propsheet.h:176
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
static void set_check_box(HWND hwndDlg, ULONG id, uint64_t min, uint64_t max)
Definition: propsheet.cpp:854
#define IDS_COMPRESS_ZSTD
Definition: resource.h:200
HANDLE thread
Definition: propsheet.h:175
#define IDC_GROUPW
Definition: resource.h:215
WCHAR cr_format[255]
Definition: propsheet.h:174
bool can_change_perms
Definition: propsheet.h:172
#define S_IXUSR
Definition: propsheet.h:37
#define IDC_STICKY
Definition: resource.h:234
static const WCHAR L[]
Definition: oid.c:1250
#define S_IROTH
Definition: propsheet.h:53
#define IDC_OPEN_ADMIN
Definition: resource.h:276
#define IDC_COMPRESSION_RATIO
Definition: resource.h:240
GLdouble s
Definition: gl.h:2039
#define CB_SETCURSEL
Definition: winuser.h:1943
uint8_t compress_type
Definition: propsheet.h:179
#define S_IWOTH
Definition: propsheet.h:57
uint32_t gid
Definition: propsheet.h:180
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define IDC_SETUID
Definition: resource.h:228
#define IDC_SIZE_ON_DISK
Definition: resource.h:225
#define IDC_SETGID
Definition: resource.h:231
#define S_ISUID
Definition: propsheet.h:65
#define major(rdev)
Definition: propsheet.cpp:916
#define IDC_SUBVOL
Definition: resource.h:221
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDS_COMPRESS_ANY
Definition: resource.h:124
#define S_IRUSR
Definition: propsheet.h:29
bool various_types
Definition: propsheet.h:181
static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars)
Definition: muireg.c:10
#define IDC_OTHERR
Definition: resource.h:213
static ULONG inode_type_to_string_ref(uint8_t type)
Definition: propsheet.cpp:555
#define SendMessage
Definition: winuser.h:5818
#define IDC_INODE
Definition: resource.h:222
bool show_admin_button
Definition: propsheet.h:181
unsigned int ULONG
Definition: retypes.h:1
#define minor(rdev)
Definition: propsheet.cpp:917
#define IDS_INODE_CHAR
Definition: resource.h:22
#define CB_GETCOUNT
Definition: winuser.h:1924
#define IDS_COMPRESS_ZLIB
Definition: resource.h:125
uint32_t max_mode
Definition: propsheet.h:176
uint64_t rdev
Definition: propsheet.h:178
#define CB_DELETESTRING
Definition: winuser.h:1919
#define IDC_OTHERX
Definition: resource.h:219
bool can_change_nocow
Definition: propsheet.h:173
#define IDS_COMPRESS_LZO
Definition: resource.h:126
#define S_ISVTX
Definition: propsheet.h:73

Referenced by open_as_admin().

◆ Initialize()

HRESULT __stdcall BtrfsPropSheet::Initialize ( PCIDLIST_ABSOLUTE  pidlFolder,
IDataObject pdtobj,
HKEY  hkeyProgID 
)
virtual

Implements IShellExtInit.

Definition at line 361 of file propsheet.cpp.

361  {
362  try {
363  FORMATETC format = { CF_HDROP, nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
364  HDROP hdrop;
365  HRESULT hr;
366 
367  if (pidlFolder)
368  return E_FAIL;
369 
370  if (!pdtobj)
371  return E_FAIL;
372 
373  stgm.tymed = TYMED_HGLOBAL;
374 
375  if (FAILED(pdtobj->GetData(&format, &stgm)))
376  return E_INVALIDARG;
377 
378  stgm_set = true;
379 
380  hdrop = (HDROP)GlobalLock(stgm.hGlobal);
381 
382  if (!hdrop) {
384  stgm_set = false;
385  return E_INVALIDARG;
386  }
387 
388  try {
389  hr = load_file_list();
390  if (FAILED(hr))
391  return hr;
392 
393  if (search_list.size() > 0) {
394  thread = CreateThread(nullptr, 0, global_search_list_thread, this, 0, nullptr);
395 
396  if (!thread)
397  throw last_error(GetLastError());
398  }
399  } catch (...) {
400  GlobalUnlock(hdrop);
401  throw;
402  }
403 
404  GlobalUnlock(hdrop);
405  } catch (const exception& e) {
406  error_message(nullptr, e.what());
407 
408  return E_FAIL;
409  }
410 
411  return S_OK;
412 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
HRESULT load_file_list()
Definition: propsheet.cpp:318
HRESULT GetData([in, unique] FORMATETC *pformatetcIn, [out] STGMEDIUM *pmedium)
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define E_FAIL
Definition: ddrawi.h:102
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
void error_message(HWND hwnd, const char *msg)
Definition: main.cpp:785
#define e
Definition: ke_i.h:82
#define E_INVALIDARG
Definition: ddrawi.h:101
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:136
#define CF_HDROP
Definition: constants.h:410
LONG HRESULT
Definition: typedefs.h:78
deque< wstring > search_list
Definition: propsheet.h:191
HANDLE thread
Definition: propsheet.h:175
static DWORD WINAPI global_search_list_thread(LPVOID lpParameter)
Definition: propsheet.cpp:166
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
STGMEDIUM stgm
Definition: propsheet.h:187
#define S_OK
Definition: intsafe.h:59
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
size_type size() const
Definition: _deque.h:471

◆ load_file_list()

HRESULT BtrfsPropSheet::load_file_list ( )
private

Definition at line 318 of file propsheet.cpp.

318  {
319  UINT num_files, i, sv = 0;
320  WCHAR fn[MAX_PATH];
321 
322  num_files = DragQueryFileW((HDROP)stgm.hGlobal, 0xFFFFFFFF, nullptr, 0);
323 
324  min_mode = 0;
325  max_mode = 0;
326  min_flags = 0;
327  max_flags = 0;
328  min_compression_type = 0xff;
331 
332  can_change_perms = true;
333  can_change_nocow = true;
334 
335  sizes[0] = sizes[1] = sizes[2] = sizes[3] = sizes[4] = 0;
337 
338  for (i = 0; i < num_files; i++) {
339  if (DragQueryFileW((HDROP)stgm.hGlobal, i, fn, sizeof(fn) / sizeof(MAX_PATH))) {
340  HRESULT hr;
341 
342  hr = check_file(fn, i, num_files, &sv);
343  if (FAILED(hr))
344  return hr;
345  } else
346  return E_FAIL;
347  }
348 
349  min_mode = ~min_mode;
350  min_flags = ~min_flags;
351 
352  mode = min_mode;
353  mode_set = ~(min_mode ^ max_mode);
354 
355  flags = min_flags;
357 
358  return S_OK;
359 }
HRESULT hr
Definition: shlfolder.c:183
bool various_inodes
Definition: propsheet.h:181
bool various_gids
Definition: propsheet.h:181
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
uint8_t max_compression_type
Definition: propsheet.h:179
uint64_t max_flags
Definition: propsheet.h:177
#define E_FAIL
Definition: ddrawi.h:102
uint64_t totalsize
Definition: propsheet.h:190
uint64_t allocsize
Definition: propsheet.h:190
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 const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
uint8_t min_compression_type
Definition: propsheet.h:179
uint64_t min_flags
Definition: propsheet.h:177
bool various_subvols
Definition: propsheet.h:181
bool various_uids
Definition: propsheet.h:181
uint32_t mode_set
Definition: propsheet.h:176
uint32_t min_mode
Definition: propsheet.h:176
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
#define MAX_PATH
Definition: compat.h:26
GLbitfield flags
Definition: glext.h:7161
uint64_t sparsesize
Definition: propsheet.h:190
bool can_change_perms
Definition: propsheet.h:172
GLenum mode
Definition: glext.h:6217
STGMEDIUM stgm
Definition: propsheet.h:187
#define S_OK
Definition: intsafe.h:59
uint64_t sizes[5]
Definition: propsheet.h:190
unsigned int UINT
Definition: ndis.h:50
bool various_types
Definition: propsheet.h:181
uint32_t max_mode
Definition: propsheet.h:176
uint64_t flags_set
Definition: propsheet.h:177
HRESULT check_file(const wstring &fn, UINT i, UINT num_files, UINT *sv)
Definition: propsheet.cpp:172
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
Definition: shellole.c:627
bool can_change_nocow
Definition: propsheet.h:173

Referenced by Initialize(), and open_as_admin().

◆ open_as_admin()

void BtrfsPropSheet::open_as_admin ( HWND  hwndDlg)

Definition at line 871 of file propsheet.cpp.

871  {
872  ULONG num_files, i;
873  WCHAR fn[MAX_PATH], modfn[MAX_PATH];
874 
875  num_files = DragQueryFileW((HDROP)stgm.hGlobal, 0xFFFFFFFF, nullptr, 0);
876 
877  if (num_files == 0)
878  return;
879 
880  GetModuleFileNameW(module, modfn, sizeof(modfn) / sizeof(WCHAR));
881 
882  for (i = 0; i < num_files; i++) {
883  if (DragQueryFileW((HDROP)stgm.hGlobal, i, fn, sizeof(fn) / sizeof(MAX_PATH))) {
884  wstring t;
885  SHELLEXECUTEINFOW sei;
886 
887 #ifndef __REACTOS__
888  t = L"\""s + modfn + L"\",ShowPropSheet "s + fn;
889 #else
890  t = wstring(L"\"") + modfn + wstring(L"\",ShowPropSheet ") + fn;
891 #endif
892 
893  RtlZeroMemory(&sei, sizeof(sei));
894 
895  sei.cbSize = sizeof(sei);
896  sei.hwnd = hwndDlg;
897  sei.lpVerb = L"runas";
898  sei.lpFile = L"rundll32.exe";
899  sei.lpParameters = t.c_str();
900  sei.nShow = SW_SHOW;
902 
903  if (!ShellExecuteExW(&sei))
904  throw last_error(GetLastError());
905 
907  CloseHandle(sei.hProcess);
908 
909  load_file_list();
910  init_propsheet(hwndDlg);
911  }
912  }
913 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
#define CloseHandle
Definition: compat.h:407
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
#define SEE_MASK_NOCLOSEPROCESS
Definition: shellapi.h:31
HRESULT load_file_list()
Definition: propsheet.cpp:318
GLdouble GLdouble t
Definition: gl.h:2047
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
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 const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2263
#define SW_SHOW
Definition: winuser.h:769
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
static const WCHAR L[]
Definition: oid.c:1250
GLdouble s
Definition: gl.h:2039
STGMEDIUM stgm
Definition: propsheet.h:187
LPCWSTR lpParameters
Definition: shellapi.h:331
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
void init_propsheet(HWND hwndDlg)
Definition: propsheet.cpp:919
#define INFINITE
Definition: serial.h:102
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
Definition: shellole.c:627

Referenced by PropSheetDlgProc().

◆ QueryInterface()

HRESULT __stdcall BtrfsPropSheet::QueryInterface ( REFIID  riid,
void **  ppObj 
)

Implements IUnknown.

Definition at line 73 of file propsheet.cpp.

73  {
74  if (riid == IID_IUnknown || riid == IID_IShellPropSheetExt) {
75  *ppObj = static_cast<IShellPropSheetExt*>(this);
76  AddRef();
77  return S_OK;
78  } else if (riid == IID_IShellExtInit) {
79  *ppObj = static_cast<IShellExtInit*>(this);
80  AddRef();
81  return S_OK;
82  }
83 
84  *ppObj = nullptr;
85  return E_NOINTERFACE;
86 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
ULONG __stdcall AddRef()
Definition: propsheet.h:136

Referenced by Factory::CreateInstance().

◆ Release()

ULONG __stdcall BtrfsPropSheet::Release ( void  )
inline

Implements IUnknown.

Definition at line 140 of file propsheet.h.

140  {
142 
143  if (rc == 0)
144  delete this;
145 
146  return rc;
147  }
long LONG
Definition: pedump.c:60
#define InterlockedDecrement
Definition: armddk.h:52

◆ ReplacePage()

HRESULT __stdcall BtrfsPropSheet::ReplacePage ( UINT  uPageID,
LPFNADDPROPSHEETPAGE  pfnReplacePage,
LPARAM  lParam 
)
virtual

Definition at line 1343 of file propsheet.cpp.

1343  {
1344  return S_OK;
1345 }
#define S_OK
Definition: intsafe.h:59

◆ search_list_thread()

DWORD BtrfsPropSheet::search_list_thread ( )

Definition at line 154 of file propsheet.cpp.

154  {
155  while (!search_list.empty()) {
157 
159  }
160 
161  thread = nullptr;
162 
163  return 0;
164 }
void pop_front()
Definition: _deque.h:722
reference front()
Definition: _deque.h:458
void do_search(const wstring &fn)
Definition: propsheet.cpp:88
bool empty() const
Definition: _deque.h:473
deque< wstring > search_list
Definition: propsheet.h:191
HANDLE thread
Definition: propsheet.h:175

Referenced by global_search_list_thread().

◆ set_cmdline()

void BtrfsPropSheet::set_cmdline ( const wstring &  cmdline)

Definition at line 414 of file propsheet.cpp.

414  {
415  win_handle h;
418  UINT sv = 0;
420  btrfs_inode_info bii2;
422 
423  min_mode = 0;
424  max_mode = 0;
425  min_flags = 0;
426  max_flags = 0;
427  min_compression_type = 0xff;
430 
431  can_change_perms = true;
432  can_change_nocow = true;
433 
436 
437  if (h == INVALID_HANDLE_VALUE)
438  return;
439 
441  if (!NT_SUCCESS(Status))
442  return;
443 
446 
448 
451 
452  memset(&bii2, 0, sizeof(bii2));
453 
454  Status = NtFsControlFile(h, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_GET_INODE_INFO, nullptr, 0, &bii2, sizeof(btrfs_inode_info));
455 
456  if (NT_SUCCESS(Status) && !bii2.top) {
457  LARGE_INTEGER filesize;
458 
459  subvol = bii2.subvol;
460  inode = bii2.inode;
461  type = bii2.type;
462  uid = bii2.st_uid;
463  gid = bii2.st_gid;
464  rdev = bii2.st_rdev;
465 
466  if (bii2.inline_length > 0) {
467  totalsize += bii2.inline_length;
468  sizes[0] += bii2.inline_length;
469  }
470 
471  if (bii2.disk_size_uncompressed > 0) {
473  sizes[1] += bii2.disk_size_uncompressed;
474  }
475 
476  if (bii2.disk_size_zlib > 0) {
477  totalsize += bii2.disk_size_zlib;
478  sizes[2] += bii2.disk_size_zlib;
479  }
480 
481  if (bii2.disk_size_lzo > 0) {
482  totalsize += bii2.disk_size_lzo;
483  sizes[3] += bii2.disk_size_lzo;
484  }
485 
486  if (bii2.disk_size_zstd > 0) {
487  totalsize += bii2.disk_size_zstd;
488  sizes[4] += bii2.disk_size_zstd;
489  }
490 
491  sparsesize += bii2.sparse_size;
492 
494 
496 
497  if (!NT_SUCCESS(Status))
498  throw ntstatus_error(Status);
499 
500  if (bii2.inline_length > 0)
502  else
504 
505  min_mode |= ~bii2.st_mode;
506  max_mode |= bii2.st_mode;
507  min_flags |= ~bii2.flags;
508  max_flags |= bii2.flags;
511 
512  if (bii2.inode == SUBVOL_ROOT_INODE) {
513  bool ro = bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY;
514 
515  has_subvols = true;
516 
517  if (sv == 0)
518  ro_subvol = ro;
519  else {
520  if (ro_subvol != ro)
521  various_ro = true;
522  }
523 
524  sv++;
525  }
526 
527  ignore = false;
528 
529  if (bii2.type != BTRFS_TYPE_DIRECTORY && GetFileSizeEx(h, &filesize)) {
530  if (filesize.QuadPart != 0)
531  can_change_nocow = false;
532  }
533  } else
534  return;
535 
536  min_mode = ~min_mode;
537  min_flags = ~min_flags;
538 
539  mode = min_mode;
540  mode_set = ~(min_mode ^ max_mode);
541 
542  flags = min_flags;
544 
545  if (search_list.size() > 0) {
546  thread = CreateThread(nullptr, 0, global_search_list_thread, this, 0, nullptr);
547 
548  if (!thread)
549  throw last_error(GetLastError());
550  }
551 
552  this->filename = cmdline;
553 }
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
uint64_t subvol
Definition: propsheet.h:178
static PIO_STATUS_BLOCK iosb
Definition: file.c:98
#define FileAccessInformation
Definition: propsheet.cpp:51
uint64_t disk_size_lzo
Definition: btrfsioctl.h:81
bool various_inodes
Definition: propsheet.h:181
void push_back(const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _deque.h:668
bool various_gids
Definition: propsheet.h:181
uint8_t max_compression_type
Definition: propsheet.h:179
#define SUBVOL_ROOT_INODE
Definition: propsheet.cpp:42
LONG NTSTATUS
Definition: precomp.h:26
uint32_t st_uid
Definition: btrfsioctl.h:73
uint64_t max_flags
Definition: propsheet.h:177
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define INVALID_HANDLE_VALUE
Definition: compat.h:400
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
NTSYSCALLAPI NTSTATUS NTAPI NtFsControlFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG FsControlCode, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength)
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
const char * filename
Definition: ioapi.h:135
uint64_t disk_size_zstd
Definition: btrfsioctl.h:83
#define FILE_WRITE_ATTRIBUTES
Definition: nt_native.h:649
uint32_t st_mode
Definition: btrfsioctl.h:75
#define FILE_SHARE_READ
Definition: compat.h:125
uint64_t totalsize
Definition: propsheet.h:190
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
uint64_t allocsize
Definition: propsheet.h:190
Definition: fs.h:78
uint32_t inline_length
Definition: btrfsioctl.h:78
uint32_t st_gid
Definition: btrfsioctl.h:74
uint8_t min_compression_type
Definition: propsheet.h:179
bool has_subvols
Definition: propsheet.h:181
uint64_t min_flags
Definition: propsheet.h:177
#define BTRFS_TYPE_DIRECTORY
Definition: shellext.h:86
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:136
uint64_t st_rdev
Definition: btrfsioctl.h:76
bool various_subvols
Definition: propsheet.h:181
uint32_t uid
Definition: propsheet.h:180
bool various_uids
Definition: propsheet.h:181
#define OPEN_EXISTING
Definition: compat.h:435
uint32_t mode_set
Definition: propsheet.h:176
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
BOOL WINAPI GetFileInformationByHandle(HANDLE hFile, LPBY_HANDLE_FILE_INFORMATION lpFileInformation)
Definition: fileinfo.c:608
uint32_t min_mode
Definition: propsheet.h:176
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define WRITE_DAC
Definition: nt_native.h:59
uint64_t disk_size_zlib
Definition: btrfsioctl.h:80
uint64_t flags
Definition: btrfsioctl.h:77
deque< wstring > search_list
Definition: propsheet.h:191
LARGE_INTEGER AllocationSize
Definition: propsheet.cpp:54
GLbitfield flags
Definition: glext.h:7161
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
HANDLE thread
Definition: propsheet.h:175
uint64_t sparsesize
Definition: propsheet.h:190
#define GetFileSizeEx
Definition: compat.h:423
bool can_change_perms
Definition: propsheet.h:172
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
static DWORD WINAPI global_search_list_thread(LPVOID lpParameter)
Definition: propsheet.cpp:166
uint64_t inode
Definition: btrfsioctl.h:70
NTSTATUS NTAPI NtQueryInformationFile(HANDLE hFile, PIO_STATUS_BLOCK io, PVOID ptr, ULONG len, FILE_INFORMATION_CLASS FileInformationClass)
GLenum mode
Definition: glext.h:6217
Status
Definition: gdiplustypes.h:24
uint32_t gid
Definition: propsheet.h:180
#define FSCTL_BTRFS_GET_INODE_INFO
Definition: btrfsioctl.h:10
uint64_t sizes[5]
Definition: propsheet.h:190
unsigned int UINT
Definition: ndis.h:50
bool various_types
Definition: propsheet.h:181
#define FileStandardInformation
Definition: propsheet.cpp:61
#define CreateFileW
Definition: compat.h:409
size_type size() const
Definition: _deque.h:471
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41
#define FILE_FLAG_OPEN_REPARSE_POINT
Definition: disk.h:39
uint8_t compression_type
Definition: btrfsioctl.h:82
uint32_t max_mode
Definition: propsheet.h:176
uint64_t flags_set
Definition: propsheet.h:177
uint64_t rdev
Definition: propsheet.h:178
uint64_t sparse_size
Definition: btrfsioctl.h:84
#define memset(x, y, z)
Definition: compat.h:39
uint64_t disk_size_uncompressed
Definition: btrfsioctl.h:79
uint64_t subvol
Definition: btrfsioctl.h:69
bool can_change_nocow
Definition: propsheet.h:173
LONGLONG QuadPart
Definition: typedefs.h:113

Referenced by ShowPropSheetW().

◆ set_size_on_disk()

void BtrfsPropSheet::set_size_on_disk ( HWND  hwndDlg)

Definition at line 717 of file propsheet.cpp.

717  {
718  wstring s, size_on_disk, cr, frag;
719  WCHAR old_text[1024];
720  float ratio;
721 
722  format_size(totalsize, size_on_disk, true);
723 
724  wstring_sprintf(s, size_format, size_on_disk.c_str());
725 
726  if (allocsize == sparsesize || totalsize == 0)
727  ratio = 0.0f;
728  else
729  ratio = 100.0f * (1.0f - ((float)totalsize / (float)(allocsize - sparsesize)));
730 
731  wstring_sprintf(cr, cr_format, ratio);
732 
733  GetDlgItemTextW(hwndDlg, IDC_SIZE_ON_DISK, old_text, sizeof(old_text) / sizeof(WCHAR));
734 
735  if (s != old_text)
736  SetDlgItemTextW(hwndDlg, IDC_SIZE_ON_DISK, s.c_str());
737 
738  GetDlgItemTextW(hwndDlg, IDC_COMPRESSION_RATIO, old_text, sizeof(old_text) / sizeof(WCHAR));
739 
740  if (cr != old_text)
741  SetDlgItemTextW(hwndDlg, IDC_COMPRESSION_RATIO, cr.c_str());
742 
743  uint64_t extent_size = (allocsize - sparsesize - sizes[0]) / sector_size;
744 
745  if (num_extents == 0 || extent_size <= 1)
746  ratio = 0.0f;
747  else
748  ratio = 100.0f * ((float)num_extents / (float)(extent_size - 1));
749 
750  wstring_sprintf(frag, frag_format, ratio);
751 
752  GetDlgItemTextW(hwndDlg, IDC_FRAGMENTATION, old_text, sizeof(old_text) / sizeof(WCHAR));
753 
754 
755  if (frag != old_text)
756  SetDlgItemTextW(hwndDlg, IDC_FRAGMENTATION, frag.c_str());
757 }
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2271
WCHAR frag_format[255]
Definition: propsheet.h:174
#define IDC_FRAGMENTATION
Definition: resource.h:242
WCHAR size_format[255]
Definition: propsheet.h:174
uint64_t totalsize
Definition: propsheet.h:190
uint64_t allocsize
Definition: propsheet.h:190
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
uint64_t num_extents
Definition: propsheet.h:190
uint32_t sector_size
Definition: propsheet.h:193
void wstring_sprintf(wstring &s, wstring fmt,...)
Definition: main.cpp:225
__wchar_t WCHAR
Definition: xmlstorage.h:180
uint64_t sparsesize
Definition: propsheet.h:190
WCHAR cr_format[255]
Definition: propsheet.h:174
#define IDC_COMPRESSION_RATIO
Definition: resource.h:240
GLdouble s
Definition: gl.h:2039
UINT64 uint64_t
Definition: types.h:77
#define IDC_SIZE_ON_DISK
Definition: resource.h:225
static float(__cdecl *square_half_float)(float x
uint64_t sizes[5]
Definition: propsheet.h:190
void format_size(uint64_t size, wstring &s, bool show_bytes)
Definition: main.cpp:65

Referenced by init_propsheet(), and PropSheetDlgProc().

◆ update_size_details_dialog()

void BtrfsPropSheet::update_size_details_dialog ( HWND  hDlg)

Definition at line 793 of file propsheet.cpp.

793  {
794  wstring size;
795  WCHAR old_text[1024];
796  int i;
798 
799  for (i = 0; i < 5; i++) {
800  format_size(sizes[i], size, true);
801 
802  GetDlgItemTextW(hDlg, items[i], old_text, sizeof(old_text) / sizeof(WCHAR));
803 
804  if (size != old_text)
805  SetDlgItemTextW(hDlg, items[i], size.c_str());
806  }
807 }
#define IDC_SIZE_ZSTD
Definition: resource.h:239
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2271
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
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 const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define IDC_SIZE_ZLIB
Definition: resource.h:232
#define IDC_SIZE_UNCOMPRESSED
Definition: resource.h:229
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define IDC_SIZE_INLINE
Definition: resource.h:227
uint64_t sizes[5]
Definition: propsheet.h:190
unsigned int ULONG
Definition: retypes.h:1
#define IDC_SIZE_LZO
Definition: resource.h:236
static TCHAR * items[]
Definition: page1.c:45
void format_size(uint64_t size, wstring &s, bool show_bytes)
Definition: main.cpp:65

Referenced by SizeDetailsDlgProc().

Member Data Documentation

◆ allocsize

uint64_t BtrfsPropSheet::allocsize
private

◆ can_change_nocow

bool BtrfsPropSheet::can_change_nocow

Definition at line 173 of file propsheet.h.

Referenced by check_file(), init_propsheet(), load_file_list(), and set_cmdline().

◆ can_change_perms

bool BtrfsPropSheet::can_change_perms

Definition at line 172 of file propsheet.h.

Referenced by BtrfsPropSheet(), check_file(), init_propsheet(), load_file_list(), and set_cmdline().

◆ compress_type

uint8_t BtrfsPropSheet::compress_type

Definition at line 179 of file propsheet.h.

Referenced by apply_changes_file(), init_propsheet(), and PropSheetDlgProc().

◆ compress_type_changed

bool BtrfsPropSheet::compress_type_changed

Definition at line 181 of file propsheet.h.

Referenced by apply_changes(), apply_changes_file(), BtrfsPropSheet(), and PropSheetDlgProc().

◆ cr_format

WCHAR BtrfsPropSheet::cr_format[255]

Definition at line 174 of file propsheet.h.

Referenced by BtrfsPropSheet(), init_propsheet(), and set_size_on_disk().

◆ filename

wstring BtrfsPropSheet::filename
private

Definition at line 192 of file propsheet.h.

◆ flags

uint64_t BtrfsPropSheet::flags

Definition at line 177 of file propsheet.h.

◆ flags_changed

bool BtrfsPropSheet::flags_changed
private

Definition at line 189 of file propsheet.h.

Referenced by apply_changes(), apply_changes_file(), BtrfsPropSheet(), and change_inode_flag().

◆ flags_set

uint64_t BtrfsPropSheet::flags_set

◆ frag_format

WCHAR BtrfsPropSheet::frag_format[255]

Definition at line 174 of file propsheet.h.

Referenced by BtrfsPropSheet(), init_propsheet(), and set_size_on_disk().

◆ gid

uint32_t BtrfsPropSheet::gid

Definition at line 180 of file propsheet.h.

Referenced by apply_changes_file(), change_gid(), check_file(), init_propsheet(), and set_cmdline().

◆ gid_changed

bool BtrfsPropSheet::gid_changed
private

Definition at line 189 of file propsheet.h.

Referenced by apply_changes(), apply_changes_file(), BtrfsPropSheet(), and change_gid().

◆ has_subvols

bool BtrfsPropSheet::has_subvols

Definition at line 181 of file propsheet.h.

Referenced by BtrfsPropSheet(), check_file(), init_propsheet(), and set_cmdline().

◆ ignore

bool BtrfsPropSheet::ignore
private

Definition at line 186 of file propsheet.h.

Referenced by AddPages(), BtrfsPropSheet(), check_file(), and set_cmdline().

◆ inode

uint64_t BtrfsPropSheet::inode

Definition at line 178 of file propsheet.h.

◆ max_compression_type

uint8_t BtrfsPropSheet::max_compression_type

◆ max_flags

uint64_t BtrfsPropSheet::max_flags

Definition at line 177 of file propsheet.h.

Referenced by check_file(), init_propsheet(), load_file_list(), and set_cmdline().

◆ max_mode

uint32_t BtrfsPropSheet::max_mode

◆ min_compression_type

uint8_t BtrfsPropSheet::min_compression_type

◆ min_flags

uint64_t BtrfsPropSheet::min_flags

Definition at line 177 of file propsheet.h.

Referenced by check_file(), init_propsheet(), load_file_list(), and set_cmdline().

◆ min_mode

uint32_t BtrfsPropSheet::min_mode

◆ mode

uint32_t BtrfsPropSheet::mode

Definition at line 176 of file propsheet.h.

◆ mode_set

uint32_t BtrfsPropSheet::mode_set

◆ num_extents

uint64_t BtrfsPropSheet::num_extents
private

Definition at line 190 of file propsheet.h.

Referenced by BtrfsPropSheet(), check_file(), do_search(), and set_size_on_disk().

◆ perms_changed

bool BtrfsPropSheet::perms_changed
private

Definition at line 189 of file propsheet.h.

Referenced by apply_changes(), apply_changes_file(), BtrfsPropSheet(), and change_perm_flag().

◆ rdev

uint64_t BtrfsPropSheet::rdev

Definition at line 178 of file propsheet.h.

Referenced by check_file(), init_propsheet(), and set_cmdline().

◆ readonly

bool BtrfsPropSheet::readonly

◆ refcount

LONG BtrfsPropSheet::refcount
private

Definition at line 185 of file propsheet.h.

Referenced by AddRef(), BtrfsPropSheet(), and Release().

◆ ro_changed

bool BtrfsPropSheet::ro_changed

Definition at line 181 of file propsheet.h.

Referenced by apply_changes(), apply_changes_file(), BtrfsPropSheet(), and PropSheetDlgProc().

◆ ro_subvol

bool BtrfsPropSheet::ro_subvol

◆ search_list

deque<wstring> BtrfsPropSheet::search_list
private

Definition at line 191 of file propsheet.h.

Referenced by check_file(), do_search(), Initialize(), search_list_thread(), and set_cmdline().

◆ sector_size

uint32_t BtrfsPropSheet::sector_size
private

Definition at line 193 of file propsheet.h.

Referenced by BtrfsPropSheet(), check_file(), and set_size_on_disk().

◆ show_admin_button

bool BtrfsPropSheet::show_admin_button

Definition at line 181 of file propsheet.h.

Referenced by BtrfsPropSheet(), check_file(), and init_propsheet().

◆ size_format

WCHAR BtrfsPropSheet::size_format[255]

Definition at line 174 of file propsheet.h.

Referenced by BtrfsPropSheet(), init_propsheet(), and set_size_on_disk().

◆ sizes

uint64_t BtrfsPropSheet::sizes[5]
private

◆ sparsesize

uint64_t BtrfsPropSheet::sparsesize
private

◆ stgm

STGMEDIUM BtrfsPropSheet::stgm
private

◆ stgm_set

bool BtrfsPropSheet::stgm_set
private

Definition at line 188 of file propsheet.h.

Referenced by BtrfsPropSheet(), Initialize(), and ~BtrfsPropSheet().

◆ subvol

uint64_t BtrfsPropSheet::subvol

Definition at line 178 of file propsheet.h.

Referenced by check_file(), init_propsheet(), and set_cmdline().

◆ thread

◆ totalsize

uint64_t BtrfsPropSheet::totalsize
private

◆ type

uint8_t BtrfsPropSheet::type

Definition at line 179 of file propsheet.h.

◆ uid

uint32_t BtrfsPropSheet::uid

Definition at line 180 of file propsheet.h.

Referenced by apply_changes_file(), change_uid(), check_file(), init_propsheet(), and set_cmdline().

◆ uid_changed

bool BtrfsPropSheet::uid_changed
private

Definition at line 189 of file propsheet.h.

Referenced by apply_changes(), apply_changes_file(), BtrfsPropSheet(), and change_uid().

◆ various_gids

bool BtrfsPropSheet::various_gids

Definition at line 181 of file propsheet.h.

Referenced by apply_changes(), check_file(), init_propsheet(), load_file_list(), and set_cmdline().

◆ various_inodes

bool BtrfsPropSheet::various_inodes

Definition at line 181 of file propsheet.h.

Referenced by check_file(), init_propsheet(), load_file_list(), and set_cmdline().

◆ various_ro

bool BtrfsPropSheet::various_ro

Definition at line 181 of file propsheet.h.

Referenced by check_file(), init_propsheet(), load_file_list(), and set_cmdline().

◆ various_subvols

bool BtrfsPropSheet::various_subvols

Definition at line 181 of file propsheet.h.

Referenced by check_file(), init_propsheet(), load_file_list(), and set_cmdline().

◆ various_types

bool BtrfsPropSheet::various_types

Definition at line 181 of file propsheet.h.

Referenced by check_file(), init_propsheet(), load_file_list(), and set_cmdline().

◆ various_uids

bool BtrfsPropSheet::various_uids

Definition at line 181 of file propsheet.h.

Referenced by apply_changes(), check_file(), init_propsheet(), load_file_list(), and set_cmdline().


The documentation for this class was generated from the following files: