Patched Makefile with edits from Rune Magnus

This commit is contained in:
Bill Cox
2016-07-01 09:22:50 -07:00
parent b26b1e9f6b
commit 4f135647f2
4 changed files with 20 additions and 9 deletions

View File

@@ -128,7 +128,11 @@ static bool initializeUSB(struct ftdi_context *ftdic, char **message) {
ftdi_init(ftdic);
// Open FTDI device based on FT240X vendor & product IDs
if(ftdi_usb_open(ftdic, 0x0403, 0x6015) < 0) {
*message = "Can't find Infinite Noise Multiplier\n";
if(!isSuperUser()) {
*message = "Can't find Infinite Noise Multiplier. Try running as super user?\n";
} else {
*message = "Can't find Infinite Noise Multiplier\n";
}
return false;
}
@@ -233,11 +237,6 @@ int main(int argc, char **argv)
}
}
if(!isSuperUser()) {
fputs("Super user access needed.\n", stderr);
return 1;
}
if(!multiplierAssigned && writeDevRandom) {
outputMultiplier = 2u; // Don't throw away entropy when writing to /dev/random unless told to do so
}