Re: 'black list' in drivers/block/ide_modes.h is broken

H. Peter Anvin (
29 Apr 1997 22:33:00 GMT

Followup to: <>
By author: Michal Jankowski <>
In newsgroup:
> The offending line of code is:
> if (strncmp(p->name, model, strlen(p->name)) == 0)
> No, I don't know what the proper fix might be 8-)

Is "model" null-terminated? If so, that should be:

strcmp(p->name, model)

Otherwise, you need to have the length of the "model" through some
other means, and should do:

if ( strlen(p->name) == model_len && strncmp(...


Always looking for a few good BOsFH.  **  Linux - the OS of global cooperation
        I am Baha'i -- ask me about it or see