[lkml]   [2002]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectsscanf()/vsscanf() isn't able to handle Hex digits

I'm using kernel 2.4.18-pre9.

I want to parse a mac adress within a kernel module. I want to
use int sscanf(const char *buf, const char *fmt, ...) .

This function is located in /usr/src/linux/lib/vsprintf.c .

Mac addresses like 6f:6f:7f:9a:10:11 are parsed correctly,
fd:23:22:fd:df:77 fails.

The reason is located in vsprintf.c line 640:

if (!*str || !isdigit(*str))

I think isxdigit(*str) might be better here.

May the source be with you!
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:24    [W:0.023 / U:11.776 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site