From: Andreas Schwab <schwab@suse.de>
To: Michael Buesch <fsdeveloper@yahoo.de>
Cc: "lode leroy" <lode_leroy@hotmail.com>,
linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: 2.5.70 lockup while write()ing to /dev/hda1
Date: Wed, 06 Aug 2003 15:38:43 +0200 [thread overview]
Message-ID: <jehe4ux5wc.fsf@sykes.suse.de> (raw)
In-Reply-To: <200308061447.46364.fsdeveloper@yahoo.de> (Michael Buesch's message of "Wed, 6 Aug 2003 14:47:33 +0200")
Michael Buesch <fsdeveloper@yahoo.de> writes:
|> On Wednesday 06 August 2003 14:32, lode leroy wrote:
|> > main()
|> > {
|> > int f = open("/dev/hda1", O_RDWR);
|> > char buffer[8192];
|> > for(i=0;1;i++) {
|> > printf("%d\r", i);
|> > write(f, buffer, sizeof(buffer);
|>
|> Shouldn't this be:
|> write(f, buffer, sizeof(buffer) / sizeof(buffer[0]));
sizeof(char) == 1, always and everywhere.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2003-08-06 13:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-06 12:32 lode leroy
2003-08-06 12:47 ` Michael Buesch
2003-08-06 13:38 ` Andreas Schwab [this message]
2003-08-06 13:05 ` Felipe Alfaro Solana
2003-08-06 14:50 lode leroy
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=jehe4ux5wc.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=fsdeveloper@yahoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lode_leroy@hotmail.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®