Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6c1ac026
Commit
6c1ac026
authored
Oct 02, 2006
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineboot: Win64 printf format warning fixes.
parent
8302f073
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
26 deletions
+25
-26
Makefile.in
programs/wineboot/Makefile.in
+0
-1
shutdown.c
programs/wineboot/shutdown.c
+4
-4
wineboot.c
programs/wineboot/wineboot.c
+21
-21
No files found.
programs/wineboot/Makefile.in
View file @
6c1ac026
...
...
@@ -5,7 +5,6 @@ VPATH = @srcdir@
MODULE
=
wineboot.exe
APPMODE
=
-mconsole
IMPORTS
=
version user32 advapi32 kernel32
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
C_SRCS
=
\
shutdown.c
\
...
...
programs/wineboot/shutdown.c
View file @
6c1ac026
...
...
@@ -94,7 +94,7 @@ static DWORD_PTR send_end_session_messages( struct window_info *win, UINT count,
{
if
(
SendMessageTimeoutW
(
win
[
i
].
hwnd
,
WM_QUERYENDSESSION
,
0
,
0
,
flags
,
0
,
&
result
))
{
WINE_TRACE
(
"sent MW_QUERYENDSESSION hwnd %p pid %04
l
x result %ld
\n
"
,
WINE_TRACE
(
"sent MW_QUERYENDSESSION hwnd %p pid %04x result %ld
\n
"
,
win
[
i
].
hwnd
,
win
[
i
].
pid
,
result
);
ret
=
result
;
}
...
...
@@ -104,7 +104,7 @@ static DWORD_PTR send_end_session_messages( struct window_info *win, UINT count,
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
!
win
[
i
].
hwnd
)
continue
;
WINE_TRACE
(
"sending WM_ENDSESSION hwnd %p pid %04
l
x wp %ld
\n
"
,
win
[
i
].
hwnd
,
win
[
i
].
pid
,
ret
);
WINE_TRACE
(
"sending WM_ENDSESSION hwnd %p pid %04x wp %ld
\n
"
,
win
[
i
].
hwnd
,
win
[
i
].
pid
,
ret
);
SendMessageTimeoutW
(
win
[
i
].
hwnd
,
WM_ENDSESSION
,
ret
,
0
,
flags
,
0
,
&
result
);
}
...
...
@@ -113,7 +113,7 @@ static DWORD_PTR send_end_session_messages( struct window_info *win, UINT count,
HANDLE
handle
=
OpenProcess
(
PROCESS_TERMINATE
,
FALSE
,
win
[
0
].
pid
);
if
(
handle
)
{
WINE_TRACE
(
"terminating process %04
l
x
\n
"
,
win
[
0
].
pid
);
WINE_TRACE
(
"terminating process %04x
\n
"
,
win
[
0
].
pid
);
TerminateProcess
(
handle
,
0
);
CloseHandle
(
handle
);
}
...
...
@@ -168,7 +168,7 @@ void kill_processes( BOOL kill_desktop )
{
if
(
process
.
th32ProcessID
==
GetCurrentProcessId
())
continue
;
if
(
process
.
th32ProcessID
==
desktop_pid
)
continue
;
WINE_TRACE
(
"killing process %04
l
x %s
\n
"
,
WINE_TRACE
(
"killing process %04x %s
\n
"
,
process
.
th32ProcessID
,
wine_dbgstr_w
(
process
.
szExeFile
)
);
if
(
!
(
handle
=
OpenProcess
(
PROCESS_TERMINATE
,
FALSE
,
process
.
th32ProcessID
)))
continue
;
...
...
programs/wineboot/wineboot.c
View file @
6c1ac026
...
...
@@ -134,7 +134,7 @@ static BOOL wininit(void)
return
TRUE
;
}
WINE_ERR
(
"There was an error in reading wininit.ini file - %
l
d
\n
"
,
WINE_ERR
(
"There was an error in reading wininit.ini file - %d
\n
"
,
GetLastError
()
);
return
FALSE
;
...
...
@@ -191,7 +191,7 @@ static BOOL wininit(void)
if
(
!
MoveFileExA
(
RENAME_FILE
,
RENAME_FILE_TO
,
MOVEFILE_REPLACE_EXISTING
)
)
{
WINE_ERR
(
"Couldn't rename wininit.ini, error %
l
d
\n
"
,
GetLastError
()
);
WINE_ERR
(
"Couldn't rename wininit.ini, error %d
\n
"
,
GetLastError
()
);
return
FALSE
;
}
...
...
@@ -226,7 +226,7 @@ static BOOL pendingRename(void)
}
else
{
WINE_ERR
(
"Couldn't open key, error %
l
d
\n
"
,
res
);
WINE_ERR
(
"Couldn't open key, error %d
\n
"
,
res
);
res
=
FALSE
;
}
...
...
@@ -246,7 +246,7 @@ static BOOL pendingRename(void)
if
(
res
!=
ERROR_SUCCESS
)
{
WINE_ERR
(
"Couldn't query value's length (%
l
d)
\n
"
,
res
);
WINE_ERR
(
"Couldn't query value's length (%d)
\n
"
,
res
);
res
=
FALSE
;
goto
end
;
}
...
...
@@ -254,7 +254,7 @@ static BOOL pendingRename(void)
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dataLength
);
if
(
buffer
==
NULL
)
{
WINE_ERR
(
"Couldn't allocate %
l
u bytes for the value
\n
"
,
dataLength
);
WINE_ERR
(
"Couldn't allocate %u bytes for the value
\n
"
,
dataLength
);
res
=
FALSE
;
goto
end
;
}
...
...
@@ -262,7 +262,7 @@ static BOOL pendingRename(void)
res
=
RegQueryValueExW
(
hSession
,
ValueName
,
NULL
,
NULL
,
(
LPBYTE
)
buffer
,
&
dataLength
);
if
(
res
!=
ERROR_SUCCESS
)
{
WINE_ERR
(
"Couldn't query value after successfully querying before (%
l
u),
\n
"
WINE_ERR
(
"Couldn't query value after successfully querying before (%u),
\n
"
"please report to wine-devel@winehq.org
\n
"
,
res
);
res
=
FALSE
;
goto
end
;
...
...
@@ -322,14 +322,14 @@ static BOOL pendingRename(void)
}
}
else
{
WINE_ERR
(
"couldn't get file attributes (%
l
d)
\n
"
,
GetLastError
()
);
WINE_ERR
(
"couldn't get file attributes (%d)
\n
"
,
GetLastError
()
);
}
}
}
if
((
res
=
RegDeleteValueW
(
hSession
,
ValueName
))
!=
ERROR_SUCCESS
)
{
WINE_ERR
(
"Error deleting the value (%
l
u)
\n
"
,
GetLastError
()
);
WINE_ERR
(
"Error deleting the value (%u)
\n
"
,
GetLastError
()
);
res
=
FALSE
;
}
else
res
=
TRUE
;
...
...
@@ -385,7 +385,7 @@ static DWORD runCmd(LPWSTR cmdline, LPCWSTR dir, BOOL wait, BOOL minimized)
if
(
!
CreateProcessW
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
dir
,
&
si
,
&
info
)
)
{
WINE_ERR
(
"Failed to run command %s (%
l
d)
\n
"
,
wine_dbgstr_w
(
cmdline
),
WINE_ERR
(
"Failed to run command %s (%d)
\n
"
,
wine_dbgstr_w
(
cmdline
),
GetLastError
()
);
return
INVALID_RUNCMD_RETURN
;
...
...
@@ -433,7 +433,7 @@ static BOOL ProcessRunKeys( HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
if
(
(
res
=
RegOpenKeyExW
(
hkRoot
,
WINKEY_NAME
,
0
,
KEY_READ
,
&
hkWin
))
!=
ERROR_SUCCESS
)
{
WINE_ERR
(
"RegOpenKey failed on Software
\\
Microsoft
\\
Windows
\\
CurrentVersion (%
l
d)
\n
"
,
WINE_ERR
(
"RegOpenKey failed on Software
\\
Microsoft
\\
Windows
\\
CurrentVersion (%d)
\n
"
,
res
);
goto
end
;
...
...
@@ -449,7 +449,7 @@ static BOOL ProcessRunKeys( HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
res
=
ERROR_SUCCESS
;
}
else
WINE_ERR
(
"RegOpenKey failed on run key (%
l
d)
\n
"
,
res
);
WINE_ERR
(
"RegOpenKey failed on run key (%d)
\n
"
,
res
);
goto
end
;
}
...
...
@@ -457,7 +457,7 @@ static BOOL ProcessRunKeys( HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
if
(
(
res
=
RegQueryInfoKeyW
(
hkRun
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
&
i
,
&
nMaxValue
,
&
nMaxCmdLine
,
NULL
,
NULL
))
!=
ERROR_SUCCESS
)
{
WINE_ERR
(
"Couldn't query key info (%
l
d)
\n
"
,
res
);
WINE_ERR
(
"Couldn't query key info (%d)
\n
"
,
res
);
goto
end
;
}
...
...
@@ -496,29 +496,29 @@ static BOOL ProcessRunKeys( HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
if
(
(
res
=
RegEnumValueW
(
hkRun
,
i
,
szValue
,
&
nValLength
,
0
,
&
type
,
(
LPBYTE
)
szCmdLine
,
&
nDataLength
))
!=
ERROR_SUCCESS
)
{
WINE_ERR
(
"Couldn't read in value %
ld - %l
d
\n
"
,
i
,
res
);
WINE_ERR
(
"Couldn't read in value %
d - %
d
\n
"
,
i
,
res
);
continue
;
}
if
(
bDelete
&&
(
res
=
RegDeleteValueW
(
hkRun
,
szValue
))
!=
ERROR_SUCCESS
)
{
WINE_ERR
(
"Couldn't delete value - %
ld, %l
d. Running command anyways.
\n
"
,
i
,
res
);
WINE_ERR
(
"Couldn't delete value - %
d, %
d. Running command anyways.
\n
"
,
i
,
res
);
}
if
(
type
!=
REG_SZ
)
{
WINE_ERR
(
"Incorrect type of value #%
ld (%l
d)
\n
"
,
i
,
type
);
WINE_ERR
(
"Incorrect type of value #%
d (%
d)
\n
"
,
i
,
type
);
continue
;
}
if
(
(
res
=
runCmd
(
szCmdLine
,
NULL
,
bSynchronous
,
FALSE
))
==
INVALID_RUNCMD_RETURN
)
{
WINE_ERR
(
"Error running cmd #%
ld (%l
d)
\n
"
,
i
,
GetLastError
()
);
WINE_ERR
(
"Error running cmd #%
d (%
d)
\n
"
,
i
,
GetLastError
()
);
}
WINE_TRACE
(
"Done processing cmd #%
l
d
\n
"
,
i
);
WINE_TRACE
(
"Done processing cmd #%d
\n
"
,
i
);
}
res
=
ERROR_SUCCESS
;
...
...
@@ -606,7 +606,7 @@ static int ProcessWindowsFileProtection(void)
(
LPSTR
)
dllcache
,
targetpath
,
currentpath
,
tempfile
,
&
sz
);
if
(
rc
!=
ERROR_SUCCESS
)
{
WINE_ERR
(
"WFP: %s error 0x%
l
x
\n
"
,
finddata
.
cFileName
,
rc
);
WINE_ERR
(
"WFP: %s error 0x%x
\n
"
,
finddata
.
cFileName
,
rc
);
DeleteFile
(
tempfile
);
}
find_rc
=
FindNextFile
(
find_handle
,
&
finddata
);
...
...
@@ -666,7 +666,7 @@ int main( int argc, char *argv[] )
if
(
res
==
0
)
{
WINE_ERR
(
"Couldn't get the windows directory - error %
l
d
\n
"
,
WINE_ERR
(
"Couldn't get the windows directory - error %d
\n
"
,
GetLastError
()
);
return
100
;
...
...
@@ -674,14 +674,14 @@ int main( int argc, char *argv[] )
if
(
res
>=
sizeof
(
gen_path
)
)
{
WINE_ERR
(
"Windows path too long (%
l
d)
\n
"
,
res
);
WINE_ERR
(
"Windows path too long (%d)
\n
"
,
res
);
return
100
;
}
if
(
!
SetCurrentDirectory
(
gen_path
)
)
{
WINE_ERR
(
"Cannot set the dir to %s (%
l
d)
\n
"
,
gen_path
,
GetLastError
()
);
WINE_ERR
(
"Cannot set the dir to %s (%d)
\n
"
,
gen_path
,
GetLastError
()
);
return
100
;
}
...
...
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