summaryrefslogtreecommitdiff
path: root/lib/chef/win32
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-05-06 16:54:20 -0700
committerTim Smith <tsmith84@gmail.com>2020-05-06 16:54:20 -0700
commitbed3ecfb36c61ec78b93155ad4ae3f3a01a2f57f (patch)
tree9cb0c8fd6f4bdf274a5d3d07be8d2c07b773e3f4 /lib/chef/win32
parentb39cf567a0e39c989c85bfc92b5352a655eeac05 (diff)
downloadchef-bed3ecfb36c61ec78b93155ad4ae3f3a01a2f57f.tar.gz
Align all our comments with the code
Autocorrected with chefstyle after enabling that cop. It was very hard to read some complex autocorrected blocks w/o this. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/win32')
-rw-r--r--lib/chef/win32/api/file.rb36
-rw-r--r--lib/chef/win32/process.rb4
2 files changed, 20 insertions, 20 deletions
diff --git a/lib/chef/win32/api/file.rb b/lib/chef/win32/api/file.rb
index 7aca1068e0..11a18e26d1 100644
--- a/lib/chef/win32/api/file.rb
+++ b/lib/chef/win32/api/file.rb
@@ -461,22 +461,22 @@ BOOL WINAPI DeviceIoControl(
=end
safe_attach_function :DeviceIoControl, %i{HANDLE DWORD LPVOID DWORD LPVOID DWORD LPDWORD pointer}, :BOOL
-# BOOL WINAPI DeleteVolumeMountPoint(
- # _In_ LPCTSTR lpszVolumeMountPoint
-# );
+ # BOOL WINAPI DeleteVolumeMountPoint(
+ # _In_ LPCTSTR lpszVolumeMountPoint
+ # );
safe_attach_function :DeleteVolumeMountPointW, [:LPCTSTR], :BOOL
-# BOOL WINAPI SetVolumeMountPoint(
- # _In_ LPCTSTR lpszVolumeMountPoint,
- # _In_ LPCTSTR lpszVolumeName
-# );
+ # BOOL WINAPI SetVolumeMountPoint(
+ # _In_ LPCTSTR lpszVolumeMountPoint,
+ # _In_ LPCTSTR lpszVolumeName
+ # );
safe_attach_function :SetVolumeMountPointW, %i{LPCTSTR LPCTSTR}, :BOOL
-# BOOL WINAPI GetVolumeNameForVolumeMountPoint(
- # _In_ LPCTSTR lpszVolumeMountPoint,
- # _Out_ LPTSTR lpszVolumeName,
- # _In_ DWORD cchBufferLength
-# );
+ # BOOL WINAPI GetVolumeNameForVolumeMountPoint(
+ # _In_ LPCTSTR lpszVolumeMountPoint,
+ # _Out_ LPTSTR lpszVolumeName,
+ # _In_ DWORD cchBufferLength
+ # );
safe_attach_function :GetVolumeNameForVolumeMountPointW, %i{LPCTSTR LPTSTR DWORD}, :BOOL
=begin
@@ -538,12 +538,12 @@ BOOL WINAPI VerQueryValue(
# ensures the handle is closed on exit of the block
# FIXME: yard with @yield
def file_search_handle(path)
- # Workaround for CHEF-4419:
- # Make sure paths starting with "/" has a drive letter
- # assigned from the current working diretory.
- # Note: With CHEF-4427 this issue will be fixed with a
- # broader fix to map all the paths starting with "/" to
- # SYSTEM_DRIVE on windows.
+ # Workaround for CHEF-4419:
+ # Make sure paths starting with "/" has a drive letter
+ # assigned from the current working diretory.
+ # Note: With CHEF-4427 this issue will be fixed with a
+ # broader fix to map all the paths starting with "/" to
+ # SYSTEM_DRIVE on windows.
path = ::File.expand_path(path) if path.start_with? "/"
path = canonical_encode_path(path)
find_data = WIN32_FIND_DATA.new
diff --git a/lib/chef/win32/process.rb b/lib/chef/win32/process.rb
index fa3286108c..17621f8518 100644
--- a/lib/chef/win32/process.rb
+++ b/lib/chef/win32/process.rb
@@ -82,8 +82,8 @@ class Chef
(call_succeeded != 0) && (is_64_bit_process_result.get_int(0) != 0)
end
- # Must have PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION rights,
- # AND the PROCESS_VM_READ right
+ # Must have PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION rights,
+ # AND the PROCESS_VM_READ right
def self.get_process_memory_info(handle)
memory_info = PROCESS_MEMORY_COUNTERS.new
unless GetProcessMemoryInfo(handle.handle, memory_info, memory_info.size)