random: do not print warning if random seed doesn't exist yet

This commit is contained in:
Lennart Poettering 2011-03-31 04:40:02 +02:00
parent 9408a2d295
commit ba1a55152c
2 changed files with 14 additions and 16 deletions

22
TODO
View File

@ -10,8 +10,6 @@ F15:
* hook emergency.target into local-fs.target in some way as OnFailure with isolate
* teach dbus to activate all services it finds in /etc/systemd/services/org-*.service
* save/restore tool for SysV as requested by FPC (PENDING)
* bind mounts are ignored
@ -21,24 +19,22 @@ F15:
* NM should pull in network.target, ntpd should pull in rtc-set.target.
* document default dependencies
* kernel patch wegen kmsg prio nach f15
* LOG_DAEMON/LOG_USER für kmsg messages schreiben
* disable /dev/console status messages after plymouth went down
* plymouth pid file
* selinux issue http://people.gnome.org/~cosimoc/selinux.jpg
* do not print errors when random seed is not around
* fix alsa mixer restore to not print error when no config is stored
* ply should do mkdir before writing pid file
Features:
* teach dbus to activate all services it finds in /etc/systemd/services/org-*.service
* document default dependencies
* LOG_DAEMON/LOG_USER für kmsg messages schreiben
* Find a way to replace /var/run, /var/lock directories with
symlinks during an RPM package upgrade (filesystem.rpm or systemd.rpm).
We soon want to get rid of var-run.mount var-lock.mount units.
@ -118,7 +114,7 @@ Features:
* Patch systemd-fsck to use -C and pass console fd to it
* support remote/ssh systemctl/systemadm, and local privileged access
* support remote/ssh systemctl/systemadm, and local privileged access → dbus patches need to be merged
* configurable jitter for timer events

View File

@ -86,9 +86,11 @@ int main(int argc, char *argv[]) {
}
}
if ((r = loop_read(seed_fd, buf, buf_size, false)) <= 0)
log_error("Failed to read seed file: %s", r < 0 ? strerror(errno) : "EOF");
else {
if ((r = loop_read(seed_fd, buf, buf_size, false)) <= 0) {
if (r != 0)
log_error("Failed to read seed file: %m");
} else {
lseek(seed_fd, 0, SEEK_SET);
if ((r = loop_write(random_fd, buf, (size_t) r, false)) <= 0)