summaryrefslogtreecommitdiff
path: root/src/version_usage.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-11-28 14:22:28 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-11-28 14:22:28 +0000
commit5a2f398eca68b2b0330ddcec2b222bf76875f82f (patch)
treeeb916885f04126e7e48b56fe02de6b44f0493c17 /src/version_usage.cc
parenta022a1826bb573028f264bc6edbc564c0d488bbc (diff)
2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added direct I/O support. The current implementation uses O_DIRECT, which is not posix standard and is tested on linux 2.6.21. Currently only file allocation uses direct I/O. * src/SingleFileAllocationIterator.{h, cc} * test/SingleFileAllocationIteratorTest.cc * src/MultiFileAllocationIterator.{h, cc} * test/MultiFileAllocationIteratorTest.cc * src/BinaryStream.h * src/DiskWriter.h * src/AbstractDiskWriter.{h, cc} * src/ByteArrayDiskWriter.h * src/DiskAdaptor.h * src/AbstractSingleDiskAdaptor.{h, cc} * src/MultiDiskAdaptor.{h, cc} * src/FileAllocationEntry.cc * src/Util.{h, cc} * src/OptionHandlerFactory.cc * src/prefs.h * src/version_usage.cc * src/option_processing.cc Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to handleException. * src/MultiFileAllocationIterator.cc Added EINTR handling * src/SocketCore.cc
Diffstat (limited to 'src/version_usage.cc')
-rw-r--r--src/version_usage.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/version_usage.cc b/src/version_usage.cc
index 4a30a268..0775a846 100644
--- a/src/version_usage.cc
+++ b/src/version_usage.cc
@@ -33,6 +33,7 @@
*/
/* copyright --> */
#include "common.h"
+#include "a2io.h"
#include "FeatureConfig.h"
#ifdef ENABLE_MESSAGE_DIGEST
# include "messageDigest.h"
@@ -161,9 +162,15 @@ void showUsage() {
" Default: prealloc") << endl;
cout << _(" --no-file-allocation-limit=SIZE No file allocation is made for files whose\n"
" size is smaller than SIZE.\n"
- " You can append K or M(1K = 1024, 1M = 1024K).\n"
- " BitTorrent downloads ignore this option.\n"
- " Default: 5M") << endl;
+ " You can append K or M(1K = 1024, 1M = 1024K).") << "\n"
+ << DEFAULT_MSG << "5M" << "\n";
+#ifdef ENABLE_DIRECT_IO
+ cout << _(" --enable-direct-io[=true|false] Enable directI/O, which lowers cpu usage while\n"
+ " allocating files.\n"
+ " Turn off if you encounter any error") << "\n"
+ " Tested in Linux 2.6.21" << "\n"
+ << DEFAULT_MSG << "false" << "\n";
+#endif // ENABLE_DIRECT_IO
cout << _(" --allow-overwrite=true|false If false, aria2 doesn't download a file which\n"
" already exists but the corresponding .aria2 file\n"
" doesn't exist.\n"