public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin/main] Cygwin: ntdll.h: add missing NtQueryVolumeInformationFile definitions
Date: Thu, 30 Nov 2023 21:40:05 +0000 (GMT)	[thread overview]
Message-ID: <20231130214005.033763848357@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=61f49ada90b2541925d56183e91e7d57aad1547a

commit 61f49ada90b2541925d56183e91e7d57aad1547a
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Thu Nov 30 22:12:13 2023 +0100
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Thu Nov 30 22:37:35 2023 +0100

    Cygwin: ntdll.h: add missing NtQueryVolumeInformationFile definitions
    
    In preparation of using the FileFsSectorSizeInformation info class,
    add a couple of missing definitions.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/local_includes/ntdll.h | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/winsup/cygwin/local_includes/ntdll.h b/winsup/cygwin/local_includes/ntdll.h
index 484523bbbc48..9605784e32a8 100644
--- a/winsup/cygwin/local_includes/ntdll.h
+++ b/winsup/cygwin/local_includes/ntdll.h
@@ -59,6 +59,13 @@ extern GUID __cygwin_socket_guid;
 #define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
 #define FILE_DEVICE_SECURE_OPEN        0x00000100
 
+/* Sector Size Information Flags */
+#define SSINFO_FLAGS_ALIGNED_DEVICE              0x00000001
+#define SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE 0x00000002
+#define SSINFO_FLAGS_NO_SEEK_PENALTY             0x00000004
+#define SSINFO_FLAGS_TRIM_ENABLED                0x00000008
+#define SSINFO_FLAGS_BYTE_ADDRESSABLE            0x00000010
+
 /* Lock type in NtLockVirtualMemory/NtUnlockVirtualMemory call. */
 #define MAP_PROCESS 1
 #define MAP_SYSTEM  2
@@ -1205,6 +1212,21 @@ typedef struct _FILE_FS_OBJECTID_INFORMATION
   UCHAR ExtendedInfo[48];
 } FILE_FS_OBJECTID_INFORMATION, *PFILE_FS_OBJECTID_INFORMATION;
 
+typedef struct _FILE_FS_SECTOR_SIZE_INFORMATION
+{
+  ULONG LogicalBytesPerSector;
+  ULONG PhysicalBytesPerSectorForAtomicity;
+  ULONG PhysicalBytesPerSectorForPerformance;
+  ULONG FileSystemEffectivePhysicalBytesPerSectorForAtomicity;
+  ULONG Flags;
+  ULONG ByteOffsetForSectorAlignment;
+  ULONG ByteOffsetForPartitionAlignment;
+} FILE_FS_SECTOR_SIZE_INFORMATION, *PFILE_FS_SECTOR_SIZE_INFORMATION;
+
+typedef struct _FILE_FS_VOLUME_FLAGS_INFORMATION {
+    ULONG Flags;
+} FILE_FS_VOLUME_FLAGS_INFORMATION, *PFILE_FS_VOLUME_FLAGS_INFORMATION;
+
 typedef enum _FSINFOCLASS {
   FileFsVolumeInformation = 1,
   FileFsLabelInformation,
@@ -1215,6 +1237,11 @@ typedef enum _FSINFOCLASS {
   FileFsFullSizeInformation,
   FileFsObjectIdInformation,
   FileFsDriverPathInformation,
+  FileFsVolumeFlagsInformation,
+  FileFsSectorSizeInformation,
+  FileFsDataCopyInformation,
+  FileFsMetadataSizeInformation,
+  FileFsFullSizeInformationEx,
   FileFsMaximumInformation
 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;

                 reply	other threads:[~2023-11-30 21:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231130214005.033763848357@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).