Hi, Thanks for the suggestions. There is already an enumeration of the error codes given in the iscsi_if.h. The #defines cannot use the same names, but it can be done with slightly different names. So I shall modify the following things in the code - 1. #define the error messages and use those 2. Make the variable err_table[] as static const char *err_table[] inside the function err_code_to_string().
Is there anything else I should do? Regards, Aastha. On 2 September 2011 12:15, Ulrich Windl <[email protected]>wrote: > >>> Aastha Mehta <[email protected]> schrieb am 31.08.2011 um 18:57 in > Nachricht > <CAEx9m44_UGavmNQ-Z8gdutsk-ZRSFZ+nKeBG+YGSK=vxdnn...@mail.gmail.com>: > > Hello, > > > > Attached is the patch for the first kernel TODO item in the TODO list > > circulated earlier. I could not send the patch through git send-email, so > > have attached it here. > > Hi! > > Why not having "char *err_table[NUM_ERRORS]" > > as a "static" variable inside char *err_code_to_string(int code)? Also why > not use "const char *err_table[...]"? > > Did you also try "git diff --check" before commit? You have at least one > "white space only" diff (utils/fwparam_ibft/prom_lex.c). > > I also wonder whether it wouldn't amke more sense to have #defines like > #define ISCSI_OK "ISCSI_OK: iscsi ok" > > and use them for err_table like this: > > const char *err_table[NUM_ERRORS] = { > ISCSI_OK, > ... > }; > > Regards, > Ulrich > > > > > > Thanks, > > Aastha. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "open-iscsi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/open-iscsi?hl=en. > > -- Aastha Mehta B.E. (Hons.) Computer Science BITS Pilani E-mail: [email protected] -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.
