[BACK]Return to snapshot.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sbin / dump

File: [cvs.NetBSD.org] / src / sbin / dump / snapshot.h (download)

Revision 1.2.2.3.4.1, Sat Nov 11 21:31:47 2006 UTC (13 years ago) by bouyer
Branch: netbsd-3-1
CVS Tags: netbsd-3-1-1-RELEASE
Changes since 1.2.2.3: +4 -3 lines

Pull up following revision(s) (requested by hannken in ticket #1573):
	sbin/dump/snapshot.h: revision 1.3 via patch
	sbin/dump/snapshot.c: revision 1.3 via patch
	sbin/dump/main.c: revision 1.63 via patch
	sbin/dump/tape.c: revision 1.47 via patch
	sbin/dump/dump.h: revision 1.44 via patch
When using a snapshot take the snapshot raw device on further open.
Fixes PR #34923  dump(8) only dumps a corefile with -X (snapshots)
Approved by: Manuel Bouyer <bouyer@netbsd.org>

/*	$NetBSD: snapshot.h,v 1.2.2.3.4.1 2006/11/11 21:31:47 bouyer Exp $	*/

/*-
 * Copyright (c) 2005 The NetBSD Foundation, Inc.
 * All rights reserved.
 *
 * This code is derived from software contributed to The NetBSD Foundation
 * by Juergen Hannken-Illjes.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the NetBSD
 *	Foundation, Inc. and its contributors.
 * 4. Neither the name of The NetBSD Foundation nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Create a snapshot of the file system currently mounted on the first argument
 * using the second argument as backing store and return an open file
 * descriptor for the snapshot.  If the second argument is NULL, use the first
 * as backing store.  If the third argument is not NULL, it gets the time the
 * snapshot was created.  If the fourth argument is not NULL, it gets the
 * snapshot device path.
 */
int snap_open(char *, char *, time_t *, char **);