Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven Gestegård Robertz
LabComm
Commits
ee278550
Commit
ee278550
authored
Apr 16, 2014
by
Tommy Olofsson
Browse files
Options
Downloads
Patches
Plain Diff
Cleaned up error reporting in decoder.
parent
53336f6b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/c/labcomm_decoder.c
+4
-6
4 additions, 6 deletions
lib/c/labcomm_decoder.c
lib/c/labcomm_error.c
+1
-1
1 addition, 1 deletion
lib/c/labcomm_error.c
with
5 additions
and
7 deletions
lib/c/labcomm_decoder.c
+
4
−
6
View file @
ee278550
...
...
@@ -202,9 +202,8 @@ static int decode_typedef_or_sample(struct labcomm_decoder *d, int kind)
LABCOMM_IOCTL_WRITER_GET_BYTES_WRITTEN
,
&
signature
.
size
);
if
(
err
<
0
)
{
printf
(
"Failed to get size: %s
\n
"
,
strerror
(
-
err
));
/* labcomm_error_fatal_global(LABCOMM_ERROR_BAD_WRITER, */
/* "Failed to get size: %s\n", strerror(-err)); */
d
->
on_error
(
LABCOMM_ERROR_BAD_WRITER
,
2
,
"Failed to get size: %s
\n
"
,
strerror
(
-
err
));
result
=
-
ENOENT
;
goto
free_signature_name
;
}
...
...
@@ -212,9 +211,8 @@ static int decode_typedef_or_sample(struct labcomm_decoder *d, int kind)
LABCOMM_IOCTL_WRITER_GET_BYTE_POINTER
,
&
signature
.
signature
);
if
(
err
<
0
)
{
printf
(
"Failed to get pointer: %s
\n
"
,
strerror
(
-
err
));
/* labcomm_error_fatal_global(LABCOMM_ERROR_BAD_WRITER, */
/* "Failed to get pointer: %s\n", strerror(-err)); */
d
->
on_error
(
LABCOMM_ERROR_BAD_WRITER
,
2
,
"Failed to get pointer: %s
\n
"
,
strerror
(
-
err
));
result
=
-
ENOENT
;
goto
free_signature_name
;
}
...
...
This diff is collapsed.
Click to expand it.
lib/c/labcomm_error.c
+
1
−
1
View file @
ee278550
...
...
@@ -27,6 +27,6 @@ void labcomm_error_fatal_global(enum labcomm_error error,
char
*
format
,
...)
{
printf
(
"Fatal error %d
\n
"
,
error
);
f
printf
(
stderr
,
"Fatal error %d
\n
"
,
error
);
exit
(
1
);
}
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