winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
629 discussions
Start a n
N
ew thread
Hans Leidekker : wbemprox: Add support for evaluating ASSOCIATORS OF queries.
by Alexandre Julliard
10 Sep '19
10 Sep '19
Module: wine Branch: master Commit: 8487265f81a2824ae26485db3b7525c3984efca6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8487265f81a2824ae26485db…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 10 17:09:14 2019 +0200 wbemprox: Add support for evaluating ASSOCIATORS OF queries. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/builtin.c | 40 ++- dlls/wbemprox/class.c | 36 +-- dlls/wbemprox/query.c | 509 +++++++++++++++++++++++++++++++-------- dlls/wbemprox/services.c | 21 +- dlls/wbemprox/wbemprox_private.h | 36 ++- dlls/wbemprox/wql.y | 10 +- 6 files changed, 496 insertions(+), 156 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=8487265f81a2824ae264…
1
0
0
0
Hans Leidekker : wbemprox: Fix index in fill_diskdrive and fill_diskpartition.
by Alexandre Julliard
10 Sep '19
10 Sep '19
Module: wine Branch: master Commit: c69813bcd0c540a04910647fa19ecacc2aad0675 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c69813bcd0c540a04910647f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 10 17:09:13 2019 +0200 wbemprox: Fix index in fill_diskdrive and fill_diskpartition. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/builtin.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 105a2d3ec2..de793f3f7e 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -2424,7 +2424,7 @@ static enum fill_status fill_diskdrive( struct table *table, const struct expr * rec = (struct record_diskdrive *)(table->data + offset); swprintf( device_id, ARRAY_SIZE( device_id ), fmtW, index ); rec->device_id = heap_strdupW( device_id ); - rec->index = index; + rec->index = index++; rec->interfacetype = diskdrive_interfacetypeW; rec->manufacturer = diskdrive_manufacturerW; rec->mediatype = (type == DRIVE_FIXED) ? diskdrive_mediatype_fixedW : diskdrive_mediatype_removableW; @@ -2439,7 +2439,6 @@ static enum fill_status fill_diskdrive( struct table *table, const struct expr * continue; } offset += sizeof(*rec); - index++; row++; } } @@ -2591,7 +2590,7 @@ static enum fill_status fill_diskpartition( struct table *table, const struct ex rec->bootpartition = (i == 2) ? -1 : 0; swprintf( device_id, ARRAY_SIZE( device_id ), fmtW, index ); rec->device_id = heap_strdupW( device_id ); - rec->diskindex = index; + rec->diskindex = index++; rec->index = 0; rec->pnpdevice_id = heap_strdupW( device_id ); get_freespace( root, &size ); @@ -2605,7 +2604,6 @@ static enum fill_status fill_diskpartition( struct table *table, const struct ex } offset += sizeof(*rec); row++; - index++; } } TRACE("created %u rows\n", row);
1
0
0
0
Hans Leidekker : wbemprox: Implement Win32_LogicalDiskToPartition.
by Alexandre Julliard
10 Sep '19
10 Sep '19
Module: wine Branch: master Commit: 39bac1e32b3a802ce3f40067fdf63581821092f8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=39bac1e32b3a802ce3f40067…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 10 17:09:11 2019 +0200 wbemprox: Implement Win32_LogicalDiskToPartition. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/builtin.c | 123 ++++++++++++++++++++++++++++++++++++++++++++ dlls/wbemprox/tests/query.c | 5 +- 2 files changed, 127 insertions(+), 1 deletion(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 299a2edc71..93d842708f 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -76,6 +76,8 @@ static const WCHAR class_logicaldiskW[] = {'W','i','n','3','2','_','L','o','g','i','c','a','l','D','i','s','k',0}; static const WCHAR class_logicaldisk2W[] = {'C','I','M','_','L','o','g','i','c','a','l','D','i','s','k',0}; +static const WCHAR class_logicaldisktopartitionW[] = + {'W','i','n','3','2','_','L','o','g','i','c','a','l','D','i','s','k','T','o','P','a','r','t','i','t','i','o','n',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[] = @@ -129,6 +131,8 @@ static const WCHAR prop_adaptertypeidW[] = {'A','d','a','p','t','e','r','T','y','p','e','I','D',0}; static const WCHAR prop_addresswidthW[] = {'A','d','d','r','e','s','s','W','i','d','t','h',0}; +static const WCHAR prop_antecedentW[] = + {'A','n','t','e','c','e','d','e','n','t',0}; static const WCHAR prop_architectureW[] = {'A','r','c','h','i','t','e','c','t','u','r','e',0}; static const WCHAR prop_attributesW[] = @@ -183,6 +187,8 @@ static const WCHAR prop_defaultipgatewayW[] = {'D','e','f','a','u','l','t','I','P','G','a','t','e','w','a','y',0}; static const WCHAR prop_defaultvalueW[] = {'D','e','f','a','u','l','t','V','a','l','u','e',0}; +static const WCHAR prop_dependentW[] = + {'D','e','p','e','n','d','e','n','t',0}; static const WCHAR prop_descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR prop_destinationW[] = @@ -533,6 +539,11 @@ static const struct column col_logicaldisk[] = { prop_volumenameW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_volumeserialnumberW, CIM_STRING|COL_FLAG_DYNAMIC } }; +static const struct column col_logicaldisktopartition[] = +{ + { prop_antecedentW, CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, + { prop_dependentW, CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY } +}; static const struct column col_networkadapter[] = { { prop_adaptertypeW, CIM_STRING }, @@ -961,6 +972,11 @@ struct record_logicaldisk const WCHAR *volumename; const WCHAR *volumeserialnumber; }; +struct record_logicaldisktopartition +{ + const WCHAR *antecedent; + const WCHAR *dependent; +}; struct record_networkadapter { const WCHAR *adaptertype; @@ -2599,6 +2615,112 @@ static enum fill_status fill_logicaldisk( struct table *table, const struct expr return status; } +struct association +{ + WCHAR *ref; + WCHAR *ref2; +}; + +static void free_assocations( struct association *assoc, UINT count ) +{ + UINT i; + if (!assoc) return; + for (i = 0; i < count; i++) + { + heap_free( assoc[i].ref ); + heap_free( assoc[i].ref2 ); + } + heap_free( assoc ); +} + +static struct association *get_logicaldisktopartition_pairs( UINT *count ) +{ + static const WCHAR pathW[] = + {'_','_','P','A','T','H',0}; + static const WCHAR selectW[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_', + 'D','i','s','k','P','a','r','t','i','t','i','o','n',0}; + static const WCHAR select2W[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_', + 'L','o','g','i','c','a','l','D','i','s','k',' ','W','H','E','R','E',' ', + 'D','r','i','v','e','T','y','p','e','=','2',' ','O','R',' ','D','r','i','v','e','T','y','p','e','=','3',0}; + struct association *ret = NULL; + struct query *query, *query2 = NULL; + VARIANT val; + HRESULT hr; + UINT i; + + if (!(query = create_query())) return NULL; + if ((hr = parse_query( selectW, &query->view, &query->mem )) != S_OK) goto done; + if ((hr = execute_view( query->view )) != S_OK) goto done; + + if (!(query2 = create_query())) return FALSE; + if ((hr = parse_query( select2W, &query2->view, &query2->mem )) != S_OK) goto done; + if ((hr = execute_view( query2->view )) != S_OK) goto done; + + if (!(ret = heap_alloc_zero( query->view->count * sizeof(*ret) ))) goto done; + + /* assume fixed and removable disks are enumerated in the same order as partitions */ + for (i = 0; i < query->view->count; i++) + { + if ((hr = get_propval( query->view, i, pathW, &val, NULL, NULL )) != S_OK) goto done; + if (!(ret[i].ref = heap_strdupW( V_BSTR(&val) ))) goto done; + VariantClear( &val ); + + if ((hr = get_propval( query2->view, i, pathW, &val, NULL, NULL )) != S_OK) goto done; + if (!(ret[i].ref2 = heap_strdupW( V_BSTR(&val) ))) goto done; + VariantClear( &val ); + } + + *count = query->view->count; + +done: + if (!ret) free_assocations( ret, query->view->count ); + free_query( query ); + free_query( query2 ); + return ret; +} + +static enum fill_status fill_logicaldisktopartition( struct table *table, const struct expr *cond ) +{ + struct record_logicaldisktopartition *rec; + UINT i, row = 0, offset = 0, count = 0; + enum fill_status status = FILL_STATUS_UNFILTERED; + struct association *assoc; + + if (!(assoc = get_logicaldisktopartition_pairs( &count ))) return FILL_STATUS_FAILED; + if (!count) + { + free_assocations( assoc, count ); + return FILL_STATUS_UNFILTERED; + } + if (!resize_table( table, count, sizeof(*rec) )) + { + free_assocations( assoc, count ); + return FILL_STATUS_FAILED; + } + + for (i = 0; i < count; i++) + { + rec = (struct record_logicaldisktopartition *)(table->data + offset); + rec->antecedent = assoc[i].ref; + rec->dependent = assoc[i].ref2; + if (!match_row( table, row, cond, &status )) + { + free_row_values( table, row ); + continue; + } + offset += sizeof(*rec); + row++; + } + + heap_free( assoc ); + + TRACE("created %u rows\n", row); + table->num_rows = row; + return status; +} + static UINT16 get_connection_status( IF_OPER_STATUS status ) { switch (status) @@ -4061,6 +4183,7 @@ static struct table builtin_classes[] = { class_ip4routetableW, C(col_ip4routetable), 0, 0, NULL, fill_ip4routetable }, { class_logicaldiskW, C(col_logicaldisk), 0, 0, NULL, fill_logicaldisk }, { class_logicaldisk2W, C(col_logicaldisk), 0, 0, NULL, fill_logicaldisk }, + { class_logicaldisktopartitionW, C(col_logicaldisktopartition), 0, 0, NULL, fill_logicaldisktopartition }, { class_networkadapterW, C(col_networkadapter), 0, 0, NULL, fill_networkadapter }, { class_networkadapterconfigW, C(col_networkadapterconfig), 0, 0, NULL, fill_networkadapterconfig }, { class_osW, C(col_os), 0, 0, NULL, fill_os }, diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index b180cfc92f..6edb0d0f09 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -123,8 +123,11 @@ static void test_select( IWbemServices *services ) static const WCHAR query13[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','B','I','O','S', ' ','W','H','E','R','E',' ','N','U','L','L',' ','=',' ','N','A','M','E', 0}; + static const WCHAR query14[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_', + 'L','o','g','i','c','a','l','D','i','s','k','T','o','P','a','r','t','i','t','i','o','n',0}; static const WCHAR *test[] = { query1, query2, query3, query4, query5, query6, query7, query8, query9, query10, - query11, query12, query13 }; + query11, query12, query13, query14 }; HRESULT hr; IEnumWbemClassObject *result; BSTR wql = SysAllocString( wqlW );
1
0
0
0
Hans Leidekker : wbemprox: Implement Win32_DiskDriveToDiskPartition.
by Alexandre Julliard
10 Sep '19
10 Sep '19
Module: wine Branch: master Commit: 08d0449e41d001b121c2b2023630eae3c7049163 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=08d0449e41d001b121c2b202…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 10 17:09:12 2019 +0200 wbemprox: Implement Win32_DiskDriveToDiskPartition. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/builtin.c | 135 ++++++++++++++++++++++++++++++++++++++------ dlls/wbemprox/tests/query.c | 5 +- 2 files changed, 121 insertions(+), 19 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 93d842708f..105a2d3ec2 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -68,6 +68,8 @@ static const WCHAR class_directoryW[] = {'W','i','n','3','2','_','D','i','r','e','c','t','o','r','y',0}; static const WCHAR class_diskdriveW[] = {'W','i','n','3','2','_','D','i','s','k','D','r','i','v','e',0}; +static const WCHAR class_diskdrivetodiskpartitionW[] = + {'W','i','n','3','2','_','D','i','s','k','D','r','i','v','e','T','o','D','i','s','k','P','a','r','t','i','t','i','o','n',0}; static const WCHAR class_diskpartitionW[] = {'W','i','n','3','2','_','D','i','s','k','P','a','r','t','i','t','i','o','n',0}; static const WCHAR class_ip4routetableW[] = @@ -510,6 +512,11 @@ static const struct column col_diskdrive[] = { prop_serialnumberW, CIM_STRING }, { prop_sizeW, CIM_UINT64 } }; +static const struct column col_diskdrivetodiskpartition[] = +{ + { prop_antecedentW, CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, + { prop_dependentW, CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY } +}; static const struct column col_diskpartition[] = { { prop_bootableW, CIM_BOOLEAN }, @@ -943,6 +950,11 @@ struct record_diskdrive const WCHAR *serialnumber; UINT64 size; }; +struct record_diskdrivetodiskpartition +{ + const WCHAR *antecedent; + const WCHAR *dependent; +}; struct record_diskpartition { int bootable; @@ -2436,6 +2448,110 @@ static enum fill_status fill_diskdrive( struct table *table, const struct expr * return status; } +struct association +{ + WCHAR *ref; + WCHAR *ref2; +}; + +static void free_assocations( struct association *assoc, UINT count ) +{ + UINT i; + if (!assoc) return; + for (i = 0; i < count; i++) + { + heap_free( assoc[i].ref ); + heap_free( assoc[i].ref2 ); + } + heap_free( assoc ); +} + +static struct association *get_diskdrivetodiskpartition_pairs( UINT *count ) +{ + static const WCHAR pathW[] = + {'_','_','P','A','T','H',0}; + static const WCHAR selectW[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_', + 'D','i','s','k','D','r','i','v','e',0}; + static const WCHAR select2W[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_', + 'D','i','s','k','P','a','r','t','i','t','i','o','n',0}; + struct association *ret = NULL; + struct query *query, *query2 = NULL; + VARIANT val; + HRESULT hr; + UINT i; + + if (!(query = create_query())) return NULL; + if ((hr = parse_query( selectW, &query->view, &query->mem )) != S_OK) goto done; + if ((hr = execute_view( query->view )) != S_OK) goto done; + + if (!(query2 = create_query())) return FALSE; + if ((hr = parse_query( select2W, &query2->view, &query2->mem )) != S_OK) goto done; + if ((hr = execute_view( query2->view )) != S_OK) goto done; + + if (!(ret = heap_alloc_zero( query->view->count * sizeof(*ret) ))) goto done; + + for (i = 0; i < query->view->count; i++) + { + if ((hr = get_propval( query->view, i, pathW, &val, NULL, NULL )) != S_OK) goto done; + if (!(ret[i].ref = heap_strdupW( V_BSTR(&val) ))) goto done; + VariantClear( &val ); + + if ((hr = get_propval( query2->view, i, pathW, &val, NULL, NULL )) != S_OK) goto done; + if (!(ret[i].ref2 = heap_strdupW( V_BSTR(&val) ))) goto done; + VariantClear( &val ); + } + + *count = query->view->count; + +done: + if (!ret) free_assocations( ret, query->view->count ); + free_query( query ); + free_query( query2 ); + return ret; +} + +static enum fill_status fill_diskdrivetodiskpartition( struct table *table, const struct expr *cond ) +{ + struct record_diskdrivetodiskpartition *rec; + UINT i, row = 0, offset = 0, count = 0; + enum fill_status status = FILL_STATUS_UNFILTERED; + struct association *assoc; + + if (!(assoc = get_diskdrivetodiskpartition_pairs( &count ))) return FILL_STATUS_FAILED; + if (!count) + { + free_assocations( assoc, count ); + return FILL_STATUS_UNFILTERED; + } + if (!resize_table( table, count, sizeof(*rec) )) + { + free_assocations( assoc, count ); + return FILL_STATUS_FAILED; + } + + for (i = 0; i < count; i++) + { + rec = (struct record_diskdrivetodiskpartition *)(table->data + offset); + rec->antecedent = assoc[i].ref; + rec->dependent = assoc[i].ref2; + if (!match_row( table, row, cond, &status )) + { + free_row_values( table, row ); + continue; + } + offset += sizeof(*rec); + row++; + } + + heap_free( assoc ); + + 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}; @@ -2615,24 +2731,6 @@ static enum fill_status fill_logicaldisk( struct table *table, const struct expr return status; } -struct association -{ - WCHAR *ref; - WCHAR *ref2; -}; - -static void free_assocations( struct association *assoc, UINT count ) -{ - UINT i; - if (!assoc) return; - for (i = 0; i < count; i++) - { - heap_free( assoc[i].ref ); - heap_free( assoc[i].ref2 ); - } - heap_free( assoc ); -} - static struct association *get_logicaldisktopartition_pairs( UINT *count ) { static const WCHAR pathW[] = @@ -4179,6 +4277,7 @@ static struct table builtin_classes[] = { class_desktopmonitorW, C(col_desktopmonitor), 0, 0, NULL, fill_desktopmonitor }, { class_directoryW, C(col_directory), 0, 0, NULL, fill_directory }, { class_diskdriveW, C(col_diskdrive), 0, 0, NULL, fill_diskdrive }, + { class_diskdrivetodiskpartitionW, C(col_diskdrivetodiskpartition), 0, 0, NULL, fill_diskdrivetodiskpartition }, { class_diskpartitionW, C(col_diskpartition), 0, 0, NULL, fill_diskpartition }, { class_ip4routetableW, C(col_ip4routetable), 0, 0, NULL, fill_ip4routetable }, { class_logicaldiskW, C(col_logicaldisk), 0, 0, NULL, fill_logicaldisk }, diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index 6edb0d0f09..23641fc0d3 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -126,8 +126,11 @@ static void test_select( IWbemServices *services ) static const WCHAR query14[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_', 'L','o','g','i','c','a','l','D','i','s','k','T','o','P','a','r','t','i','t','i','o','n',0}; + static const WCHAR query15[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_', + 'D','i','s','k','D','r','i','v','e','T','o','D','i','s','k','P','a','r','t','i','t','i','o','n',0}; static const WCHAR *test[] = { query1, query2, query3, query4, query5, query6, query7, query8, query9, query10, - query11, query12, query13, query14 }; + query11, query12, query13, query14, query15 }; HRESULT hr; IEnumWbemClassObject *result; BSTR wql = SysAllocString( wqlW );
1
0
0
0
Hans Leidekker : wbemprox: Perform a case insensitive match on path components.
by Alexandre Julliard
10 Sep '19
10 Sep '19
Module: wine Branch: master Commit: ce3a0fc2906fa5cbbbbf1c0ed31ad2c1451e256d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ce3a0fc2906fa5cbbbbf1c0e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 10 17:09:10 2019 +0200 wbemprox: Perform a case insensitive match on path components. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/services.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c index be35c95ec0..0af02a4a1d 100644 --- a/dlls/wbemprox/services.c +++ b/dlls/wbemprox/services.c @@ -338,8 +338,7 @@ static HRESULT parse_path( const WCHAR *str, struct path **ret ) if (*p == '\\') { - static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2'}; - + static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2',0}; WCHAR server[MAX_COMPUTERNAME_LENGTH+1]; DWORD server_len = ARRAY_SIZE(server); @@ -352,8 +351,7 @@ static HRESULT parse_path( const WCHAR *str, struct path **ret ) if (!*p) return WBEM_E_INVALID_OBJECT_PATH; len = p - q; - if (!GetComputerNameW( server, &server_len ) || server_len != len - || memcmp( q, server, server_len * sizeof(WCHAR) )) + if (!GetComputerNameW( server, &server_len ) || server_len != len || wcsnicmp( q, server, server_len )) return WBEM_E_NOT_SUPPORTED; q = ++p; @@ -361,7 +359,7 @@ static HRESULT parse_path( const WCHAR *str, struct path **ret ) if (!*p) return WBEM_E_INVALID_OBJECT_PATH; len = p - q; - if (len != ARRAY_SIZE(cimv2W) || memcmp( q, cimv2W, sizeof(cimv2W) )) + if (len != ARRAY_SIZE(cimv2W) - 1 || wcsnicmp( q, cimv2W, ARRAY_SIZE(cimv2W) - 1 )) return WBEM_E_INVALID_NAMESPACE; p++; }
1
0
0
0
Hans Leidekker : wbemprox: Support evaluating CIM_REFERENCE expressions.
by Alexandre Julliard
10 Sep '19
10 Sep '19
Module: wine Branch: master Commit: 90b0e94b5b363f591896f704bf69bf264390d1c8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=90b0e94b5b363f591896f704…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 10 17:09:09 2019 +0200 wbemprox: Support evaluating CIM_REFERENCE expressions. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/query.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index e00f067e9e..7b194fbabf 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -165,6 +165,35 @@ static HRESULT eval_boolcmp( UINT op, LONGLONG lval, LONGLONG rval, UINT ltype, return S_OK; } +static inline BOOL is_refcmp( const struct complex_expr *expr, UINT ltype, UINT rtype ) +{ + if (ltype == CIM_REFERENCE && expr->left->type == EXPR_PROPVAL && expr->right->type == EXPR_SVAL) return TRUE; + else if (rtype == CIM_REFERENCE && expr->right->type == EXPR_PROPVAL && expr->left->type == EXPR_SVAL) return TRUE; + return FALSE; +} + +static HRESULT eval_refcmp( UINT op, const WCHAR *lstr, const WCHAR *rstr, LONGLONG *val ) +{ + if (!lstr || !rstr) + { + *val = 0; + return S_OK; + } + switch (op) + { + case OP_EQ: + *val = !wcsicmp( lstr, rstr ); + break; + case OP_NE: + *val = wcsicmp( lstr, rstr ); + break; + default: + ERR("unhandled operator %u\n", op); + return WBEM_E_INVALID_QUERY; + } + return S_OK; +} + static UINT resolve_type( UINT left, UINT right ) { switch (left) @@ -200,6 +229,10 @@ static UINT resolve_type( UINT left, UINT right ) if (right == CIM_BOOLEAN) return CIM_BOOLEAN; break; + case CIM_REFERENCE: + if (right == CIM_REFERENCE) return CIM_REFERENCE; + break; + default: break; } @@ -254,9 +287,6 @@ static HRESULT eval_binary( const struct table *table, UINT row, const struct co *type = resolve_type( ltype, rtype ); - if (is_boolcmp( expr, ltype, rtype )) - return eval_boolcmp( expr->op, lval, rval, ltype, rtype, val ); - if (is_strcmp( expr, ltype, rtype )) { const WCHAR *lstr, *rstr; @@ -270,6 +300,15 @@ static HRESULT eval_binary( const struct table *table, UINT row, const struct co return eval_strcmp( expr->op, lstr, rstr, val ); } + if (is_boolcmp( expr, ltype, rtype )) + { + return eval_boolcmp( expr->op, lval, rval, ltype, rtype, val ); + } + if (is_refcmp( expr, ltype, rtype )) + { + return eval_refcmp( expr->op, (const WCHAR *)(INT_PTR)lval, (const WCHAR *)(INT_PTR)rval, val ); + } + switch (expr->op) { case OP_EQ:
1
0
0
0
Hans Leidekker : wbemprox: Strip curly brackets from path strings.
by Alexandre Julliard
10 Sep '19
10 Sep '19
Module: wine Branch: master Commit: 05cb6543b067eb81b1882b5719377d75df1df965 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=05cb6543b067eb81b1882b57…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 10 17:09:08 2019 +0200 wbemprox: Strip curly brackets from path strings. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/wql.y | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/wbemprox/wql.y b/dlls/wbemprox/wql.y index a0a9c7b802..99279149ae 100644 --- a/dlls/wbemprox/wql.y +++ b/dlls/wbemprox/wql.y @@ -103,6 +103,12 @@ static WCHAR *get_path( struct parser *parser, const struct string *str ) int len = str->len; WCHAR *ret; + if (p[0] == '{' && p[len - 1] == '}') + { + p++; + len -= 2; + } + if (!(ret = alloc_mem( parser, (len + 1) * sizeof(WCHAR) ))) return NULL; memcpy( ret, p, len * sizeof(WCHAR) ); ret[len] = 0;
1
0
0
0
Kevin Puetz : objbase.h: Fix StringFromIID declaration.
by Alexandre Julliard
10 Sep '19
10 Sep '19
Module: wine Branch: master Commit: ca455c53765a360b66e8cc079af69f0e709c8655 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ca455c53765a360b66e8cc07…
Author: Kevin Puetz <PuetzKevinA(a)JohnDeere.com> Date: Tue Sep 10 13:50:45 2019 +0200 objbase.h: Fix StringFromIID declaration. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/objbase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/objbase.h b/include/objbase.h index 8af7a80b78..a241b71199 100644 --- a/include/objbase.h +++ b/include/objbase.h @@ -402,7 +402,7 @@ HRESULT WINAPI CLSIDFromProgID(LPCOLESTR progid, LPCLSID riid); HRESULT WINAPI ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *lplpszProgID); INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax); HRESULT WINAPI IIDFromString(LPCOLESTR str, IID *iid); -HRESULT WINAPI StringFromIID(REFIID riid, LPOLESTR str); +HRESULT WINAPI StringFromIID(REFIID riid, LPOLESTR*); /***************************************************************************** * COM Server dll - exports
1
0
0
0
Alexandre Julliard : winegcc: Forward the -B options to winebuild.
by Alexandre Julliard
10 Sep '19
10 Sep '19
Module: wine Branch: master Commit: 13850a3eb8c5792cd75ae4fc32a64552fbf1e032 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=13850a3eb8c5792cd75ae4fc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Sep 10 17:57:19 2019 +0200 winegcc: Forward the -B options to winebuild. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/utils.c | 37 +++++++++++++++++-------------------- tools/winegcc/utils.h | 1 + tools/winegcc/winegcc.c | 18 +++++++++++++----- 3 files changed, 31 insertions(+), 25 deletions(-) diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c index a124ef2d34..3197e46e47 100644 --- a/tools/winegcc/utils.c +++ b/tools/winegcc/utils.c @@ -297,6 +297,22 @@ file_type get_lib_type(enum target_platform platform, strarray* path, const char return file_na; } +const char *find_binary( const strarray* prefix, const char *name ) +{ + unsigned int i; + + if (!prefix) return name; + if (strchr( name, '/' )) return name; + + for (i = 0; i < prefix->size; i++) + { + struct stat st; + char *prog = strmake( "%s/%s%s", prefix->base[i], name, EXEEXT ); + if (stat( prog, &st ) == 0 && S_ISREG( st.st_mode ) && (st.st_mode & 0111)) return prog; + } + return name; +} + int spawn(const strarray* prefix, const strarray* args, int ignore_errors) { unsigned int i; @@ -307,26 +323,7 @@ int spawn(const strarray* prefix, const strarray* args, int ignore_errors) strarray_add(arr, NULL); argv = arr->base; - - if (prefix) - { - const char *p = strrchr(argv[0], '/'); - if (!p) p = argv[0]; - else p++; - - for (i = 0; i < prefix->size; i++) - { - struct stat st; - - free( prog ); - prog = strmake("%s/%s%s", prefix->base[i], p, EXEEXT); - if (stat(prog, &st) == 0 && S_ISREG(st.st_mode) && (st.st_mode & 0111)) - { - argv[0] = prog; - break; - } - } - } + argv[0] = find_binary( prefix, argv[0] ); if (verbose) { diff --git a/tools/winegcc/utils.h b/tools/winegcc/utils.h index 536fb2d2f9..6056ee7258 100644 --- a/tools/winegcc/utils.h +++ b/tools/winegcc/utils.h @@ -83,6 +83,7 @@ void create_file(const char* name, int mode, const char* fmt, ...); file_type get_file_type(const char* filename); file_type get_lib_type(enum target_platform platform, strarray* path, const char *library, const char *suffix, char** file); +const char *find_binary( const strarray* prefix, const char *name ); int spawn(const strarray* prefix, const strarray* arr, int ignore_errors); extern int verbose; diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 9d5828e612..06771262eb 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -300,7 +300,7 @@ static char* get_temp_file(const char* prefix, const char* suffix) return tmp; } -static char* build_tool_name(struct options *opts, const char* base, const char* deflt) +static const char* build_tool_name(struct options *opts, const char* base, const char* deflt) { char* str; @@ -318,12 +318,12 @@ static char* build_tool_name(struct options *opts, const char* base, const char* } else str = xstrdup(deflt); - return str; + return find_binary( opts->prefix, str ); } static const strarray* get_translator(struct options *opts) { - char *str = NULL; + const char *str = NULL; strarray *ret; switch(opts->processor) @@ -342,7 +342,6 @@ static const strarray* get_translator(struct options *opts) assert(0); } ret = strarray_fromstring( str, " " ); - free(str); if (opts->force_pointer_size) strarray_add( ret, strmake("-m%u", 8 * opts->force_pointer_size )); return ret; @@ -847,9 +846,10 @@ static strarray *get_winebuild_args(struct options *opts) { const char* winebuild = getenv("WINEBUILD"); strarray *spec_args = strarray_alloc(); + unsigned int i; if (!winebuild) winebuild = "winebuild"; - strarray_add( spec_args, winebuild ); + strarray_add( spec_args, find_binary( opts->prefix, winebuild )); if (verbose) strarray_add( spec_args, "-v" ); if (keep_generated) strarray_add( spec_args, "--save-temps" ); if (opts->target) @@ -857,6 +857,14 @@ static strarray *get_winebuild_args(struct options *opts) strarray_add( spec_args, "--target" ); strarray_add( spec_args, opts->target ); } + if (opts->prefix) + { + for (i = 0; i < opts->prefix->size; i++) + { + if (strendswith( opts->prefix->base[i], "/tools/winebuild" )) continue; + strarray_add( spec_args, strmake( "-B%s", opts->prefix->base[i] )); + } + } if (!opts->use_msvcrt) strarray_add( spec_args, "-munix" ); if (opts->unwind_tables) strarray_add( spec_args, "-fasynchronous-unwind-tables" ); else strarray_add( spec_args, "-fno-asynchronous-unwind-tables" );
1
0
0
0
Alexandre Julliard : winegcc: Support the --target option like winebuild does.
by Alexandre Julliard
10 Sep '19
10 Sep '19
Module: wine Branch: master Commit: ab871dc4d8e4ae0aa897142305800803a6623b16 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ab871dc4d8e4ae0aa8971423…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Sep 10 12:14:30 2019 +0200 winegcc: Support the --target option like winebuild does. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 7 +++++++ tools/winegcc/winegcc.man.in | 3 +++ 2 files changed, 10 insertions(+) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index db46cf6d5d..9d5828e612 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -1429,6 +1429,7 @@ int main(int argc, char **argv) case '-': next_is_arg = (strcmp("--param", argv[i]) == 0 || strcmp("--sysroot", argv[i]) == 0 || + strcmp("--target", argv[i]) == 0 || strcmp("--lib-suffix", argv[i]) == 0); break; } @@ -1656,6 +1657,12 @@ int main(int argc, char **argv) else opts.sysroot = argv[i + 1]; if (opts.wine_objdir) raw_compiler_arg = raw_linker_arg = 0; } + else if (!strncmp("--target", argv[i], 8)) + { + if (argv[i][8] == '=') parse_target_option( &opts, argv[i] + 9 ); + else parse_target_option( &opts, argv[i + 1] ); + raw_compiler_arg = raw_linker_arg = 0; + } else if (!strncmp("--lib-suffix", argv[i], 12) && opts.wine_objdir) { if (argv[i][12] == '=') opts.lib_suffix = argv[i] + 13; diff --git a/tools/winegcc/winegcc.man.in b/tools/winegcc/winegcc.man.in index 5bbb2fd58f..3fcd6f95f3 100644 --- a/tools/winegcc/winegcc.man.in +++ b/tools/winegcc/winegcc.man.in @@ -35,6 +35,9 @@ enters a special mode for building Wine itself. Developers should avoid prefixes ending with the magic suffix, or if that is not possible, simply express it differently, such as '/tools/winebuild/', to avoid the special behaviour. +.IP "\fB-b,--target \fItarget\fR" +Specify the target architecture triplet for cross-compiling. winegcc +will then invoke \fItarget\fR-gcc instead of gcc. .IP \fB-fno-short-wchar\fR Override the underlying type for wchar_t to be the default for the target, instead of using short unsigned int, which is the default
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
63
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Results per page:
10
25
50
100
200