diff options
author | H. Peter Anvin <hpa@zytor.com> | 2016-02-09 18:08:47 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2016-02-09 18:08:47 -0800 |
commit | f2f897a1762fab84d2905f32b1c15dd7b42abb56 (patch) | |
tree | a38f51d3f1fcbf44afddb4736d549c12eaf491be /gpxe/src/core/random.c | |
parent | 72d2959272b4616f17a97667e6dfa9d06bf109a3 (diff) | |
download | syslinux-f2f897a1762fab84d2905f32b1c15dd7b42abb56.tar.gz |
gpxe: delete long since obsolete snapshot of gPXE
gPXE has been deprecated in favor of iPXE for many, many years now.
It is much better than users get it directly from the iPXE project,
since we should no longer need any special modifications for Syslinux
use.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'gpxe/src/core/random.c')
-rw-r--r-- | gpxe/src/core/random.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/gpxe/src/core/random.c b/gpxe/src/core/random.c deleted file mode 100644 index 6e7374e3..00000000 --- a/gpxe/src/core/random.c +++ /dev/null @@ -1,41 +0,0 @@ -/** @file - * - * Random number generation - * - */ - -FILE_LICENCE ( GPL2_OR_LATER ); - -#include <stdlib.h> -#include <gpxe/timer.h> - -static int32_t rnd_seed = 0; - -/** - * Seed the pseudo-random number generator - * - * @v seed Seed value - */ -void srandom ( unsigned int seed ) { - rnd_seed = seed; -} - -/** - * Generate a pseudo-random number between 0 and 2147483647L or 2147483562? - * - * @ret rand Pseudo-random number - */ -long int random ( void ) { - int32_t q; - - if ( ! rnd_seed ) /* Initialize linear congruential generator */ - srandom ( currticks() ); - - /* simplified version of the LCG given in Bruce Schneier's - "Applied Cryptography" */ - q = ( rnd_seed / 53668 ); - rnd_seed = ( 40014 * ( rnd_seed - 53668 * q ) - 12211 * q ); - if ( rnd_seed < 0 ) - rnd_seed += 2147483563L; - return rnd_seed; -} |