[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gpfsug-discuss
Subject:    [gpfsug-discuss] =?utf-8?Q?=E2=80=94subblocks-per-full-block_?=in 5.0.1
From:       Barry Evans <bevans () pixitmedia ! com>
Date:       2018-05-17 13:41:57
Message-ID: c3e437d8-874d-4ae5-a2fa-724000a2184a () Spark
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Slight wonkiness in mmcrfs script that spits this out —subblocks-per-full-block as \
an invalid option.

No worky:

      777             subblocks-per-full-block )
      778                if [[ -z $optArg ]]
      779                then
      780                   # The expected argument is not in the same string as its
      781                   # option name.   Get it from the next token.
      782                   eval optArg="\${$OPTIND}"
      783                   [[ -z $optArg ]] &&   \
      784                      syntaxError "missingValue" $noUsageMsg "--$optName_lc"
      785                   shift 1
      786                fi
      787                [[ -n $subblocksPerFullBlockOpt ]] &&   \
      788                   syntaxError "multiple" $noUsageMsg "--$optName_lc"
      789                subblocksPerFullBlockOpt="--$optName_lc"
      790
      791                nSubblocksArg=$(checkIntRange --subblocks-per-full-block \
$optArg 32 8192)  792                [[ $? -ne 0 ]] && syntaxError nomsg $noUsageMsg
      793                tscrfsParms="$tscrfsParms --subblocks-per-full-block \
$nSubblocksArg"  794                ;;

Worky:


      777             subblocks-per-full-block )
      778                if [[ -z $optArg ]]
      779                then
      780                   # The expected argument is not in the same string as its
      781                   # option name.   Get it from the next token.
      782                   eval optArg="\${$OPTIND}"
      783                   [[ -z $optArg ]] &&   \
      784                      syntaxError "missingValue" $noUsageMsg "--$optName_lc"
      785                   shift 1
      786                fi
      787                #[[ -n $subblocksPerFullBlockOpt ]] &&   \
      788                [[ -n $nSubblocksArg   ]] &&   \
      789                   syntaxError "multiple" $noUsageMsg "--$optName_lc"
      790                #subblocksPerFullBlockOpt="--$optName_lc"
      791                nSubblocksArg="--$optName_lc"
      792
      793                nSubblocksArg=$(checkIntRange --subblocks-per-full-block \
$optArg 32 8192)  794                [[ $? -ne 0 ]] && syntaxError nomsg $noUsageMsg
      795                tscrfsParms="$tscrfsParms --subblocks-per-full-block \
$nSubblocksArg"  796                ;;

Looks like someone got halfway through the variable change "subblocksPerFullBlockOpt" \
is referenced elsewhere in the script:

if [[ -z $forceOption ]]
then
   [[ -n $fflag ]] &&   \
      syntaxError "invalidOption" $usageMsg "$fflag"
   [[ -n $subblocksPerFullBlockOpt ]] &&   \
      syntaxError "invalidOption" $usageMsg "$subblocksPerFullBlockOpt"
fi

...so this is probably naughty on my behalf.



Kind Regards,
Barry Evans
CTO/Co-Founder
Pixit Media Ltd
+44 7950 666 248
bevans@pixitmedia.com



-- 
 <http://pixitmedia.com>
This email is confidential in that it is intended 
for the exclusive attention of the addressee(s) indicated. If you are not 
the intended recipient, this email should not be read or disclosed to any 
other person. Please notify the sender immediately and delete this email 
from your computer system. Any opinions expressed are not necessarily those 
of the company from which this email was sent and, whilst to the best of 
our knowledge no viruses or defects exist, no responsibility can be 
accepted for any loss or damage arising from its receipt or subsequent use 
of this email.


