Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cta
CTA
Commits
307933ff
Commit
307933ff
authored
Dec 01, 2022
by
Joao Afonso
Browse files
Enforcing uppercase VID on cta-tape-label
parent
00d72c8d
Pipeline
#4837959
failed with stages
in 43 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tapeserver/tapelabel/TapeLabelCmdLineArgs.cpp
View file @
307933ff
...
...
@@ -59,9 +59,12 @@ TapeLabelCmdLineArgs::TapeLabelCmdLineArgs(const int argc, char *const *const ar
exception
::
CommandLineNotParsed
ex
;
ex
.
getMessage
()
<<
"The -"
<<
(
char
)
opt
<<
" option too big"
;
throw
ex
;
}
else
{
m_vid
=
std
::
string
(
optarg
);
utils
::
toUpper
(
m_vid
);
}
m_vid
=
std
::
string
(
optarg
);
if
(
!
utils
::
isUpper
(
m_vid
))
{
exception
::
CommandLineNotParsed
ex
;
ex
.
getMessage
()
<<
"The -"
<<
(
char
)
opt
<<
" option must only contain uppercase alphanumeric characters"
;
throw
ex
;
}
break
;
case
'o'
:
...
...
@@ -69,9 +72,12 @@ TapeLabelCmdLineArgs::TapeLabelCmdLineArgs(const int argc, char *const *const ar
exception
::
CommandLineNotParsed
ex
;
ex
.
getMessage
()
<<
"The -"
<<
(
char
)
opt
<<
" option too big"
;
throw
ex
;
}
else
{
m_oldLabel
=
std
::
string
(
optarg
);
utils
::
toUpper
(
m_oldLabel
);
}
m_oldLabel
=
std
::
string
(
optarg
);
if
(
!
utils
::
isUpper
(
m_vid
))
{
exception
::
CommandLineNotParsed
ex
;
ex
.
getMessage
()
<<
"The -"
<<
(
char
)
opt
<<
" option must only contain uppercase alphanumeric characters"
;
throw
ex
;
}
break
;
case
't'
:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment