Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Simple PCIe FMC carrier SPEC - Software
Commits
908086b0
Commit
908086b0
authored
Sep 26, 2012
by
Grzegorz Daniluk
Committed by
Alessandro Rubini
Sep 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: detect when user runs without superuser rights and inform him instead of segfault
parent
d69145e6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
8 deletions
+14
-8
spec-cl.c
tools/spec-cl.c
+2
-2
spec-fwloader.c
tools/spec-fwloader.c
+2
-2
spec-vuart.c
tools/spec-vuart.c
+2
-2
speclib.c
tools/speclib.c
+6
-0
specmem.c
tools/specmem.c
+2
-2
No files found.
tools/spec-cl.c
View file @
908086b0
...
...
@@ -52,8 +52,8 @@ int main(int argc, char **argv)
if
(
!
card
)
{
fprintf
(
stderr
,
"%s: Can't detect a SPEC card under the given "
"adress.
\n
Make sure a SPEC card is present in your PC "
"
and the driver is loaded
.
\n
"
,
argv
[
0
]);
"adress.
\n
Make sure a SPEC card is present in your PC
,
"
"
the driver is loaded and you run the program as root
.
\n
"
,
argv
[
0
]);
exit
(
1
);
}
...
...
tools/spec-fwloader.c
View file @
908086b0
...
...
@@ -43,8 +43,8 @@ int main(int argc, char **argv)
if
(
!
card
)
{
fprintf
(
stderr
,
"Can't detect a SPEC card under the given "
"adress.
Make sure a SPEC card is present in your PC
"
"
and the driver is loaded
.
\n
"
);
"adress.
\n
Make sure a SPEC card is present in your PC,
"
"
the driver is loaded and you run the program as root
.
\n
"
);
exit
(
1
);
}
...
...
tools/spec-vuart.c
View file @
908086b0
...
...
@@ -122,8 +122,8 @@ int main(int argc, char **argv)
if
(
!
card
)
{
fprintf
(
stderr
,
"Can't detect a SPEC card under the given "
"adress.
Make sure a SPEC card is present in your PC
"
"
and the driver is loaded
.
\n
"
);
"adress.
\n
Make sure a SPEC card is present in your PC,
"
"
the driver is loaded and you run the program as root
.
\n
"
);
exit
(
1
);
}
...
...
tools/speclib.c
View file @
908086b0
...
...
@@ -104,6 +104,12 @@ void *spec_open(int bus, int dev)
card
->
bar0
=
spec_map_area
(
bus
,
dev
,
BASE_BAR0
,
0x100000
);
card
->
bar4
=
spec_map_area
(
bus
,
dev
,
BASE_BAR4
,
0x1000
);
if
(
!
card
->
bar0
&&
!
card
->
bar4
)
{
free
(
card
);
card
=
NULL
;
}
return
card
;
}
...
...
tools/specmem.c
View file @
908086b0
...
...
@@ -78,8 +78,8 @@ int main(int argc, char **argv)
if
(
!
card
)
{
fprintf
(
stderr
,
"Can't detect a SPEC card under the given "
"adress. Make sure a SPEC card is present in your PC "
"
and the driver is loaded
.
\n
"
);
"adress. Make sure a SPEC card is present in your PC
,
"
"
the driver is loaded and you run the program as root
.
\n
"
);
exit
(
1
);
}
...
...
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