Commit ca4a6985 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] ppc64: Fix rtas file mess

This does the seq_file conversion + annotation + cleanup + race fixes
for arch/ppc64/kernel/rtas-proc.c.

How the fuck did that file manage to get anywhere near the tree, anyway?
Take a look at guy's "implementation" of sprintf(buf, "%04d", num), for
example:

<vomit>
	/* construct the sensor number like 0003 */
	/* fill with zeros */
	n = sprintf(tmp, "%d", s.token);
	len = strlen(tmp);
	while (strlen(tmp) < 4)
		n += sprintf (tmp+n, "0");

	/* invert the string */
	while (tmp[i]) {
		if (i<len)
			tmp2[4-len+i] = tmp[i];
		else
			tmp2[3-i] = tmp[i];
		i++;
	}
	tmp2[4] = '\0';
</vomit>

And it's full of that level of lusing ;-/
parent b5a68cfc
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment