HDPARM broken in trunk

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

HDPARM broken in trunk

kryptonite
Checked the HDPARM script in trunk. Looks like its broken

Runs into 03587245: value too great for base (error token is "03587245")

This is because the below is part of the new code

                BUFFERED_SUM=$((0$BUFFERED_SUM + 0$BUFFERED))

OLD code had the below , there is an extra 0 which ends up with an error mentioned above  

                BUFFERED_SUM=$(($BUFFERED_SUM + $BUFFERED))

Reply | Threaded
Open this post in threaded view
|

Re: HDPARM broken in trunk

Mikhail Yakshin
Administrator
> Checked the HDPARM script in trunk. Looks like its broken
>
> Runs into 03587245: value too great for base (error token is "03587245")
>
> This is because the below is part of the new code
>
>                 BUFFERED_SUM=$((0$BUFFERED_SUM + 0$BUFFERED))
>
> OLD code had the below , there is an extra 0 which ends up with an error
> mentioned above
>
>                 BUFFERED_SUM=$(($BUFFERED_SUM + $BUFFERED))

Wow, it's truly epic. This one was changed in r1740 by gvy, probably
in attempt of handling error cases when do strings could be matched
from hdparm output. I'll try to fix it asap, thanks.

--
WBR, Mikhail Yakshin

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
inq-discuss-en mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inq-discuss-en
Reply | Threaded
Open this post in threaded view
|

Re: HDPARM broken in trunk

Mikhail Yakshin
Administrator
Hi,

>> Checked the HDPARM script in trunk. Looks like its broken
>>
>> Runs into 03587245: value too great for base (error token is "03587245")

> Wow, it's truly epic. This one was changed in r1740 by gvy, probably
> in attempt of handling error cases when do strings could be matched
> from hdparm output. I'll try to fix it asap, thanks.

I've commited a fix - please check if it works for you?

--
WBR, Mikhail Yakshin

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
inq-discuss-en mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inq-discuss-en
Reply | Threaded
Open this post in threaded view
|

Re: HDPARM broken in trunk

Michael Shigorin
In reply to this post by Mikhail Yakshin
On Tue, Jul 10, 2012 at 06:34:42PM +0400, Mikhail Yakshin wrote:
> >                 BUFFERED_SUM=$((0$BUFFERED_SUM + 0$BUFFERED))
> >                 BUFFERED_SUM=$(($BUFFERED_SUM + $BUFFERED))
> Wow, it's truly epic. This one was changed in r1740 by gvy,
> probably in attempt of handling error cases when do strings
> could be matched from hdparm output.  I'll try to fix it asap,
> thanks.

Sorry for the trouble, IIRC I was catching an empty string
in expression either in that script or thereabouts.

Octal shame on me :-/

--
 ---- WBR, Michael Shigorin <[hidden email]>
  ------ Linux.Kiev http://www.linux.kiev.ua/

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
inq-discuss-en mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inq-discuss-en