2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * Execute given function 'func' on log. 2N/A * function takes as arguments: pointer to log entry, character pointer to 2N/A * another argument, and pointer to an integer, which is used as a counter. 2N/A * 'func' should increment this value for each successful application. 2N/A * The log is traversed until either 'func' returns FALSE, or when the log 2N/A * is exhausted. The second argument to 'execute_on_log' is passed as the 2N/A * second argument to 'func'. The third argument, 'clean' determines whether 2N/A * the log entry is deleted after the function has been applied. 2N/A * Returns the number of times that 'func' incremented its third argument. 2N/A/* Print contents of log file to stdout */ 2N/A/* Make copy of current log to log pointed to by 'f'. */ 2N/A "db_log::copy: could not append to log file: ");
2N/A/* Rewinds current log */ 2N/A * Return the next element in current log; return NULL if end of log or error. 2N/A * Log must have been opened for READ. 2N/A/* WARNING("Could not sucessfully finish reading log"); */ 2N/A/* Append given log entry to log. */ 2N/A /* xdr returns TRUE if successful, FALSE otherwise */ 2N/A * Return value is expected to be the usual C convention of non-zero 2N/A * for success, 0 for failure. 2N/A WARNING(
"db_log: could not flush log entry to disk");
2N/A WARNING(
"db_log: could not sync log entry to disk");
2N/A /* Log already stable; nothing to do */ 2N/A * Successful sync of file, but no tmplog to sync 2N/A * so we make sure we return 'success'. 2N/A WARNING(
"db_log: could not allocate tmp log name");
2N/A WARNING(
"db_log: could not allocate stable log name");
2N/A "db_log: Error copying \"%s\" to \"%s\": %s",