On Mon, Apr 22, 2013 at 7:43 AM, Zdenek Styblik
<[email protected]> wrote:
> On Fri, Mar 22, 2013 at 1:17 AM, Dan Gora <[email protected]> wrote:
>> Format the records a little more clearly by adding offsets.
>>
>
> Please, can you post output of proposed change? I'm not convinced
> removing '\t' is good idea since there seem to be no other delimiters
> in code that follows. It seems to me output is going to be something
Is \n not a delimiter? I suggest that you actually apply the patch
and read it again.
>``Type: 0x0A\n0x0F:''
This is what it does... Please read the code:
>> + if (!(i % 8))
>> + printf("\n0x%02x: ", i);
> Also, having '\n\n' seems to be redundant. Is it really necessary to
> have two empty lines?
There is one empty line.. The first \n is a carriage return for the
end of the last line of output. The second gives you one empty line
dan
>
> Thanks,
> Z.
>
>> Signed-off-by: Dan Gora <[email protected]>
>> ---
>> ipmitool/lib/ipmi_ekanalyzer.c | 10 ++++++----
>> 1 files changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/ipmitool/lib/ipmi_ekanalyzer.c b/ipmitool/lib/ipmi_ekanalyzer.c
>> index 2da4650..34b6cb6 100644
>> --- a/ipmitool/lib/ipmi_ekanalyzer.c
>> +++ b/ipmitool/lib/ipmi_ekanalyzer.c
>> @@ -3987,12 +3987,14 @@ ipmi_ekanalyzer_fru_file2structure( char * filename,
>> (*list_record)->header.len);
>> if ( verbose > 1 ) {
>> int i;
>> - printf("Type: %02x\t", (*list_record)->header.type);
>> + printf("Type: %02x", (*list_record)->header.type);
>> for ( i = 0; i < ( (*list_record)->header.len ); i++
>> ){
>> - printf("0x%04x: %02x\t",
>> - i, (*list_record)->data[i]);
>> + if (!(i % 8))
>> + printf("\n0x%02x: ", i);
>> + printf("%02x ",
>> + (*list_record)->data[i]);
>> }
>> - printf("\n");
>> + printf("\n\n");
>> }
>> ipmi_ek_add_record2list ( list_record, list_head, list_last
>> );
>> /*mask the 8th bits to see if it is the last record*/
>> --
>> 1.7.7
>>
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_mar
>> _______________________________________________
>> Ipmitool-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/ipmitool-devel
--
Dan Gora
Software Engineer
Adax, Inc.
Av Dona Maria Alves, 1070 Casa 5
Centro
Ubatuba, SP
CEP 11680-000
Brasil
Tel: +55 (12) 3833-1021 (Brazil and outside of US)
: +1 (510) 859-4801 (Inside of US)
: dan_gora (Skype)
email: [email protected]
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Ipmitool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel