Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
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
Container Registry
Harbor 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
dCache
cta
Commits
c9157709
Commit
c9157709
authored
11 years ago
by
Steven Murray
Committed by
Steven Murray
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some bugs in the rmc client library so that the unittests now pass.
parent
bcccbd8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mediachanger/castorrmc/rmc/rmc_get_acs_drive_id.c
+4
-7
4 additions, 7 deletions
mediachanger/castorrmc/rmc/rmc_get_acs_drive_id.c
with
4 additions
and
7 deletions
mediachanger/castorrmc/rmc/rmc_get_acs_drive_id.c
+
4
−
7
View file @
c9157709
...
...
@@ -36,7 +36,6 @@
static
int
rmc_buf2uint
(
const
char
*
const
buf
,
int
buflen
)
{
int
i
=
0
;
int
value
=
0
;
int
multipler
=
1
;
/* Fail conversion if there is nothing to convert */
if
(
NULL
==
buf
||
0
==
buflen
)
{
...
...
@@ -50,10 +49,8 @@ static int rmc_buf2uint(const char *const buf, int buflen) {
if
(
c
<
'0'
||
c
>
'9'
)
{
return
-
1
;
}
value
*=
multipler
;
value
*=
10
;
value
+=
(
c
-
'0'
);
multipler
*=
10
;
}
return
value
;
}
...
...
@@ -107,11 +104,11 @@ int rmc_get_acs_drive_id(const char *const drive,
/* Try to convert the 4 drive id numbers to integers */
drive_id
->
acs
=
rmc_buf2uint
(
drive
+
commaIndex
[
0
]
+
1
,
commaIndex
[
1
]
-
commaIndex
[
0
]);
commaIndex
[
1
]
-
commaIndex
[
0
]
-
1
);
drive_id
->
lsm
=
rmc_buf2uint
(
drive
+
commaIndex
[
1
]
+
1
,
commaIndex
[
2
]
-
commaIndex
[
1
]);
commaIndex
[
2
]
-
commaIndex
[
1
]
-
1
);
drive_id
->
panel
=
rmc_buf2uint
(
drive
+
commaIndex
[
2
]
+
1
,
commaIndex
[
3
]
-
commaIndex
[
2
]);
commaIndex
[
3
]
-
commaIndex
[
2
]
-
1
);
drive_id
->
transport
=
rmc_buf2uint
(
drive
+
commaIndex
[
3
]
+
1
,
str_len
-
1
-
commaIndex
[
3
]);
...
...
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