On Fri, Mar 21, 2003 at 07:36:12PM +0000, Alan Cox wrote:
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.65/drivers/ide/pci/siimage.c linux-2.5.65-ac2/drivers/ide/pci/siimage.c
> --- linux-2.5.65/drivers/ide/pci/siimage.c 2003-03-03 19:20:09.000000000 +0000
> +++ linux-2.5.65-ac2/drivers/ide/pci/siimage.c 2003-03-06 23:35:51.000000000 +0000
> @@ -55,6 +55,7 @@
> static int siimage_get_info (char *buffer, char **addr, off_t offset, int count)
> {
> char *p = buffer;
> + int len;
> u16 i;
>
> p += sprintf(p, "\n");
> @@ -62,7 +63,11 @@
> struct pci_dev *dev = siimage_devs[i];
> p = print_siimage_get_info(p, dev, i);
> }
> - return p-buffer; /* => must be less than 4k! */
> + /* p - buffer must be less than 4k! */
> + len = (p - buffer) - offset;
> + *addr = buffer + offset;
> +
> + return len > count ? count : len;
Shouldn't this just move to the seq_file interface? (probably the "simple"
variant)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:40 EST