ReactOS 0.4.16-dev-823-g9a093ec
partinfo.c File Reference
#include "precomp.h"
#include "partinfo.h"
Include dependency graph for partinfo.c:

Go to the source code of this file.

Classes

struct  _MBR_PARTITION_TYPE
 
struct  _GPT_PARTITION_TYPE
 

Macros

#define GUID_CONST(l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)    { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
 

Typedefs

typedef struct _MBR_PARTITION_TYPE MBR_PARTITION_TYPE
 
typedef struct _MBR_PARTITION_TYPEPMBR_PARTITION_TYPE
 
typedef struct _GPT_PARTITION_TYPE GPT_PARTITION_TYPE
 
typedef struct _GPT_PARTITION_TYPEPGPT_PARTITION_TYPE
 

Functions

PCSTR NTAPI LookupPartitionTypeString (_In_ PARTITION_STYLE PartitionStyle, _In_ PVOID PartitionType)
 

Variables

const MBR_PARTITION_TYPE MbrPartitionTypes []
 
const GPT_PARTITION_TYPE GptPartitionTypes []
 

Macro Definition Documentation

◆ GUID_CONST

#define GUID_CONST (   l,
  w1,
  w2,
  b1,
  b2,
  b3,
  b4,
  b5,
  b6,
  b7,
  b8 
)     { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }

Definition at line 212 of file partinfo.c.

Typedef Documentation

◆ GPT_PARTITION_TYPE

◆ MBR_PARTITION_TYPE

◆ PGPT_PARTITION_TYPE

◆ PMBR_PARTITION_TYPE

Function Documentation

◆ LookupPartitionTypeString()

PCSTR NTAPI LookupPartitionTypeString ( _In_ PARTITION_STYLE  PartitionStyle,
_In_ PVOID  PartitionType 
)

Definition at line 804 of file partinfo.c.

807{
808 UINT i;
809
810 /* Do the table lookup */
811 if (PartitionStyle == PARTITION_STYLE_MBR)
812 {
813 for (i = 0; i < _countof(MbrPartitionTypes); ++i)
814 {
816 {
818 }
819 }
820 }
821#if 0 // TODO: GPT support!
822 else if (PartitionStyle == PARTITION_STYLE_GPT)
823 {
824 for (i = 0; i < _countof(GptPartitionTypes); ++i)
825 {
826 if (IsEqualPartitionType((PGUID)PartitionType,
828 {
830 }
831 }
832 }
833#endif
834
835 /* The partition type is unknown */
836 return NULL;
837}
const GPT_PARTITION_TYPE GptPartitionTypes[]
Definition: partinfo.c:283
const MBR_PARTITION_TYPE MbrPartitionTypes[]
Definition: partinfo.c:52
#define NULL
Definition: types.h:112
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
@ PARTITION_STYLE_GPT
Definition: imports.h:202
@ PARTITION_STYLE_MBR
Definition: imports.h:201
unsigned int UINT
Definition: ndis.h:50
CHAR PartitionType
Definition: part_xbox.c:32
#define _countof(array)
Definition: sndvol32.h:70
unsigned char * PUCHAR
Definition: typedefs.h:53
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:762

Referenced by GetPartitionTypeString().

Variable Documentation

◆ GptPartitionTypes

const GPT_PARTITION_TYPE GptPartitionTypes[]

Definition at line 283 of file partinfo.c.

Referenced by LookupPartitionTypeString().

◆ MbrPartitionTypes

const MBR_PARTITION_TYPE MbrPartitionTypes[]

Definition at line 52 of file partinfo.c.

Referenced by LookupPartitionTypeString().