Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
steam-runtime-tools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steamrt
steam-runtime-tools
Commits
3f6a14ed
Commit
3f6a14ed
authored
5 years ago
by
Simon McVittie
Browse files
Options
Downloads
Patches
Plain Diff
system-info: Remove debug printfs
Signed-off-by:
Simon McVittie
<
smcv@collabora.com
>
parent
5ea5b2cc
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!27
Enhance examples/system-info.c to show libraries and uinput capabilities
Pipeline
#1348
passed
5 years ago
Stage: build
Stage: autopkgtest
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/system-info.c
+4
-6
4 additions, 6 deletions
examples/system-info.c
with
4 additions
and
6 deletions
examples/system-info.c
+
4
−
6
View file @
3f6a14ed
...
@@ -121,7 +121,7 @@ usage (int code)
...
@@ -121,7 +121,7 @@ usage (int code)
}
}
static
FILE
*
static
FILE
*
divert_stdout_to_stderr
(
GError
*
error
)
divert_stdout_to_stderr
(
GError
*
*
error
)
{
{
int
original_stdout_fd
;
int
original_stdout_fd
;
FILE
*
original_stdout
;
FILE
*
original_stdout
;
...
@@ -134,7 +134,7 @@ divert_stdout_to_stderr (GError *error)
...
@@ -134,7 +134,7 @@ divert_stdout_to_stderr (GError *error)
{
{
int
saved_errno
=
errno
;
int
saved_errno
=
errno
;
g_set_error
(
&
error
,
G_FILE_ERROR
,
g_file_error_from_errno
(
saved_errno
),
g_set_error
(
error
,
G_FILE_ERROR
,
g_file_error_from_errno
(
saved_errno
),
"Unable to duplicate fd %d: %s"
,
"Unable to duplicate fd %d: %s"
,
STDOUT_FILENO
,
g_strerror
(
saved_errno
));
STDOUT_FILENO
,
g_strerror
(
saved_errno
));
return
NULL
;
return
NULL
;
...
@@ -147,7 +147,7 @@ divert_stdout_to_stderr (GError *error)
...
@@ -147,7 +147,7 @@ divert_stdout_to_stderr (GError *error)
int
saved_errno
=
errno
;
int
saved_errno
=
errno
;
close
(
original_stdout_fd
);
close
(
original_stdout_fd
);
g_set_error
(
&
error
,
G_FILE_ERROR
,
g_file_error_from_errno
(
saved_errno
),
g_set_error
(
error
,
G_FILE_ERROR
,
g_file_error_from_errno
(
saved_errno
),
"Unable to make fd %d a copy of fd %d: %s"
,
"Unable to make fd %d a copy of fd %d: %s"
,
STDOUT_FILENO
,
STDERR_FILENO
,
g_strerror
(
saved_errno
));
STDOUT_FILENO
,
STDERR_FILENO
,
g_strerror
(
saved_errno
));
return
NULL
;
return
NULL
;
...
@@ -161,7 +161,7 @@ divert_stdout_to_stderr (GError *error)
...
@@ -161,7 +161,7 @@ divert_stdout_to_stderr (GError *error)
int
saved_errno
=
errno
;
int
saved_errno
=
errno
;
close
(
original_stdout_fd
);
close
(
original_stdout_fd
);
g_set_error
(
&
error
,
G_FILE_ERROR
,
g_file_error_from_errno
(
saved_errno
),
g_set_error
(
error
,
G_FILE_ERROR
,
g_file_error_from_errno
(
saved_errno
),
"Unable to create a stdio wrapper for fd %d: %s"
,
"Unable to create a stdio wrapper for fd %d: %s"
,
original_stdout_fd
,
g_strerror
(
saved_errno
));
original_stdout_fd
,
g_strerror
(
saved_errno
));
return
NULL
;
return
NULL
;
...
@@ -273,13 +273,11 @@ main (int argc,
...
@@ -273,13 +273,11 @@ main (int argc,
break
;
break
;
case
OPTION_HELP
:
case
OPTION_HELP
:
printf
(
"HELP
\n
"
);
usage
(
0
);
usage
(
0
);
break
;
break
;
case
'?'
:
case
'?'
:
default:
default:
printf
(
"DEFAULT
\n
"
);
usage
(
1
);
usage
(
1
);
break
;
/* not reached */
break
;
/* not reached */
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment