int kstrtol ( const char * s,
unsigned int base,
long * res);
Can someone advise me on whether I need to allocate memory for long * res
before invoking this kernel API method? I couldn't find a clear answer online.
TIA
Vinod
yes, the res should point a allocated memory, for example: long value; const char *buf; .... .... kstrtol(buf, 10, &value);