diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-03-26 11:02:07 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-03-26 11:02:07 +0000 |
commit | 5dd8fb20691c375778fd73bf613d4988df72fb50 (patch) | |
tree | 942d57bc30560be4675190ba0507b813a95a5b10 /src/nix-store/nix-store.cc | |
parent | 92f525ecf4ea8a9bd356acd1d3845074b1e5b918 (diff) |
* Don't use ULLONG_MAX in maxFreed - use 0 to mean "no limit".
18446744073709551615ULL breaks on GCC 3.3.6 (`integer constant is
too large for "long" type').
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r-- | src/nix-store/nix-store.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 28cd1adf4..e84288137 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -531,7 +531,10 @@ static void opGC(Strings opFlags, Strings opArgs) else if (*i == "--print-live") options.action = GCOptions::gcReturnLive; else if (*i == "--print-dead") options.action = GCOptions::gcReturnDead; else if (*i == "--delete") options.action = GCOptions::gcDeleteDead; - else if (*i == "--max-freed") options.maxFreed = getIntArg(*i, i, opFlags.end()); + else if (*i == "--max-freed") { + options.maxFreed = getIntArg(*i, i, opFlags.end()); + if (options.maxFreed == 0) options.maxFreed = 1; + } else if (*i == "--max-links") options.maxLinks = getIntArg(*i, i, opFlags.end()); else if (*i == "--use-atime") options.useAtime = true; else if (*i == "--max-atime") { |