Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
8dc80224
Commit
8dc80224
authored
May 16, 2020
by
houkime
Committed by
Esteban Blanc
Nov 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make rt_mh_util honor TMPDIR
parent
15d0f244
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
src/lib/rt/src/rt_mh_util.c
src/lib/rt/src/rt_mh_util.c
+11
-3
No files found.
src/lib/rt/src/rt_mh_util.c
View file @
8dc80224
...
@@ -52,7 +52,8 @@
...
@@ -52,7 +52,8 @@
/* Local definitions */
/* Local definitions */
#define SEM_NAME "/tmp/pwr_mh_sem_"
#define DEF_TMPDIR "/tmp/"
#define SEM_NAME "pwr_mh_sem_"
static
sem_t
*
sem
=
(
sem_t
*
)
-
1
;
static
sem_t
*
sem
=
(
sem_t
*
)
-
1
;
/* Local function prototypes */
/* Local function prototypes */
...
@@ -61,14 +62,21 @@ static pwr_tStatus sendMessage(qcom_sQid*, mh_sHead*);
...
@@ -61,14 +62,21 @@ static pwr_tStatus sendMessage(qcom_sQid*, mh_sHead*);
static
char
*
SemName
()
static
char
*
SemName
()
{
{
static
char
id
[
32
];
static
pwr_tFileName
id
;
static
char
*
tmpdir
=
NULL
;
static
char
*
str
=
NULL
;
static
char
*
str
=
NULL
;
if
(
str
==
NULL
)
{
if
(
str
==
NULL
)
{
if
((
str
=
getenv
(
pwr_dEnvBusId
))
==
NULL
)
if
((
str
=
getenv
(
pwr_dEnvBusId
))
==
NULL
)
return
NULL
;
return
NULL
;
if
((
tmpdir
=
getenv
(
"TMPDIR"
))
==
NULL
)
tmpdir
=
DEF_TMPDIR
;
sprintf
(
sprintf
(
id
,
"%s%.*s"
,
SEM_NAME
,
(
int
)(
sizeof
(
id
)
-
strlen
(
SEM_NAME
)
-
1
),
str
);
id
,
"%s/%s%.*s"
,
tmpdir
,
SEM_NAME
,
(
int
)(
sizeof
(
id
)
-
strlen
(
SEM_NAME
)
-
strlen
(
tmpdir
)
-
2
),
str
);
str
=
id
;
str
=
id
;
}
}
return
str
;
return
str
;
...
...
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