From 9af0cb9accbf42aca8f87d3f3bfffcac20c2f5b4 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 1 Mar 2010 15:52:49 +1100 Subject: - (dtucker) [openbsd-compat/port-linux.c] Make failure to write to the OOM adjust log at verbose only, since according to cjwatson in bug #1470 some virtualization platforms don't allow writes. --- ChangeLog | 3 +++ openbsd-compat/port-linux.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ce43472..1a318e04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 20100301 - (dtucker) [regress/{cert-hostkey,cfgmatch,cipher-speed}.sh} Replace "echo -n" with "echon" for portability. + - (dtucker) [openbsd-compat/port-linux.c] Make failure to write to the OOM + adjust log at verbose only, since according to cjwatson in bug #1470 + some virtualization platforms don't allow writes. 20100228 - (djm) [auth.c] On Cygwin, refuse usernames that have differences in diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c index cda751de..89b9a734 100644 --- a/openbsd-compat/port-linux.c +++ b/openbsd-compat/port-linux.c @@ -1,4 +1,4 @@ -/* $Id: port-linux.c,v 1.7 2009/12/08 02:39:48 dtucker Exp $ */ +/* $Id: port-linux.c,v 1.8 2010/03/01 04:52:50 dtucker Exp $ */ /* * Copyright (c) 2005 Daniel Walsh @@ -229,11 +229,11 @@ oom_adjust_setup(void) debug3("%s", __func__); if ((fp = fopen(OOM_ADJ_PATH, "r+")) != NULL) { if (fscanf(fp, "%d", &oom_adj_save) != 1) - logit("error reading %s: %s", OOM_ADJ_PATH, strerror(errno)); + verbose("error reading %s: %s", OOM_ADJ_PATH, strerror(errno)); else { rewind(fp); if (fprintf(fp, "%d\n", OOM_ADJ_NOKILL) <= 0) - logit("error writing %s: %s", + verbose("error writing %s: %s", OOM_ADJ_PATH, strerror(errno)); else verbose("Set %s from %d to %d", @@ -254,7 +254,7 @@ oom_adjust_restore(void) return; if (fprintf(fp, "%d\n", oom_adj_save) <= 0) - logit("error writing %s: %s", OOM_ADJ_PATH, strerror(errno)); + verbose("error writing %s: %s", OOM_ADJ_PATH, strerror(errno)); else verbose("Set %s to %d", OOM_ADJ_PATH, oom_adj_save); -- cgit v1.2.3