Re: [PATCH v4 6/7] watchdog: pretimeout: add option to select a pretimeout governor in runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +static struct governor_priv *find_governor_by_name(const char *gov_name)
> +{
> +	struct governor_priv *priv;
> +
> +	list_for_each_entry(priv, &governor_list, entry)
> +		if (!strncmp(gov_name, priv->gov->name,

strncmp forces to use 'echo -n' in userspace which can cause confusion
when if '-n' is forgotten. The cpufreq code pre-parses the buffer with
sscanf() to eliminate the terminating newline. There is also
sysfs_streq() which seems the a tad better solution to me.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux