|
Re: Some design questions: msg#00060network.bit-torrent.libtorrent
Ken wrote: > The following snipped (seektest.c) can be illustrate: > > #include <stdio.h > > > main() > { > fseek(stdout, 1024*1024, SEEK_SET); > putchar('$'); > } > > compile and run as "seektest > testfile; ls -ls testfile". This will > show the file size, as well as the amount of disk space currently > allocated for the file. > > > I tried it on Win98, it is worked! > > Ken Thanks for confirming this. You don't have older Win95, by any chance, do you? BTW, the correct output of the "ls -ls testfile" command is similar to either of these: 8 -rw-r----- 1 rhociung asic 1048577 Apr 28 16:00 sparseout 1032 -rw-r----- 1 rhociung asic 1048577 Apr 28 16:02 nonsparseout The sparseout file was generated on an ext3 filesystem, while the nonsparseout file was generated by the same OS on a FAT filesystem, then copied to the same directory as the sparseout file. Both of these results are correct, as they indicate a 1M+1B file was created when fseek-ing 1M past the end of file in write mode. Greetings, Radu. ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Missing peer_connection::setup_send() in peer_connection::on_connection_complete()?: 00060, Daniel Wang |
|---|---|
| Next by Date: | C++ syntax error.: 00060, Andreas Bruse |
| Previous by Thread: | Re: Some design questionsi: 00060, Ken |
| Next by Thread: | Errors when compiling libtorrent-0.9.2-060421.tar.gz: 00060, Tianhao Qiu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |