{'C','I','M','_','L','o','g','i','c','a','l','D','i','s','k',0};
static const WCHAR class_networkadapterW[] =
{'W','i','n','3','2','_','N','e','t','w','o','r','k','A','d','a','p','t','e','r',0};
+static const WCHAR class_networkadapterconfigW[] =
+ {'W','i','n','3','2','_','N','e','t','w','o','r','k','A','d','a','p','t','e','r',
+ 'C','o','n','f','i','g','u','r','a','t','i','o','n',0};
static const WCHAR class_osW[] =
{'W','i','n','3','2','_','O','p','e','r','a','t','i','n','g','S','y','s','t','e','m',0};
static const WCHAR class_paramsW[] =
{'_','_','P','A','R','A','M','E','T','E','R','S',0};
+static const WCHAR class_physicalmediaW[] =
+ {'W','i','n','3','2','_','P','h','y','s','i','c','a','l','M','e','d','i','a',0};
+static const WCHAR class_physicalmemoryW[] =
+ {'W','i','n','3','2','_','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0};
static const WCHAR class_qualifiersW[] =
{'_','_','Q','U','A','L','I','F','I','E','R','S',0};
static const WCHAR class_process_getowner_outW[] =
{'A','d','a','p','t','e','r','T','y','p','e',0};
static const WCHAR prop_addresswidthW[] =
{'A','d','d','r','e','s','s','W','i','d','t','h',0};
+static const WCHAR prop_availabilityW[] =
+ {'A','v','a','i','l','a','b','i','l','i','t','y',0};
static const WCHAR prop_bootableW[] =
{'B','o','o','t','a','b','l','e',0};
static const WCHAR prop_bootpartitionW[] =
{'B','o','o','t','P','a','r','t','i','t','i','o','n',0};
+static const WCHAR prop_buildnumberW[] =
+ {'B','u','i','l','d','N','u','m','b','e','r',0};
+static const WCHAR prop_capacityW[] =
+ {'C','a','p','a','c','i','t','y',0};
static const WCHAR prop_captionW[] =
{'C','a','p','t','i','o','n',0};
static const WCHAR prop_classW[] =
{'H','a','n','d','l','e',0};
static const WCHAR prop_idW[] =
{'I','D',0};
+static const WCHAR prop_identificationcodeW[] =
+ {'I','d','e','n','t','i','f','i','c','a','t','i','o','n','C','o','d','e',0};
static const WCHAR prop_indexW[] =
{'I','n','d','e','x',0};
+static const WCHAR prop_installdateW[] =
+ {'I','n','s','t','a','l','l','D','a','t','e',0};
static const WCHAR prop_interfaceindexW[] =
{'I','n','t','e','r','f','a','c','e','I','n','d','e','x',0};
+static const WCHAR prop_interfacetypeW[] =
+ {'I','n','t','e','r','f','a','c','e','T','y','p','e',0};
static const WCHAR prop_intvalueW[] =
{'I','n','t','e','g','e','r','V','a','l','u','e',0};
+static const WCHAR prop_ipconnectionmetricW[] =
+ {'I','P','C','o','n','n','e','c','t','i','o','n','M','e','t','r','i','c',0};
+static const WCHAR prop_ipenabledW[] =
+ {'I','P','E','n','a','b','l','e','d',0};
static const WCHAR prop_lastbootuptimeW[] =
{'L','a','s','t','B','o','o','t','U','p','T','i','m','e',0};
static const WCHAR prop_localdatetimeW[] =
{'M','a','n','u','f','a','c','t','u','r','e','r',0};
static const WCHAR prop_maxclockspeedW[] =
{'M','a','x','C','l','o','c','k','S','p','e','e','d',0};
+static const WCHAR prop_mediatypeW[] =
+ {'M','e','d','i','a','T','y','p','e',0};
static const WCHAR prop_memberW[] =
{'M','e','m','b','e','r',0};
static const WCHAR prop_methodW[] =
{'S','e','r','v','i','c','e','P','a','c','k','M','i','n','o','r','V','e','r','s','i','o','n',0};
static const WCHAR prop_servicetypeW[] =
{'S','e','r','v','i','c','e','T','y','p','e',0};
+static const WCHAR prop_smbiosbiosversionW[] =
+ {'S','M','B','I','O','S','B','I','O','S','V','e','r','s','i','o','n',0};
static const WCHAR prop_startmodeW[] =
{'S','t','a','r','t','M','o','d','e',0};
static const WCHAR prop_sizeW[] =
{'V','a','r','i','a','n','t','T','y','p','e',0};
static const WCHAR prop_versionW[] =
{'V','e','r','s','i','o','n',0};
+static const WCHAR prop_volumeserialnumberW[] =
+ {'V','o','l','u','m','e','S','e','r','i','a','l','N','u','m','b','e','r',0};
/* column definitions must be kept in sync with record structures below */
static const struct column col_baseboard[] =
{
{ prop_manufacturerW, CIM_STRING },
+ { prop_modelW, CIM_STRING },
+ { prop_nameW, CIM_STRING },
{ prop_serialnumberW, CIM_STRING },
{ prop_tagW, CIM_STRING|COL_FLAG_KEY }
};
static const struct column col_bios[] =
{
- { prop_descriptionW, CIM_STRING },
- { prop_manufacturerW, CIM_STRING },
- { prop_releasedateW, CIM_DATETIME },
- { prop_serialnumberW, CIM_STRING },
- { prop_versionW, CIM_STRING|COL_FLAG_KEY }
+ { prop_descriptionW, CIM_STRING },
+ { prop_identificationcodeW, CIM_STRING },
+ { prop_manufacturerW, CIM_STRING },
+ { prop_releasedateW, CIM_DATETIME },
+ { prop_serialnumberW, CIM_STRING },
+ { prop_smbiosbiosversionW, CIM_STRING },
+ { prop_versionW, CIM_STRING|COL_FLAG_KEY }
};
static const struct column col_cdromdrive[] =
{
{ prop_deviceidW, CIM_STRING|COL_FLAG_KEY },
{ prop_driveW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_mediatypeW, CIM_STRING },
{ prop_nameW, CIM_STRING },
{ prop_pnpdeviceidW, CIM_STRING }
};
};
static const struct column col_diskdrive[] =
{
- { prop_deviceidW, CIM_STRING|COL_FLAG_KEY },
- { prop_indexW, CIM_UINT32, VT_I4 },
- { prop_manufacturerW, CIM_STRING },
- { prop_modelW, CIM_STRING },
- { prop_serialnumberW, CIM_STRING }
+ { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { prop_indexW, CIM_UINT32, VT_I4 },
+ { prop_interfacetypeW, CIM_STRING },
+ { prop_manufacturerW, CIM_STRING },
+ { prop_mediatypeW, CIM_STRING },
+ { prop_modelW, CIM_STRING },
+ { prop_serialnumberW, CIM_STRING },
+ { prop_sizeW, CIM_UINT64 }
};
static const struct column col_diskpartition[] =
{
};
static const struct column col_logicaldisk[] =
{
- { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_drivetypeW, CIM_UINT32, VT_I4 },
- { prop_filesystemW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_freespaceW, CIM_UINT64 },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_sizeW, CIM_UINT64 }
+ { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { prop_drivetypeW, CIM_UINT32, VT_I4 },
+ { prop_filesystemW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_freespaceW, CIM_UINT64 },
+ { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_sizeW, CIM_UINT64 },
+ { prop_volumeserialnumberW, CIM_STRING|COL_FLAG_DYNAMIC }
};
static const struct column col_networkadapter[] =
{
{ prop_adaptertypeW, CIM_STRING },
{ prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { prop_indexW, CIM_UINT32, VT_I4 },
{ prop_interfaceindexW, CIM_UINT32, VT_I4 },
{ prop_macaddressW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_manufacturerW, CIM_STRING },
+ { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_netconnectionstatusW, CIM_UINT16, VT_I4 },
{ prop_physicaladapterW, CIM_BOOLEAN },
{ prop_pnpdeviceidW, CIM_STRING },
{ prop_speedW, CIM_UINT64 }
};
+static const struct column col_networkadapterconfig[] =
+{
+ { prop_indexW, CIM_UINT32|COL_FLAG_KEY },
+ { prop_ipconnectionmetricW, CIM_UINT32 },
+ { prop_ipenabledW, CIM_BOOLEAN },
+ { prop_macaddressW, CIM_STRING|COL_FLAG_DYNAMIC }
+};
static const struct column col_os[] =
{
+ { prop_buildnumberW, CIM_STRING },
{ prop_captionW, CIM_STRING },
{ prop_codesetW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_countrycodeW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_csdversionW, CIM_STRING },
+ { prop_installdateW, CIM_DATETIME },
{ prop_lastbootuptimeW, CIM_DATETIME|COL_FLAG_DYNAMIC },
{ prop_localdatetimeW, CIM_DATETIME|COL_FLAG_DYNAMIC },
{ prop_localeW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_nameW, CIM_STRING },
{ prop_osarchitectureW, CIM_STRING },
{ prop_oslanguageW, CIM_UINT32, VT_I4 },
{ prop_osproductsuiteW, CIM_UINT32, VT_I4 },
{ prop_ostypeW, CIM_UINT16, VT_I4 },
+ { prop_serialnumberW, CIM_STRING },
{ prop_servicepackmajorW, CIM_UINT16, VT_I4 },
{ prop_servicepackminorW, CIM_UINT16, VT_I4 },
{ prop_suitemaskW, CIM_UINT32, VT_I4 },
{ prop_varianttypeW, CIM_UINT32 },
{ prop_defaultvalueW, CIM_UINT32 }
};
+static const struct column col_physicalmedia[] =
+{
+ { prop_serialnumberW, CIM_STRING },
+ { prop_tagW, CIM_STRING }
+};
+static const struct column col_physicalmemory[] =
+{
+ { prop_capacityW, CIM_UINT64 }
+};
static const struct column col_process[] =
{
{ prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC },
{
{ prop_adapterdactypeW, CIM_STRING },
{ prop_adapterramW, CIM_UINT32, VT_I4 },
+ { prop_availabilityW, CIM_UINT16 },
{ prop_currentbitsperpixelW, CIM_UINT32 },
{ prop_currenthorizontalresW, CIM_UINT32 },
{ prop_currentverticalresW, CIM_UINT32 },
{'2','0','1','2','0','6','0','8','0','0','0','0','0','0','.','0','0','0','0','0','0','+','0','0','0',0};
static const WCHAR bios_serialnumberW[] =
{'0',0};
+static const WCHAR bios_smbiosbiosversionW[] =
+ {'W','i','n','e',0};
static const WCHAR bios_versionW[] =
{'W','I','N','E',' ',' ',' ','-',' ','1',0};
+static const WCHAR cdromdrive_mediatypeW[] =
+ {'C','D','-','R','O','M',0};
static const WCHAR cdromdrive_nameW[] =
{'W','i','n','e',' ','C','D','-','R','O','M',' ','A','T','A',' ','D','e','v','i','c','e',0};
static const WCHAR cdromdrive_pnpdeviceidW[]=
{'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0};
static const WCHAR compsys_modelW[] =
{'W','i','n','e',0};
-static const WCHAR diskdrive_deviceidW[] =
- {'\\','\\','\\','\\','.','\\','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','0',0};
-static const WCHAR diskdrive_modelW[] =
- {'W','i','n','e',' ','D','i','s','k',' ','D','r','i','v','e',0};
+static const WCHAR diskdrive_interfacetypeW[] =
+ {'I','D','E',0};
static const WCHAR diskdrive_manufacturerW[] =
{'(','S','t','a','n','d','a','r','d',' ','d','i','s','k',' ','d','r','i','v','e','s',')',0};
+static const WCHAR diskdrive_mediatype_fixedW[] =
+ {'F','i','x','e','d',' ','h','a','r','d',' ','d','i','s','k',0};
+static const WCHAR diskdrive_mediatype_removableW[] =
+ {'R','e','m','o','v','a','b','l','e',' ','m','e','d','i','a',0};
+static const WCHAR diskdrive_modelW[] =
+ {'W','i','n','e',' ','D','i','s','k',' ','D','r','i','v','e',0};
static const WCHAR diskdrive_serialW[] =
{'W','I','N','E','H','D','I','S','K',0};
static const WCHAR networkadapter_pnpdeviceidW[]=
{'P','C','I','\\','V','E','N','_','8','0','8','6','&','D','E','V','_','1','0','0','E','&',
'S','U','B','S','Y','S','_','0','0','1','E','8','0','8','6','&','R','E','V','_','0','2','\\',
'3','&','2','6','7','A','6','1','6','A','&','1','&','1','8',0};
+static const WCHAR os_32bitW[] =
+ {'3','2','-','b','i','t',0};
+static const WCHAR os_64bitW[] =
+ {'6','4','-','b','i','t',0};
+static const WCHAR os_buildnumberW[] =
+ {'2','6','0','0',0};
static const WCHAR os_captionW[] =
{'M','i','c','r','o','s','o','f','t',' ','W','i','n','d','o','w','s',' ','X','P',' ',
'V','e','r','s','i','o','n',' ','=',' ','5','.','1','.','2','6','0','0',0};
static const WCHAR os_csdversionW[] =
{'S','e','r','v','i','c','e',' ','P','a','c','k',' ','3',0};
-static const WCHAR os_32bitW[] =
- {'3','2','-','b','i','t',0};
-static const WCHAR os_64bitW[] =
- {'6','4','-','b','i','t',0};
+static const WCHAR os_installdateW[] =
+ {'2','0','1','4','0','1','0','1','0','0','0','0','0','0','.','0','0','0','0','0','0','+','0','0','0',0};
+static const WCHAR os_nameW[] =
+ {'M','i','c','r','o','s','o','f','t',' ','W','i','n','d','o','w','s',' ','X','P',' ',
+ 'P','r','o','f','e','s','s','i','o','n','a','l','|','C',':','\\','W','I','N','D','O','W','S',
+ '|','\\','D','e','v','i','c','e','\\','H','a','r','d','d','i','s','k','0',
+ '\\','P','a','r','t','i','t','i','o','n','1',0};
+static const WCHAR os_serialnumberW[] =
+ {'1','2','3','4','5','-','O','E','M','-','1','2','3','4','5','6','7','-','1','2','3','4','5',0};
static const WCHAR os_versionW[] =
{'5','.','1','.','2','6','0','0',0};
+static const WCHAR physicalmedia_tagW[] =
+ {'\\','\\','.','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','0',0};
static const WCHAR sounddevice_productnameW[] =
{'W','i','n','e',' ','A','u','d','i','o',' ','D','e','v','i','c','e',0};
static const WCHAR videocontroller_dactypeW[] =
struct record_baseboard
{
const WCHAR *manufacturer;
+ const WCHAR *model;
+ const WCHAR *name;
const WCHAR *serialnumber;
const WCHAR *tag;
};
struct record_bios
{
const WCHAR *description;
+ const WCHAR *identificationcode;
const WCHAR *manufacturer;
const WCHAR *releasedate;
const WCHAR *serialnumber;
+ const WCHAR *smbiosbiosversion;
const WCHAR *version;
};
struct record_cdromdrive
{
const WCHAR *device_id;
const WCHAR *drive;
+ const WCHAR *mediatype;
const WCHAR *name;
const WCHAR *pnpdevice_id;
};
{
const WCHAR *device_id;
UINT32 index;
+ const WCHAR *interfacetype;
const WCHAR *manufacturer;
- const WCHAR *name;
+ const WCHAR *mediatype;
+ const WCHAR *model;
const WCHAR *serialnumber;
+ UINT64 size;
};
struct record_diskpartition
{
UINT64 freespace;
const WCHAR *name;
UINT64 size;
+ const WCHAR *volumeserialnumber;
};
struct record_networkadapter
{
const WCHAR *adaptertype;
const WCHAR *device_id;
- INT32 interface_index;
+ UINT32 index;
+ UINT32 interface_index;
const WCHAR *mac_address;
const WCHAR *manufacturer;
+ const WCHAR *name;
UINT16 netconnection_status;
int physicaladapter;
const WCHAR *pnpdevice_id;
UINT64 speed;
};
+struct record_networkadapterconfig
+{
+ UINT32 index;
+ UINT32 ipconnectionmetric;
+ int ipenabled;
+ const WCHAR *mac_address;
+};
struct record_operatingsystem
{
+ const WCHAR *buildnumber;
const WCHAR *caption;
const WCHAR *codeset;
const WCHAR *countrycode;
const WCHAR *csdversion;
+ const WCHAR *installdate;
const WCHAR *lastbootuptime;
const WCHAR *localdatetime;
const WCHAR *locale;
+ const WCHAR *name;
const WCHAR *osarchitecture;
UINT32 oslanguage;
UINT32 osproductsuite;
UINT16 ostype;
+ const WCHAR *serialnumber;
UINT16 servicepackmajor;
UINT16 servicepackminor;
UINT32 suitemask;
UINT32 varianttype;
UINT32 defaultvalue;
};
+struct record_physicalmedia
+{
+ const WCHAR *serialnumber;
+ const WCHAR *tag;
+};
+struct record_physicalmemory
+{
+ UINT64 capacity;
+};
struct record_process
{
const WCHAR *caption;
{
const WCHAR *adapter_dactype;
UINT32 adapter_ram;
+ UINT16 availability;
UINT32 current_bitsperpixel;
UINT32 current_horizontalres;
UINT32 current_verticalres;
static const struct record_baseboard data_baseboard[] =
{
- { baseboard_manufacturerW, baseboard_serialnumberW, baseboard_tagW }
+ { baseboard_manufacturerW, baseboard_tagW, baseboard_tagW, baseboard_serialnumberW, baseboard_tagW }
};
static const struct record_bios data_bios[] =
{
- { bios_descriptionW, bios_manufacturerW, bios_releasedateW, bios_serialnumberW, bios_versionW }
-};
-static const struct record_diskdrive data_diskdrive[] =
-{
- { diskdrive_deviceidW, 0, diskdrive_manufacturerW, diskdrive_modelW, diskdrive_serialW }
+ { bios_descriptionW, bios_descriptionW, bios_manufacturerW, bios_releasedateW, bios_serialnumberW,
+ bios_smbiosbiosversionW, bios_versionW }
};
static const struct record_param data_param[] =
{
#define FLAVOR_ID (WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE | WBEM_FLAVOR_NOT_OVERRIDABLE |\
WBEM_FLAVOR_ORIGIN_PROPAGATED)
+static const struct record_physicalmedia data_physicalmedia[] =
+{
+ { diskdrive_serialW, physicalmedia_tagW }
+};
static const struct record_qualifier data_qualifier[] =
{
{ class_process_getowner_outW, param_userW, CIM_SINT32, FLAVOR_ID, prop_idW, 0 },
static BOOL match_row( const struct table *table, UINT row, const struct expr *cond, enum fill_status *status )
{
LONGLONG val;
+ UINT type;
+
if (!cond)
{
*status = FILL_STATUS_UNFILTERED;
return TRUE;
}
- if (eval_cond( table, row, cond, &val ) != S_OK)
+ if (eval_cond( table, row, cond, &val, &type ) != S_OK)
{
*status = FILL_STATUS_FAILED;
return FALSE;
rec->device_id = cdromdrive_pnpdeviceidW;
sprintfW( drive, fmtW, 'A' + i );
rec->drive = heap_strdupW( drive );
+ rec->mediatype = cdromdrive_mediatypeW;
rec->name = cdromdrive_nameW;
rec->pnpdevice_id = cdromdrive_pnpdeviceidW;
if (!match_row( table, row, cond, &status ))
DWORD drives = GetLogicalDrives();
WIN32_FIND_DATAW data;
HANDLE handle;
- struct dirstack *dirstack = alloc_dirstack(2);
+ struct dirstack *dirstack;
enum fill_status status = FILL_STATUS_UNFILTERED;
if (!resize_table( table, 8, sizeof(*rec) )) return FILL_STATUS_FAILED;
+ dirstack = alloc_dirstack(2);
+
for (i = 0; i < sizeof(drives); i++)
{
if (!(drives & (1 << i))) continue;
if (!resize_table( table, row + 1, sizeof(*rec) ))
{
status = FILL_STATUS_FAILED;
+ FindClose( handle );
goto done;
}
if (!strcmpW( data.cFileName, dotW ) || !strcmpW( data.cFileName, dotdotW )) continue;
{
if (push_dir( dirstack, new_path, len )) continue;
heap_free( new_path );
+ FindClose( handle );
status = FILL_STATUS_FAILED;
goto done;
}
return status;
}
-static WCHAR *get_filesystem( const WCHAR *root )
-{
- static const WCHAR ntfsW[] = {'N','T','F','S',0};
- WCHAR buffer[MAX_PATH + 1];
-
- if (GetVolumeInformationW( root, NULL, 0, NULL, NULL, NULL, buffer, MAX_PATH + 1 ))
- return heap_strdupW( buffer );
- return heap_strdupW( ntfsW );
-}
-
static UINT64 get_freespace( const WCHAR *dir, UINT64 *disksize )
{
WCHAR root[] = {'\\','\\','.','\\','A',':',0};
return free.QuadPart;
}
+static enum fill_status fill_diskdrive( struct table *table, const struct expr *cond )
+{
+ static const WCHAR fmtW[] =
+ {'\\','\\','\\','\\','.','\\','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','%','u',0};
+ WCHAR device_id[sizeof(fmtW)/sizeof(fmtW[0]) + 10], root[] = {'A',':','\\',0};
+ struct record_diskdrive *rec;
+ UINT i, row = 0, offset = 0, index = 0, type;
+ UINT64 size = 1024 * 1024 * 1024;
+ DWORD drives = GetLogicalDrives();
+ enum fill_status status = FILL_STATUS_UNFILTERED;
+
+ if (!resize_table( table, 2, sizeof(*rec) )) return FILL_STATUS_FAILED;
+
+ for (i = 0; i < sizeof(drives); i++)
+ {
+ if (drives & (1 << i))
+ {
+ root[0] = 'A' + i;
+ type = GetDriveTypeW( root );
+ if (type != DRIVE_FIXED && type != DRIVE_REMOVABLE)
+ continue;
+
+ if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
+
+ rec = (struct record_diskdrive *)(table->data + offset);
+ sprintfW( device_id, fmtW, index );
+ rec->device_id = heap_strdupW( device_id );
+ rec->index = index;
+ rec->interfacetype = diskdrive_interfacetypeW;
+ rec->manufacturer = diskdrive_manufacturerW;
+ if (type == DRIVE_FIXED)
+ rec->mediatype = diskdrive_mediatype_fixedW;
+ else
+ rec->mediatype = diskdrive_mediatype_removableW;
+ rec->model = diskdrive_modelW;
+ rec->serialnumber = diskdrive_serialW;
+ get_freespace( root, &size );
+ rec->size = size;
+ if (!match_row( table, row, cond, &status ))
+ {
+ free_row_values( table, row );
+ continue;
+ }
+ offset += sizeof(*rec);
+ index++;
+ row++;
+ }
+ }
+ TRACE("created %u rows\n", row);
+ table->num_rows = row;
+ return status;
+}
+
+static WCHAR *get_filesystem( const WCHAR *root )
+{
+ static const WCHAR ntfsW[] = {'N','T','F','S',0};
+ WCHAR buffer[MAX_PATH + 1];
+
+ if (GetVolumeInformationW( root, NULL, 0, NULL, NULL, NULL, buffer, MAX_PATH + 1 ))
+ return heap_strdupW( buffer );
+ return heap_strdupW( ntfsW );
+}
+
static enum fill_status fill_diskpartition( struct table *table, const struct expr *cond )
{
static const WCHAR fmtW[] =
return status;
}
+static WCHAR *get_volumeserialnumber( const WCHAR *root )
+{
+ static const WCHAR fmtW[] = {'%','0','8','X',0};
+ DWORD serial = 0;
+ WCHAR buffer[9];
+
+ GetVolumeInformationW( root, NULL, 0, &serial, NULL, NULL, NULL, 0 );
+ sprintfW( buffer, fmtW, serial );
+ return heap_strdupW( buffer );
+}
+
static enum fill_status fill_logicaldisk( struct table *table, const struct expr *cond )
{
static const WCHAR fmtW[] = {'%','c',':',0};
rec = (struct record_logicaldisk *)(table->data + offset);
sprintfW( device_id, fmtW, 'A' + i );
- rec->device_id = heap_strdupW( device_id );
- rec->drivetype = type;
- rec->filesystem = get_filesystem( root );
- rec->freespace = get_freespace( root, &size );
- rec->name = heap_strdupW( device_id );
- rec->size = size;
+ rec->device_id = heap_strdupW( device_id );
+ rec->drivetype = type;
+ rec->filesystem = get_filesystem( root );
+ rec->freespace = get_freespace( root, &size );
+ rec->name = heap_strdupW( device_id );
+ rec->size = size;
+ rec->volumeserialnumber = get_volumeserialnumber( root );
if (!match_row( table, row, cond, &status ))
{
free_row_values( table, row );
heap_free( buffer );
return FILL_STATUS_FAILED;
}
- for (aa = buffer; aa; aa = aa->Next) count++;
+ for (aa = buffer; aa; aa = aa->Next)
+ {
+ if (aa->IfType != IF_TYPE_SOFTWARE_LOOPBACK) count++;
+ }
if (!resize_table( table, count, sizeof(*rec) ))
{
heap_free( buffer );
}
for (aa = buffer; aa; aa = aa->Next)
{
+ if (aa->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
+
rec = (struct record_networkadapter *)(table->data + offset);
sprintfW( device_id, fmtW, aa->u.s.IfIndex );
rec->adaptertype = get_adaptertype( aa->IfType, &physical );
rec->device_id = heap_strdupW( device_id );
+ rec->index = aa->u.s.IfIndex;
rec->interface_index = aa->u.s.IfIndex;
rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength );
rec->manufacturer = compsys_manufacturerW;
+ rec->name = heap_strdupW( aa->FriendlyName );
rec->netconnection_status = get_connection_status( aa->OperStatus );
rec->physicaladapter = physical;
rec->pnpdevice_id = networkadapter_pnpdeviceidW;
return status;
}
+static enum fill_status fill_networkadapterconfig( struct table *table, const struct expr *cond )
+{
+ struct record_networkadapterconfig *rec;
+ IP_ADAPTER_ADDRESSES *aa, *buffer;
+ UINT row = 0, offset = 0, count = 0;
+ DWORD size = 0, ret;
+ enum fill_status status = FILL_STATUS_UNFILTERED;
+
+ ret = GetAdaptersAddresses( AF_UNSPEC, 0, NULL, NULL, &size );
+ if (ret != ERROR_BUFFER_OVERFLOW) return FILL_STATUS_FAILED;
+
+ if (!(buffer = heap_alloc( size ))) return FILL_STATUS_FAILED;
+ if (GetAdaptersAddresses( AF_UNSPEC, 0, NULL, buffer, &size ))
+ {
+ heap_free( buffer );
+ return FILL_STATUS_FAILED;
+ }
+ for (aa = buffer; aa; aa = aa->Next)
+ {
+ if (aa->IfType != IF_TYPE_SOFTWARE_LOOPBACK) count++;
+ }
+ if (!resize_table( table, count, sizeof(*rec) ))
+ {
+ heap_free( buffer );
+ return FILL_STATUS_FAILED;
+ }
+ for (aa = buffer; aa; aa = aa->Next)
+ {
+ if (aa->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
+
+ rec = (struct record_networkadapterconfig *)(table->data + offset);
+ rec->index = aa->u.s.IfIndex;
+ rec->ipconnectionmetric = 20;
+ rec->ipenabled = -1;
+ rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength );
+ if (!match_row( table, row, cond, &status ))
+ {
+ free_row_values( table, row );
+ continue;
+ }
+ offset += sizeof(*rec);
+ row++;
+ }
+ TRACE("created %u rows\n", row);
+ table->num_rows = row;
+
+ heap_free( buffer );
+ return status;
+}
+
+static enum fill_status fill_physicalmemory( struct table *table, const struct expr *cond )
+{
+ struct record_physicalmemory *rec;
+ enum fill_status status = FILL_STATUS_UNFILTERED;
+ UINT row = 0;
+
+ if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
+
+ rec = (struct record_physicalmemory *)table->data;
+ rec->capacity = get_total_physical_memory();
+ if (!match_row( table, row, cond, &status )) free_row_values( table, row );
+ else row++;
+
+ TRACE("created %u rows\n", row);
+ table->num_rows = row;
+ return status;
+}
+
static WCHAR *get_cmdline( DWORD process_id )
{
if (process_id == GetCurrentProcessId()) return heap_strdupW( GetCommandLineW() );
if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
rec = (struct record_operatingsystem *)table->data;
+ rec->buildnumber = os_buildnumberW;
rec->caption = os_captionW;
rec->codeset = get_codeset();
rec->countrycode = get_countrycode();
rec->csdversion = os_csdversionW;
+ rec->installdate = os_installdateW;
rec->lastbootuptime = get_lastbootuptime();
rec->localdatetime = get_localdatetime();
rec->locale = get_locale();
+ rec->name = os_nameW;
rec->osarchitecture = get_osarchitecture();
rec->oslanguage = GetSystemDefaultLangID();
rec->osproductsuite = 2461140; /* Windows XP Professional */
rec->ostype = 18; /* WINNT */
+ rec->serialnumber = os_serialnumberW;
rec->servicepackmajor = 3;
rec->servicepackminor = 0;
rec->suitemask = 272; /* Single User + Terminal */
rec = (struct record_videocontroller *)table->data;
rec->adapter_dactype = videocontroller_dactypeW;
rec->adapter_ram = vidmem;
+ rec->availability = 3; /* Running or Full Power */
rec->current_bitsperpixel = get_bits_per_pixel( &hres, &vres );
rec->current_horizontalres = hres;
rec->current_verticalres = vres;
{ class_compsysW, SIZEOF(col_compsys), col_compsys, 0, 0, NULL, fill_compsys },
{ class_datafileW, SIZEOF(col_datafile), col_datafile, 0, 0, NULL, fill_datafile },
{ class_directoryW, SIZEOF(col_directory), col_directory, 0, 0, NULL, fill_directory },
- { class_diskdriveW, SIZEOF(col_diskdrive), col_diskdrive, SIZEOF(data_diskdrive), 0, (BYTE *)data_diskdrive },
+ { class_diskdriveW, SIZEOF(col_diskdrive), col_diskdrive, 0, 0, NULL, fill_diskdrive },
{ class_diskpartitionW, SIZEOF(col_diskpartition), col_diskpartition, 0, 0, NULL, fill_diskpartition },
{ class_logicaldiskW, SIZEOF(col_logicaldisk), col_logicaldisk, 0, 0, NULL, fill_logicaldisk },
{ class_logicaldisk2W, SIZEOF(col_logicaldisk), col_logicaldisk, 0, 0, NULL, fill_logicaldisk },
{ class_networkadapterW, SIZEOF(col_networkadapter), col_networkadapter, 0, 0, NULL, fill_networkadapter },
+ { class_networkadapterconfigW, SIZEOF(col_networkadapterconfig), col_networkadapterconfig, 0, 0, NULL,
+ fill_networkadapterconfig },
{ class_osW, SIZEOF(col_os), col_os, 0, 0, NULL, fill_os },
{ class_paramsW, SIZEOF(col_param), col_param, SIZEOF(data_param), 0, (BYTE *)data_param },
+ { class_physicalmediaW, SIZEOF(col_physicalmedia), col_physicalmedia, SIZEOF(data_physicalmedia), 0, (BYTE *)data_physicalmedia },
+ { class_physicalmemoryW, SIZEOF(col_physicalmemory), col_physicalmemory, 0, 0, NULL, fill_physicalmemory },
{ class_processW, SIZEOF(col_process), col_process, 0, 0, NULL, fill_process },
{ class_processorW, SIZEOF(col_processor), col_processor, 0, 0, NULL, fill_processor },
{ class_qualifiersW, SIZEOF(col_qualifier), col_qualifier, SIZEOF(data_qualifier), 0, (BYTE *)data_qualifier },
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 9
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 67
+#define YYLAST 68
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 32
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 10
/* YYNRULES -- Number of rules. */
-#define YYNRULES 35
+#define YYNRULES 36
/* YYNRULES -- Number of states. */
-#define YYNSTATES 65
+#define YYNSTATES 67
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
static const yytype_uint8 yyprhs[] =
{
0, 0, 3, 7, 12, 19, 21, 25, 27, 31,
- 33, 35, 37, 41, 45, 49, 53, 57, 61, 65,
- 69, 73, 77, 81, 85, 89, 93, 97, 101, 105,
- 110, 112, 114, 116, 118, 120
+ 33, 35, 37, 41, 45, 49, 52, 56, 60, 64,
+ 68, 72, 76, 80, 84, 88, 92, 96, 100, 104,
+ 108, 113, 115, 117, 119, 121, 123
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
36, -1, 3, 34, 4, 36, 15, 38, -1, 35,
-1, 35, 6, 34, -1, 5, -1, 36, 7, 36,
-1, 36, -1, 21, -1, 14, -1, 9, 38, 10,
- -1, 38, 23, 38, -1, 38, 22, 38, -1, 40,
- 31, 41, -1, 40, 28, 41, -1, 40, 29, 41,
- -1, 40, 27, 41, -1, 40, 26, 41, -1, 40,
- 30, 41, -1, 41, 31, 40, -1, 41, 28, 40,
- -1, 41, 29, 40, -1, 41, 27, 40, -1, 41,
- 26, 40, -1, 41, 30, 40, -1, 40, 25, 39,
- -1, 40, 8, 11, -1, 40, 8, 24, 11, -1,
- 20, -1, 35, -1, 37, -1, 20, -1, 13, -1,
- 12, -1
+ -1, 38, 23, 38, -1, 38, 22, 38, -1, 24,
+ 38, -1, 40, 31, 41, -1, 40, 28, 41, -1,
+ 40, 29, 41, -1, 40, 27, 41, -1, 40, 26,
+ 41, -1, 40, 30, 41, -1, 41, 31, 40, -1,
+ 41, 28, 40, -1, 41, 29, 40, -1, 41, 27,
+ 40, -1, 41, 26, 40, -1, 41, 30, 40, -1,
+ 40, 25, 39, -1, 40, 8, 11, -1, 40, 8,
+ 24, 11, -1, 20, -1, 35, -1, 37, -1, 20,
+ -1, 13, -1, 12, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
0, 221, 221, 233, 245, 260, 261, 265, 272, 278,
287, 296, 303, 309, 315, 321, 327, 333, 339, 345,
351, 357, 363, 369, 375, 381, 387, 393, 399, 405,
- 414, 423, 432, 438, 444, 450
+ 411, 420, 429, 438, 444, 450, 456
};
#endif
0, 32, 33, 33, 33, 34, 34, 34, 35, 35,
36, 37, 38, 38, 38, 38, 38, 38, 38, 38,
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
- 39, 40, 41, 41, 41, 41
+ 38, 39, 40, 41, 41, 41, 41
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 3, 4, 6, 1, 3, 1, 3, 1,
- 1, 1, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
- 1, 1, 1, 1, 1, 1
+ 1, 1, 3, 3, 3, 2, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 4, 1, 1, 1, 1, 1, 1
};
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
static const yytype_uint8 yydefact[] =
{
0, 0, 0, 0, 7, 10, 0, 5, 9, 1,
- 2, 0, 0, 0, 3, 6, 8, 0, 0, 35,
- 34, 11, 33, 31, 32, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 12, 14, 13, 28, 0,
- 30, 27, 19, 18, 16, 17, 20, 15, 25, 24,
- 22, 23, 26, 21, 29
+ 2, 0, 0, 0, 3, 6, 8, 0, 0, 36,
+ 35, 11, 34, 0, 32, 33, 4, 0, 0, 0,
+ 15, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 12, 14, 13,
+ 29, 0, 31, 28, 20, 19, 17, 18, 21, 16,
+ 26, 25, 23, 24, 27, 22, 30
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 2, 6, 23, 8, 24, 25, 51, 26, 27
+ -1, 2, 6, 24, 8, 25, 26, 53, 27, 28
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -20
+#define YYPACT_NINF -18
static const yytype_int8 yypact[] =
{
- 2, 3, 6, -10, -20, -20, 24, 31, 33, -20,
- -20, -10, 4, -10, 26, -20, -20, 18, 18, -20,
- -20, -20, -20, -20, -20, -19, -8, 20, -9, 18,
- 18, 5, 23, 22, 22, 22, 22, 22, 22, -10,
- -10, -10, -10, -10, -10, -20, 41, -20, -20, 54,
- -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
- -20, -20, -20, -20, -20
+ 7, 3, 12, -5, -18, -18, 31, 30, 21, -18,
+ -18, -5, 4, -5, 28, -18, -18, 17, 17, -18,
+ -18, -18, -18, 17, -18, -18, 11, -8, 24, 22,
+ -18, 17, 17, 16, 26, -9, -9, -9, -9, -9,
+ -9, -5, -5, -5, -5, -5, -5, -18, 19, -18,
+ -18, 37, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -20, -20, 55, 14, -1, -20, 15, -20, 13, 25
+ -18, -18, 56, 1, 36, -18, -17, -18, 15, 27
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
- 31, 45, 10, 29, 30, 1, 9, 3, 4, 4,
- 14, 5, 16, 29, 30, 7, 48, 32, 33, 34,
- 35, 36, 37, 38, 5, 5, 7, 18, 11, 49,
- 19, 20, 21, 28, 19, 20, 21, 12, 22, 5,
- 13, 17, 22, 50, 46, 47, 39, 40, 41, 42,
- 43, 44, 58, 59, 60, 61, 62, 63, 52, 53,
- 54, 55, 56, 57, 30, 64, 0, 15
+ 33, 29, 7, 19, 20, 21, 30, 3, 4, 4,
+ 1, 22, 9, 7, 48, 49, 5, 34, 35, 36,
+ 37, 38, 39, 40, 5, 5, 18, 50, 13, 19,
+ 20, 21, 47, 31, 32, 11, 12, 22, 5, 10,
+ 51, 23, 32, 17, 31, 32, 52, 14, 66, 16,
+ 41, 42, 43, 44, 45, 46, 60, 61, 62, 63,
+ 64, 65, 54, 55, 56, 57, 58, 59, 15
};
#define yypact_value_is_default(yystate) \
- ((yystate) == (-20))
+ ((yystate) == (-18))
#define yytable_value_is_error(yytable_value) \
YYID (0)
-static const yytype_int8 yycheck[] =
+static const yytype_uint8 yycheck[] =
{
- 8, 10, 3, 22, 23, 3, 0, 4, 5, 5,
- 11, 21, 13, 22, 23, 1, 11, 25, 26, 27,
- 28, 29, 30, 31, 21, 21, 12, 9, 4, 24,
- 12, 13, 14, 18, 12, 13, 14, 6, 20, 21,
- 7, 15, 20, 20, 29, 30, 26, 27, 28, 29,
- 30, 31, 39, 40, 41, 42, 43, 44, 33, 34,
- 35, 36, 37, 38, 23, 11, -1, 12
+ 8, 18, 1, 12, 13, 14, 23, 4, 5, 5,
+ 3, 20, 0, 12, 31, 32, 21, 25, 26, 27,
+ 28, 29, 30, 31, 21, 21, 9, 11, 7, 12,
+ 13, 14, 10, 22, 23, 4, 6, 20, 21, 3,
+ 24, 24, 23, 15, 22, 23, 20, 11, 11, 13,
+ 26, 27, 28, 29, 30, 31, 41, 42, 43, 44,
+ 45, 46, 35, 36, 37, 38, 39, 40, 12
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
{
0, 3, 33, 4, 5, 21, 34, 35, 36, 0,
36, 4, 6, 7, 36, 34, 36, 15, 9, 12,
- 13, 14, 20, 35, 37, 38, 40, 41, 38, 22,
- 23, 8, 25, 26, 27, 28, 29, 30, 31, 26,
- 27, 28, 29, 30, 31, 10, 38, 38, 11, 24,
- 20, 39, 41, 41, 41, 41, 41, 41, 40, 40,
- 40, 40, 40, 40, 11
+ 13, 14, 20, 24, 35, 37, 38, 40, 41, 38,
+ 38, 22, 23, 8, 25, 26, 27, 28, 29, 30,
+ 31, 26, 27, 28, 29, 30, 31, 10, 38, 38,
+ 11, 24, 20, 39, 41, 41, 41, 41, 41, 41,
+ 40, 40, 40, 40, 40, 40, 11
};
#define yyerrok (yyerrstatus = 0)
/* Line 1806 of yacc.c */
#line 322 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_EQ, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_unary( ctx, (yyvsp[(2) - (2)].expr), OP_NOT );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 328 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GT, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_EQ, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 334 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LT, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GT, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 340 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LE, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LT, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 346 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GE, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LE, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 352 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_NE, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GE, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 358 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_EQ, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_NE, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 364 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GT, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_EQ, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 370 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LT, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GT, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 376 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LE, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LT, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 382 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GE, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LE, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 388 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_NE, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GE, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 394 "wql.y"
{
- (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LIKE, (yyvsp[(3) - (3)].expr) );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_NE, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 400 "wql.y"
{
- (yyval.expr) = expr_unary( ctx, (yyvsp[(1) - (3)].expr), OP_ISNULL );
+ (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LIKE, (yyvsp[(3) - (3)].expr) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 406 "wql.y"
{
- (yyval.expr) = expr_unary( ctx, (yyvsp[(1) - (4)].expr), OP_NOTNULL );
+ (yyval.expr) = expr_unary( ctx, (yyvsp[(1) - (3)].expr), OP_ISNULL );
if (!(yyval.expr))
YYABORT;
}
case 30:
/* Line 1806 of yacc.c */
-#line 415 "wql.y"
+#line 412 "wql.y"
{
- (yyval.expr) = expr_sval( ctx, &(yyvsp[(1) - (1)].str) );
+ (yyval.expr) = expr_unary( ctx, (yyvsp[(1) - (4)].expr), OP_NOTNULL );
if (!(yyval.expr))
YYABORT;
}
case 31:
/* Line 1806 of yacc.c */
-#line 424 "wql.y"
+#line 421 "wql.y"
{
- (yyval.expr) = expr_propval( ctx, (yyvsp[(1) - (1)].proplist) );
+ (yyval.expr) = expr_sval( ctx, &(yyvsp[(1) - (1)].str) );
if (!(yyval.expr))
YYABORT;
}
case 32:
/* Line 1806 of yacc.c */
-#line 433 "wql.y"
+#line 430 "wql.y"
{
- (yyval.expr) = expr_ival( ctx, (yyvsp[(1) - (1)].integer) );
+ (yyval.expr) = expr_propval( ctx, (yyvsp[(1) - (1)].proplist) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 439 "wql.y"
{
- (yyval.expr) = expr_sval( ctx, &(yyvsp[(1) - (1)].str) );
+ (yyval.expr) = expr_ival( ctx, (yyvsp[(1) - (1)].integer) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 445 "wql.y"
{
- (yyval.expr) = expr_bval( ctx, -1 );
+ (yyval.expr) = expr_sval( ctx, &(yyvsp[(1) - (1)].str) );
if (!(yyval.expr))
YYABORT;
}
/* Line 1806 of yacc.c */
#line 451 "wql.y"
+ {
+ (yyval.expr) = expr_bval( ctx, -1 );
+ if (!(yyval.expr))
+ YYABORT;
+ }
+ break;
+
+ case 36:
+
+/* Line 1806 of yacc.c */
+#line 457 "wql.y"
{
(yyval.expr) = expr_bval( ctx, 0 );
if (!(yyval.expr))
/* Line 1806 of yacc.c */
-#line 2011 "wql.tab.c"
+#line 2022 "wql.tab.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
/* Line 2067 of yacc.c */
-#line 458 "wql.y"
+#line 464 "wql.y"
HRESULT parse_query( const WCHAR *str, struct view **view, struct list *mem )