[Attachment #5 (text/html)]

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, \
BlinkMacSystemFont, sans-serif;">Slight wonkiness in mmcrfs script that spits this \
out —subblocks-per-full-block as an invalid option. <div><br /></div>
<div>No worky:<br />
<div><br /></div>
<div>
<div><font face="Courier">&#160; &#160; 777 &#160; &#160; &#160; &#160; \
subblocks-per-full-block )</font></div> <div><font face="Courier">&#160; &#160; 778 \
&#160; &#160; &#160; &#160; &#160; if [[ -z $optArg ]]</font></div> <div><font \
face="Courier">&#160; &#160; 779 &#160; &#160; &#160; &#160; &#160; then</font></div> \
<div><font face="Courier">&#160; &#160; 780 &#160; &#160; &#160; &#160; &#160; &#160; \
# The expected argument is not in the same string as its</font></div> <div><font \
face="Courier">&#160; &#160; 781 &#160; &#160; &#160; &#160; &#160; &#160; # option \
name. &#160;Get it from the next token.</font></div> <div><font face="Courier">&#160; \
&#160; 782 &#160; &#160; &#160; &#160; &#160; &#160; eval \
optArg="\${$OPTIND}"</font></div> <div><font face="Courier">&#160; &#160; 783 &#160; \
&#160; &#160; &#160; &#160; &#160; [[ -z $optArg ]] &amp;&amp; &#160;\</font></div> \
<div><font face="Courier">&#160; &#160; 784 &#160; &#160; &#160; &#160; &#160; &#160; \
&#160; syntaxError "missingValue" $noUsageMsg "--$optName_lc"</font></div> <div><font \
face="Courier">&#160; &#160; 785 &#160; &#160; &#160; &#160; &#160; &#160; shift \
1</font></div> <div><font face="Courier">&#160; &#160; 786 &#160; &#160; &#160; \
&#160; &#160; fi</font></div> <div><font face="Courier">&#160; &#160; 787 &#160; \
&#160; &#160; &#160; &#160; [[ -n $subblocksPerFullBlockOpt ]] &amp;&amp; \
&#160;\</font></div> <div><font face="Courier">&#160; &#160; 788 &#160; &#160; &#160; \
&#160; &#160; &#160; syntaxError "multiple" $noUsageMsg "--$optName_lc"</font></div> \
<div><font face="Courier">&#160; &#160; 789 &#160; &#160; &#160; &#160; &#160; \
subblocksPerFullBlockOpt="--$optName_lc"</font></div> <div><font \
face="Courier">&#160; &#160; 790</font></div> <div><font face="Courier">&#160; &#160; \
791 &#160; &#160; &#160; &#160; &#160; nSubblocksArg=$(checkIntRange \
--subblocks-per-full-block $optArg 32 8192)</font></div> <div><font \
face="Courier">&#160; &#160; 792 &#160; &#160; &#160; &#160; &#160; [[ $? -ne 0 ]] \
&amp;&amp; syntaxError nomsg $noUsageMsg</font></div> <div><font \
face="Courier">&#160; &#160; 793 &#160; &#160; &#160; &#160; &#160; \
tscrfsParms="$tscrfsParms --subblocks-per-full-block $nSubblocksArg"</font></div> \
<div><font face="Courier">&#160; &#160; 794 &#160; &#160; &#160; &#160; &#160; \
;;</font></div> </div>
</div>
<div><br /></div>
<div>Worky:</div>
<div><br /></div>
<div><br /></div>
<div>
<div><font face="Courier">&#160; &#160; 777 &#160; &#160; &#160; &#160; \
subblocks-per-full-block )</font></div> <div><font face="Courier">&#160; &#160; 778 \
&#160; &#160; &#160; &#160; &#160; if [[ -z $optArg ]]</font></div> <div><font \
face="Courier">&#160; &#160; 779 &#160; &#160; &#160; &#160; &#160; then</font></div> \
<div><font face="Courier">&#160; &#160; 780 &#160; &#160; &#160; &#160; &#160; &#160; \
# The expected argument is not in the same string as its</font></div> <div><font \
face="Courier">&#160; &#160; 781 &#160; &#160; &#160; &#160; &#160; &#160; # option \
name. &#160;Get it from the next token.</font></div> <div><font face="Courier">&#160; \
&#160; 782 &#160; &#160; &#160; &#160; &#160; &#160; eval \
optArg="\${$OPTIND}"</font></div> <div><font face="Courier">&#160; &#160; 783 &#160; \
&#160; &#160; &#160; &#160; &#160; [[ -z $optArg ]] &amp;&amp; &#160;\</font></div> \
<div><font face="Courier">&#160; &#160; 784 &#160; &#160; &#160; &#160; &#160; &#160; \
&#160; syntaxError "missingValue" $noUsageMsg "--$optName_lc"</font></div> <div><font \
face="Courier">&#160; &#160; 785 &#160; &#160; &#160; &#160; &#160; &#160; shift \
1</font></div> <div><font face="Courier">&#160; &#160; 786 &#160; &#160; &#160; \
&#160; &#160; fi</font></div> <div><font face="Courier">&#160; &#160; 787 &#160; \
&#160; &#160; &#160; &#160; #[[ -n $subblocksPerFullBlockOpt ]] &amp;&amp; \
&#160;\</font></div> <div><font face="Courier">&#160; &#160; 788 &#160; &#160; &#160; \
&#160; &#160; [[ -n $nSubblocksArg &#160;]] &amp;&amp; &#160;\</font></div> \
<div><font face="Courier">&#160; &#160; 789 &#160; &#160; &#160; &#160; &#160; &#160; \
syntaxError "multiple" $noUsageMsg "--$optName_lc"</font></div> <div><font \
face="Courier">&#160; &#160; 790 &#160; &#160; &#160; &#160; &#160; \
#subblocksPerFullBlockOpt="--$optName_lc"</font></div> <div><font \
face="Courier">&#160; &#160; 791 &#160; &#160; &#160; &#160; &#160; \
nSubblocksArg="--$optName_lc"</font></div> <div><font face="Courier">&#160; &#160; \
792</font></div> <div><font face="Courier">&#160; &#160; 793 &#160; &#160; &#160; \
&#160; &#160; nSubblocksArg=$(checkIntRange --subblocks-per-full-block $optArg 32 \
8192)</font></div> <div><font face="Courier">&#160; &#160; 794 &#160; &#160; &#160; \
&#160; &#160; [[ $? -ne 0 ]] &amp;&amp; syntaxError nomsg $noUsageMsg</font></div> \
<div><font face="Courier">&#160; &#160; 795 &#160; &#160; &#160; &#160; &#160; \
tscrfsParms="$tscrfsParms --subblocks-per-full-block $nSubblocksArg"</font></div> \
<div><font face="Courier">&#160; &#160; 796 &#160; &#160; &#160; &#160; &#160; \
;;</font></div> </div>
<div><br /></div>
<div>Looks like someone got halfway through the variable change "<span \
style="font-family: Courier;">subblocksPerFullBlockOpt"&#160;</span><font \
face="Arial">is referenced elsewhere in the script:</font></div> <div><font \
face="Arial"><br /></font></div> <div>
<div><font face="Courier">if [[ -z $forceOption ]]</font></div>
<div><font face="Courier">then</font></div>
<div><font face="Courier">&#160; [[ -n $fflag ]] &amp;&amp; &#160;\</font></div>
<div><font face="Courier">&#160; &#160; syntaxError "invalidOption" $usageMsg \
"$fflag"</font></div> <div><font face="Courier">&#160; [[ -n \
$subblocksPerFullBlockOpt ]] &amp;&amp; &#160;\</font></div> <div><font \
face="Courier">&#160; &#160; syntaxError "invalidOption" $usageMsg \
"$subblocksPerFullBlockOpt"</font></div> <div><font face="Courier">fi</font></div>
</div>
<div><br /></div>
<div><font face="Arial">...so this is probably naughty on my behalf.</font></div>
<div><span style="font-family: Courier;"><br /></span></div>
<div><span style="font-family: Courier;"><br /></span></div>
</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: \
-apple-system, BlinkMacSystemFont, sans-serif;"><br /> Kind Regards,
<div>Barry Evans</div>
<div>CTO/Co-Founder</div>
<div>Pixit Media Ltd</div>
<div>+44 7950 666 248</div>
<div>bevans@pixitmedia.com</div>
<div><br /></div>
<div><br /></div>
</div>
</body>
</html>

<br>
<div><a href="http://pixitmedia.com" target="_blank"><img \
src="http://pixitmedia.com/sig/sig-bve2018.jpg"></a><font face="Arial, Helvetica, \
sans-serif" size="1"><br>This email is confidential in that it is intended for the \
exclusive attention of the addressee(s) indicated. If you are not the intended \
recipient, this email should not be read or disclosed to any other person. Please \
notify the sender immediately and delete this email from your computer system. Any \
opinions expressed are not necessarily those of the company from which this email was \
sent and, whilst to the best of our knowledge no viruses or defects exist, no \
responsibility can be accepted for any loss or damage arising from its receipt or \
subsequent use of this email.</font></div>



_______________________________________________
gpfsug-discuss mailing list
gpfsug-discuss at spectrumscale.org
http://gpfsug.org/mailman/listinfo/gpfsug-discuss


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic