Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
e3-require
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Lindh Olsson
e3-require
Commits
5581962e
Commit
5581962e
authored
9 years ago
by
Dirk Zimoch
Browse files
Options
Downloads
Patches
Plain Diff
minor fixes
parent
46f403f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
postModuleLoad.cmd
+1
-1
1 addition, 1 deletion
postModuleLoad.cmd
require.c
+11
-18
11 additions, 18 deletions
require.c
with
12 additions
and
19 deletions
postModuleLoad.cmd
+
1
−
1
View file @
5581962e
dbLoadRecords
(
"$(require_DIR)
/
db/moduleversion.template"
,
"IOC=$(IOC),MODULE=$(MODULE),VERSION=$($(MODULE)_VERSION=)"
dbLoadRecords
(
"$(require_DIR)db/moduleversion.template"
,
"IOC=$(IOC),MODULE=$(MODULE),VERSION=$($(MODULE)_VERSION=)"
This diff is collapsed.
Click to expand it.
require.c
+
11
−
18
View file @
5581962e
...
...
@@ -264,13 +264,19 @@ static int runLoadScript(const char* script, const char* module, const char* ver
return
0
;
}
static
void
setupDbPath
(
const
char
*
module
,
const
char
*
dbdir
)
static
int
setupDbPath
(
const
char
*
module
,
const
char
*
dbdir
)
{
char
*
old_path
;
char
*
p
;
size_t
len
;
char
*
absdir
=
realpath
(
dbdir
,
NULL
);
/* so we can change directory later safely */
if
(
absdir
==
NULL
)
{
if
(
requireDebug
)
printf
(
"require: cannot resolve %s
\n
"
,
dbdir
);
return
-
1
;
}
len
=
strlen
(
absdir
);
if
(
requireDebug
)
...
...
@@ -320,6 +326,7 @@ static void setupDbPath(const char* module, const char* dbdir)
absdir
,
old_path
);
}
free
(
absdir
);
return
0
;
}
static
void
registerModule
(
const
char
*
module
,
const
char
*
version
,
const
char
*
location
)
...
...
@@ -1322,30 +1329,16 @@ loadlib:
if
(
requireDebug
)
printf
(
"require: looking for template directory
\n
"
);
/* filename = "<dirname>/[dirlen]<module>/<version>/R<epicsRelease>/[releasediroffs]..." */
if
(
TRY_FILE
(
releasediroffs
,
TEMPLATEDIR
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
TEMPLATEDIR
))
{
setupDbPath
(
module
,
filename
);
}
else
if
(
!
((
TRY_FILE
(
releasediroffs
,
TEMPLATEDIR
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
TEMPLATEDIR
))
&&
setupDbPath
(
module
,
filename
)))
{
/* if no template directory found, restore TEMPLATES to initial value */
char
*
t
;
t
=
getenv
(
"TEMPLATES"
);
if
(
globalTemplates
&&
(
!
t
||
strcmp
(
globalTemplates
,
t
)
!=
0
))
putenvprintf
(
"TEMPLATES=%s"
,
globalTemplates
);
}
#define SETUP_PATH(NAME, args...) \
if (TRY_FILE(releasediroffs, args)) \
{ \
putenvprintf("%s_" #NAME "=%s", module, filename); \
putenvprintf(#NAME "=%s", filename); \
}\
else \
{ \
putenvprintf(#NAME "=."); \
}
if
(
loaded
&&
args
==
NULL
)
return
0
;
/* no need to execute startup script twice if not with new arguments */
/* load startup script */
...
...
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