Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
f45c02a0
Commit
f45c02a0
authored
20 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Open plugins with names having "lib" prefix as needed on AIX.
parent
003c3759
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/plugrack.c
+17
-3
17 additions, 3 deletions
src/common/plugrack.c
with
17 additions
and
3 deletions
src/common/plugrack.c
+
17
−
3
View file @
f45c02a0
...
...
@@ -120,6 +120,7 @@ struct _plugrack {
#define PLUGRACK_UID_NOBODY 99
/* RedHat's, anyway. */
static
bool
_match_major
(
const
char
*
path_name
,
const
char
*
major_type
);
static
int
_plugrack_read_single_dir
(
plugrack_t
rack
,
char
*
dir
);
static
bool
_so_file
(
char
*
pathname
);
...
...
@@ -540,9 +541,8 @@ _plugrack_read_single_dir( plugrack_t rack, char *dir )
* to avoid having some program try to open a
* plugin designed for a different program and
* discovering undefined symbols */
if
(
rack
->
major_type
&&
strncmp
(
rack
->
major_type
,
e
->
d_name
,
strlen
(
rack
->
major_type
)
)
)
if
((
rack
->
major_type
)
&&
(
!
_match_major
(
e
->
d_name
,
rack
->
major_type
)))
continue
;
/* See if we should be paranoid about this file. */
...
...
@@ -598,6 +598,20 @@ _so_file ( char *file_name )
return
false
;
}
/* Return TRUE of the specified major_type is a prefix of the shared object
* pathname (i.e. either "<major_name>..." or "lib<major_name>...") */
static
bool
_match_major
(
const
char
*
path_name
,
const
char
*
major_type
)
{
char
*
head
=
(
char
*
)
path_name
;
if
(
strncmp
(
head
,
"lib"
,
3
)
==
0
)
head
+=
3
;
if
(
strncmp
(
head
,
major_type
,
strlen
(
major_type
)))
return
FALSE
;
return
TRUE
;
}
int
plugrack_read_cache
(
plugrack_t
rack
,
const
char
*
cache_file
)
...
...
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