1N/A * See the file LICENSE for redistribution information. 1N/A * Copyright (c) 1997, 1998 1N/A * Sleepycat Software. All rights reserved. 1N/A#
endif /* not lint */ 1N/A * Supporting function for db_archive(1). 1N/A * Get the absolute pathname of the current directory. It would 1N/A * be nice to get the shortest pathname of the database directory, 1N/A * but that's just not possible. 1N/A * A return of DB_NOTFOUND means that we didn't find 1N/A * any records in the log (so we are not going to be 1N/A * deleting any log files). 1N/A /* Remove any log files before the last stable LSN. */ 1N/A /* Get some initial space. */ 1N/A /* Build an array of the file names. */ 1N/A /* If there's nothing to return, we're done. */ 1N/A /* Sort the list. */ 1N/A /* Rework the memory. */ 1N/A * Build a list of datafiles for return. 1N/A /* Get some initial space. */ 1N/A "log_archive: unable to read log record");
1N/A /* If there's nothing to return, we're done. */ 1N/A /* Sort the list. */ 1N/A * Build the real pathnames, discarding nonexistent files and 1N/A * Discard duplicates. Last is the next slot we're going 1N/A * to return to the user, nxt is the next slot that we're 1N/A * going to consider. 1N/A /* Get the real name. */ 1N/A /* If the file doesn't exist, ignore it. */ 1N/A /* Rework the name as requested by the user. */ 1N/A /* NULL-terminate the list. */ 1N/A /* Rework the memory. */ 1N/A * We've possibly inserted NULLs into the array list, so clean up a 1N/A * bit so that the other error processing works. 1N/A * Return an absolute path name for the file. 1N/A /* Malloc space for concatenating the two. */ 1N/A /* Build the name. If `name' is an absolute path, ignore any prefix. */ 1N/A * Create a single chunk of memory that holds the returned information. 1N/A * If the user has their own malloc routine, use it. 1N/A /* Find out how much space we need. */ 1N/A /* Allocate it and set up the pointers. */ 1N/A /* Copy the original information into the new memory. */ 1N/A /* NULL-terminate the list. */