[lkml]   [2002]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject2.4.20-pre11 /proc/partitions read
	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
# dd if=/proc/partitions bs=128k|wc -l
0+1 records in
0+1 records out

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()?


| Jan "Yenya" Kasprzak <kas at { - work | - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| Czech Linux Homepage: |
|-- 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 --|
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:30    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean