mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Buesch <fsdeveloper@yahoo.de>
To: "lode leroy" <lode_leroy@hotmail.com>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: 2.5.70 lockup while write()ing to /dev/hda1
Date: Wed, 6 Aug 2003 14:47:33 +0200	[thread overview]
Message-ID: <200308061447.46364.fsdeveloper@yahoo.de> (raw)
In-Reply-To: <Sea2-F12XkCBewSQRg600027013@hotmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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]));

And what are you thying to do with the code?

>        /* fsync(f); */
>     }
>     close(f)
> }

- -- 
Regards Michael Buesch  [ http://www.8ung.at/tuxsoft ]
Penguin on this machine:  Linux 2.6.0-test2 - i386

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/MPjvoxoigfggmSgRAkhNAJ40TUOftJfk/wa+g6B6gFiRSEdsNwCeJ/Tc
YH8xVddWCQZzozFNlIxT14o=
=x0ge
-----END PGP SIGNATURE-----


  reply	other threads:[~2003-08-06 12:47 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 [this message]
2003-08-06 13:38   ` Andreas Schwab
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=200308061447.46364.fsdeveloper@yahoo.de \
    --to=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®