mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: PATCH: fix proc handling in sis, siimageand slc90e66
Date: Sat, 22 Mar 2003 07:49:11 +0000	[thread overview]
Message-ID: <20030322074911.A24305@infradead.org> (raw)
In-Reply-To: <200303211936.h2LJaCK7025824@hraefn.swansea.linux.org.uk>; from alan@lxorguk.ukuu.org.uk on Fri, Mar 21, 2003 at 07:36:12PM +0000

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)


  reply	other threads:[~2003-03-22  7:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-21 19:36 Alan Cox
2003-03-22  7:49 ` Christoph Hellwig [this message]
2003-03-22 15:03   ` Alan Cox
2003-03-22 14:15     ` Christoph Hellwig
2003-03-22 17:34       ` Randy.Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030322074911.A24305@infradead.org \
    --to=hch@infradead.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®