lkml.org 
[lkml]   [2002]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.20-pre11 /proc/partitions read
Richard B. Johnson wrote:
:
: > # 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
:
: Well yes, sorta. The proc file-system is a compromise. You can
: `cat` it and `more` it, but anything that uses `lseek` will
: fail in strange ways.

I hope dd(1) does not use lseek() :-) The question is
whether the application should supply a big enough buffer to read(2)
or whether it is possible to read(2) in more smaller chunks.

-Y.

--
| 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 --|
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.630 / U:0.372 seconds]
©2003-2014 Jasper Spaans. Advertise on this site