public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.20-pre11 /proc/partitions read
@ 2002-10-22 14:19 Jan Kasprzak
  2002-10-22 15:10 ` Richard B. Johnson
  2002-10-22 18:40 ` Andries Brouwer
  0 siblings, 2 replies; 15+ messages in thread
From: Jan Kasprzak @ 2002-10-22 14:19 UTC (permalink / raw)
  To: linux-kernel

	Hello, world!\n

	while trying to figure out why my "vgchange -a y" sometimes works
and sometimes does not, I've come to the following problem:

# dd if=/proc/partitions bs=512|wc -l
1+1 records in
1+1 records out
     12

# dd if=/proc/partitions bs=128k|wc -l
0+1 records in
0+1 records out
     32


	I.e. if you read the /proc/partitions in single read() call,
it gets read OK. However, if you read() with smaller-sized blocks,
you get the truncated contents.

	Are applications expected to read the whole /proc file
in one read()?

-Yenya

-- 
| Jan "Yenya" Kasprzak  <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839      Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/   Czech Linux Homepage: http://www.linux.cz/ |
|-- If you start doing things because you hate others and want to screw  --|
|-- them over the end result is bad.   --Linus Torvalds to the BBC News  --|

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2002-10-23  9:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-22 14:19 2.4.20-pre11 /proc/partitions read Jan Kasprzak
2002-10-22 15:10 ` Richard B. Johnson
2002-10-22 16:14   ` Jan Kasprzak
2002-10-22 18:40 ` Andries Brouwer
2002-10-22 18:10   ` Marcelo Tosatti
2002-10-23  8:36     ` Jan Kasprzak
2002-10-22 18:45   ` Christoph Hellwig
2002-10-22 18:59     ` Andries Brouwer
2002-10-22 18:26       ` Marcelo Tosatti
2002-10-22 19:32         ` Andries Brouwer
2002-10-22 19:35           ` Christoph Hellwig
2002-10-22 19:58             ` Andries Brouwer
2002-10-22 20:32               ` Alan Cox
2002-10-23  8:39             ` Jan Kasprzak
2002-10-23  9:13     ` Jan Kasprzak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox