Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
552c0bc3
Commit
552c0bc3
authored
Jun 05, 2019
by
Benoit Rat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time-wrs: improving error message in case mmap fail
parent
53f668f2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
wrs-time.c
time-wrs/wrs-time.c
+5
-0
No files found.
time-wrs/wrs-time.c
View file @
552c0bc3
...
...
@@ -340,9 +340,14 @@ static int wrdate_get(struct pp_time *t)
fd
=
open
(
WRS_RTS_DEVNAME
,
O_RDWR
|
O_SYNC
);
if
(
fd
<
0
)
{
fprintf
(
stderr
,
"ppsi: %s: %s
\n
"
,
WRS_RTS_DEVNAME
,
strerror
(
errno
));
return
-
1
;
}
mapaddr
=
mmap
(
0
,
4096
,
PROT_READ
,
MAP_SHARED
,
fd
,
WRS_RTS_BASE_ADDR
);
if
(
mapaddr
==
MAP_FAILED
)
{
fprintf
(
stderr
,
"ppsi: mmap(%s) @x%x: %s
\n
"
,
WRS_RTS_DEVNAME
,
WRS_RTS_BASE_ADDR
,
strerror
(
errno
));
return
-
1
;
}
pps
=
mapaddr
+
WRS_RTS_PPSG_OFFSET
;
...
...
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