* Remove queryPathHash().
* Help for nix-worker.
This commit is contained in:
parent
fcd9900d74
commit
8ba5d32769
4 changed files with 32 additions and 2 deletions
|
|
@ -5,6 +5,8 @@
|
|||
#include "worker-protocol.hh"
|
||||
#include "archive.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace nix;
|
||||
|
||||
|
||||
|
|
@ -48,12 +50,13 @@ void processConnection(Source & from, Sink & to)
|
|||
|
||||
switch (op) {
|
||||
|
||||
case wopQuit:
|
||||
case wopQuit: {
|
||||
/* Close the database. */
|
||||
store.reset((StoreAPI *) 0);
|
||||
writeInt(1, to);
|
||||
quit = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case wopIsValidPath: {
|
||||
Path path = readStorePath(from);
|
||||
|
|
@ -67,6 +70,12 @@ void processConnection(Source & from, Sink & to)
|
|||
break;
|
||||
}
|
||||
|
||||
case wopQueryPathHash: {
|
||||
Path path = readStorePath(from);
|
||||
writeString(printHash(store->queryPathHash(path)), to);
|
||||
break;
|
||||
}
|
||||
|
||||
case wopQueryReferences:
|
||||
case wopQueryReferrers: {
|
||||
Path path = readStorePath(from);
|
||||
|
|
@ -153,8 +162,11 @@ void run(Strings args)
|
|||
}
|
||||
|
||||
|
||||
#include "help.txt.hh"
|
||||
|
||||
void printHelp()
|
||||
{
|
||||
std::cout << string((char *) helpText, sizeof helpText);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue