All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Randolph Chung" <randolph@tausq.org>
To: parisc-linux@parisc-linux.org
Subject: [parisc-linux] confused about kernel printk behavior...
Date: Fri, 2 Mar 2001 19:08:48 -0700	[thread overview]
Message-ID: <20010302190848.U27829@tausq.org> (raw)

I have a function like this in a char driver:

static ssize_t stabledev_read(struct file *file, char *buf, size_t count,
	loff_t *ppos)
{
	char *kbuf;
	unsigned int size = 0;

	printk("stabledev_read: pos = %ld, count = %d\n", *ppos, count);
	printk("stabledev_read: pos = %ld\n", *ppos);
	printk("stabledev_read: count = %d\n", count);
	/* ... */
}

for some reason, the output i get from the above is:
stabledev_read: pos = 20536, count = 0
stabledev_read: pos = 1
stabledev_read: count = 4096

why is that?  this is a 32-bit kernel built using xc-20010215

randolph
-- 
   @..@                                         http://www.TauSq.org/
  (----)
 ( >__< )
 ^^ ~~ ^^

             reply	other threads:[~2001-03-03  2:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-03  2:08 Randolph Chung [this message]
2001-03-04 11:39 ` [parisc-linux] confused about kernel printk behavior Alan Modra

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=20010302190848.U27829@tausq.org \
    --to=randolph@tausq.org \
    --cc=parisc-linux@parisc-linux.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.