Code

sysdb: Don't warn about missing history file when loading history.
authorSebastian Harl <sh@tokkee.org>
Fri, 13 Dec 2013 13:33:13 +0000 (14:33 +0100)
committerSebastian Harl <sh@tokkee.org>
Fri, 13 Dec 2013 13:33:13 +0000 (14:33 +0100)
src/client/sysdb.c

index 7283a21ae9ce42321e33885b17e6d3775894c307..66790cd29872a2db358f7d41605a9df707e3e0d2 100644 (file)
@@ -228,7 +228,7 @@ main(int argc, char **argv)
                hist_file[sizeof(hist_file) - 1] = '\0';
 
                errno = 0;
-               if (read_history(hist_file)) {
+               if (read_history(hist_file) && (errno != ENOENT)) {
                        char errbuf[1024];
                        sdb_log(SDB_LOG_WARNING, "Failed to load history (%s): %s",
                                        hist_file, sdb_strerror(errno, errbuf, sizeof(errbuf)));