3 * The Regents of the University of California. All rights reserved.
5 * %sccs.include.redist.c%
9 static char sccsid
[] = "$Id: ex_preserve.c,v 8.4 1993/11/08 11:10:45 bostic Exp $ (Berkeley) $Date: 1993/11/08 11:10:45 $";
12 #include <sys/types.h>
21 * ex_preserve -- :pre[serve]
22 * Push the file to recovery.
25 ex_preserve(sp
, ep
, cmdp
)
32 if (!F_ISSET(ep
, F_RCV_ON
)) {
33 msgq(sp
, M_ERR
, "Preservation of this file not possible.");
37 /* If recovery not initialized, do so. */
38 if (F_ISSET(ep
, F_FIRSTMODIFY
) && rcv_init(sp
, ep
))
41 /* Force the file to be read in, in case it hasn't yet. */
42 if (file_lline(sp
, ep
, &lno
))
49 /* Preserve the recovery files. */
50 F_SET(ep
, F_RCV_NORM
);
52 msgq(sp
, M_INFO
, "File preserved.");