Searched defs:seed (Results 1 - 3 of 3) sorted by relevance

/lxc/src/lxc/
H A Dnetwork.c1512 unsigned int seed; local
1522 if (fread (&seed, sizeof(seed), 1, urandom) <= 0)
1523 seed = time(0);
1527 seed = time(0);
1530 srand(seed);
1544 name[i] = padchar[rand_r(&seed) % (strlen(padchar) - 1)];
H A Dconfile.c633 unsigned int seed=randseed(false); local
641 *curs = hex[rand_r(&seed) & 0x0E];
643 *curs = hex[rand_r(&seed) & 0x0F];
H A Dutils.c1015 srand pre-seed function based on /dev/urandom
1017 unsigned int seed = time(NULL) + getpid(); local
1022 int ret = fread(&seed, sizeof(seed), 1, f);
1024 DEBUG("unable to fread /dev/urandom, %s, fallback to time+pid rand seed", strerror(errno));
1029 srand(seed);
1031 return seed;

Completed in 29 milliseconds