Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MojitOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
MojitOS
Commits
1812f02f
Commit
1812f02f
authored
3 years ago
by
Georges Da Costa
Browse files
Options
Downloads
Patches
Plain Diff
Corrects -i X crash when no infiniband network is available
parent
846ac415
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
infiniband.c
+6
-0
6 additions, 0 deletions
infiniband.c
infiniband.h
+1
-0
1 addition, 0 deletions
infiniband.h
mojitos.c
+8
-2
8 additions, 2 deletions
mojitos.c
with
15 additions
and
2 deletions
infiniband.c
+
6
−
0
View file @
1812f02f
...
...
@@ -66,3 +66,9 @@ unsigned int init_infiniband(char* infi_path, void**ptr) {
return
4
;
}
char
*
_labels_infiniband
[
4
]
=
{
"irxp"
,
"irxb"
,
"itxp"
,
"itxb"
};
void
label_infiniband
(
char
**
labels
,
void
*
none
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
labels
[
i
]
=
_labels_infiniband
[
i
];
}
This diff is collapsed.
Click to expand it.
infiniband.h
+
1
−
0
View file @
1812f02f
...
...
@@ -19,3 +19,4 @@
*******************************************************/
unsigned
int
init_infiniband
(
char
*
infi_path
,
void
**
ptr
);
void
label_infiniband
(
char
**
labels
,
void
*
);
This diff is collapsed.
Click to expand it.
mojitos.c
+
8
−
2
View file @
1812f02f
...
...
@@ -81,11 +81,17 @@ void add_source(initializer_t init, char* arg, labeler_t labeler,
getter_t
get
,
cleaner_t
clean
)
{
nb_sources
++
;
states
=
realloc
(
states
,
nb_sources
*
sizeof
(
void
*
));
int
nb
=
init
(
arg
,
&
states
[
nb_sources
-
1
]);
if
(
nb
==
0
)
{
nb_sources
--
;
states
=
realloc
(
states
,
nb_sources
*
sizeof
(
void
*
));
return
;
}
getter
=
realloc
(
getter
,
nb_sources
*
sizeof
(
void
*
));
getter
[
nb_sources
-
1
]
=
get
;
cleaner
=
realloc
(
cleaner
,
nb_sources
*
sizeof
(
void
*
));
cleaner
[
nb_sources
-
1
]
=
clean
;
int
nb
=
init
(
arg
,
&
states
[
nb_sources
-
1
]);
labels
=
realloc
(
labels
,
(
nb_sensors
+
nb
)
*
sizeof
(
char
*
));
labeler
(
labels
+
nb_sensors
,
states
[
nb_sources
-
1
]);
...
...
@@ -128,7 +134,7 @@ int main(int argc, char **argv) {
add_source
(
init_network
,
argv
[
optind
],
label_network
,
get_network
,
clean_network
);
break
;
case
'i'
:
add_source
(
init_infiniband
,
argv
[
optind
],
label_
network
,
get_network
,
clean_network
);
add_source
(
init_infiniband
,
argv
[
optind
],
label_
infiniband
,
get_network
,
clean_network
);
break
;
case
'o'
:
output
=
fopen
(
argv
[
optind
],
"wb"
);
...
...
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