Author: pjd
Date: Sun Feb  6 14:06:37 2011
New Revision: 218373
URL: http://svn.freebsd.org/changeset/base/218373

Log:
  Open syslog when logging sysconf(3) failure.
  
  Reported by:  Mikolaj Golub <[email protected]>
  MFC after:    1 week

Modified:
  head/sbin/hastd/hastd.c

Modified: head/sbin/hastd/hastd.c
==============================================================================
--- head/sbin/hastd/hastd.c     Sun Feb  6 13:59:03 2011        (r218372)
+++ head/sbin/hastd/hastd.c     Sun Feb  6 14:06:37 2011        (r218373)
@@ -168,7 +168,11 @@ descriptors_assert(const struct hast_res
 
        maxfd = sysconf(_SC_OPEN_MAX);
        if (maxfd < 0) {
+               pjdlog_init(pjdlogmode);
+               pjdlog_prefix_set("[%s] (%s) ", res->hr_name,
+                   role2str(res->hr_role));
                pjdlog_errno(LOG_WARNING, "sysconf(_SC_OPEN_MAX) failed");
+               pjdlog_fini();
                maxfd = 16384;
        }
        for (fd = 0; fd <= maxfd; fd++) {
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to