lkml.org 
[lkml]   [2008]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] DMI: add dmi_match
On Tue,  9 Dec 2008 21:52:27 +0100
Jiri Slaby <jirislaby@gmail.com> wrote:

>
> +/**
> + * dmi_match - compare string to the dmi field (if exists)
> + *
> + * Returns true if requested field equals to str (including NULL).
> + */

Forgot to document the arguments. If you think it matters. (I don't).

> +static inline bool dmi_match(enum dmi_field f, const char *str)
> +{
> + const char *info = dmi_get_system_info(f);
> +
> + if (info == NULL || str == NULL)
> + return info == str;
> +
> + return !strcmp(info, str);
> +}
> +

I suspect we'd have thinner kernel if this wasn't inlined.


\
 
 \ /
  Last update: 2008-12-11 21:33    [W:0.061 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site