Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a2545727
Commit
a2545727
authored
Nov 17, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Return the machine ID for Win32_ComputerSystemProduct.UUID on Linux.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9842bf33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
builtin.c
dlls/wbemprox/builtin.c
+28
-0
No files found.
dlls/wbemprox/builtin.c
View file @
a2545727
...
...
@@ -22,6 +22,7 @@
#include "config.h"
#include <stdarg.h>
#include <fcntl.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
...
...
@@ -1346,6 +1347,33 @@ static WCHAR *get_compsysproduct_uuid(void)
return
ret
;
}
#endif
#ifdef __linux__
int
file
;
if
((
file
=
open
(
"/var/lib/dbus/machine-id"
,
O_RDONLY
))
!=
-
1
)
{
unsigned
char
buf
[
32
];
if
(
read
(
file
,
buf
,
sizeof
(
buf
)
)
==
sizeof
(
buf
))
{
unsigned
int
i
,
j
;
WCHAR
*
ret
,
*
p
;
close
(
file
);
if
(
!
(
p
=
ret
=
heap_alloc
(
37
*
sizeof
(
WCHAR
)
)))
return
NULL
;
for
(
i
=
0
,
j
=
0
;
i
<
8
;
i
++
)
p
[
i
]
=
toupperW
(
buf
[
j
++
]
);
p
[
8
]
=
'-'
;
for
(
i
=
9
;
i
<
13
;
i
++
)
p
[
i
]
=
toupperW
(
buf
[
j
++
]
);
p
[
13
]
=
'-'
;
for
(
i
=
14
;
i
<
18
;
i
++
)
p
[
i
]
=
toupperW
(
buf
[
j
++
]
);
p
[
18
]
=
'-'
;
for
(
i
=
19
;
i
<
23
;
i
++
)
p
[
i
]
=
toupperW
(
buf
[
j
++
]
);
p
[
23
]
=
'-'
;
for
(
i
=
24
;
i
<
36
;
i
++
)
p
[
i
]
=
toupperW
(
buf
[
j
++
]
);
ret
[
i
]
=
0
;
return
ret
;
}
close
(
file
);
}
#endif
return
heap_strdupW
(
compsysproduct_uuidW
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment