xref: /netbsd-src/sbin/fsck/fsutil.h (revision a74e29fe24406e588e4c7ad6d03168a00d009bc1)
1*a74e29feSjoerg /*	$NetBSD: fsutil.h,v 1.21 2020/04/03 19:36:32 joerg Exp $	*/
27dfca760Schristos 
37dfca760Schristos /*
47dfca760Schristos  * Copyright (c) 1996 Christos Zoulas.  All rights reserved.
57dfca760Schristos  *
67dfca760Schristos  * Redistribution and use in source and binary forms, with or without
77dfca760Schristos  * modification, are permitted provided that the following conditions
87dfca760Schristos  * are met:
97dfca760Schristos  * 1. Redistributions of source code must retain the above copyright
107dfca760Schristos  *    notice, this list of conditions and the following disclaimer.
117dfca760Schristos  * 2. Redistributions in binary form must reproduce the above copyright
127dfca760Schristos  *    notice, this list of conditions and the following disclaimer in the
137dfca760Schristos  *    documentation and/or other materials provided with the distribution.
147dfca760Schristos  *
157dfca760Schristos  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
167dfca760Schristos  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
177dfca760Schristos  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
187dfca760Schristos  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
197dfca760Schristos  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
207dfca760Schristos  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
217dfca760Schristos  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
227dfca760Schristos  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
237dfca760Schristos  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
247dfca760Schristos  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
257dfca760Schristos  */
267dfca760Schristos 
2742b90091Sperseant #include <stdarg.h>
28453164daSchristos #include <signal.h>
2942b90091Sperseant 
306923d07cSjoerg void errexit(const char *, ...) __printflike(1, 2) __dead;
316923d07cSjoerg void pfatal(const char *, ...) __printflike(1, 2);
326923d07cSjoerg void pwarn(const char *, ...) __printflike(1, 2);
336923d07cSjoerg void perr(const char *, ...) __printflike(1, 2);
346923d07cSjoerg void panic(const char *, ...) __printflike(1, 2) __dead;
356923d07cSjoerg void vmsg(int, const char *, va_list) __printflike(2, 0);
36f97f5096Slukem const char *blockcheck(const char *);
37f97f5096Slukem const char *cdevname(void);
38f97f5096Slukem void setcdevname(const char *, int);
39f97f5096Slukem int  hotroot(void);
40c68c36a5Schristos const char *print_mtime(time_t);
417dfca760Schristos 
427dfca760Schristos #define CHECK_PREEN	1
437dfca760Schristos #define	CHECK_VERBOSE	2
447dfca760Schristos #define	CHECK_DEBUG	4
45172a636bSlukem #define	CHECK_FORCE	8
46a73c2bd5Schristos #define	CHECK_PROGRESS	16
475f101a47Schristos #define	CHECK_NOFIX	32
487dfca760Schristos 
497dfca760Schristos struct fstab;
50f97f5096Slukem int checkfstab(int, int, void *(*)(struct fstab *),
51f97f5096Slukem     int (*) (const char *, const char *, const char *, void *, pid_t *));
5223ffdf5bSchristos 
53*a74e29feSjoerg extern void (*ckfinish)(int);
54c30abfbbSdholland extern volatile sig_atomic_t returntosingle;
556923d07cSjoerg void catch(int) __dead;
5623ffdf5bSchristos void catchquit(int);
5723ffdf5bSchristos void voidquit(int);
58*a74e29feSjoerg 
59*a74e29feSjoerg extern int quiet;
60