summaryrefslogtreecommitdiffstats
path: root/fsck/fsck.h
blob: ee0cb30553b2f082801478baacdf92ea35f5620e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 *  Copyright (C) 2020 Hyunchul Lee <hyc.lee@gmail.com>
 */
#ifndef _FSCK_H
#define _FSCK_H

#include "list.h"

enum fsck_ui_options {
	FSCK_OPTS_REPAIR_ASK	= 0x01,
	FSCK_OPTS_REPAIR_YES	= 0x02,
	FSCK_OPTS_REPAIR_NO	= 0x04,
	FSCK_OPTS_REPAIR_AUTO	= 0x08,
	FSCK_OPTS_REPAIR_WRITE	= 0x0b,
	FSCK_OPTS_REPAIR_ALL	= 0x0f,
	FSCK_OPTS_IGNORE_BAD_FS_NAME	= 0x10,
	FSCK_OPTS_RESCUE_CLUS	= 0x20,
};

struct exfat;
struct exfat_inode;

struct exfat_fsck {
	struct exfat		*exfat;
	struct exfat_de_iter	de_iter;
	struct buffer_desc	*buffer_desc;	/* cluster * 2 */
	enum fsck_ui_options	options;
	bool			dirty:1;
	bool			dirty_fat:1;

	char *name_hash_bitmap;
};

off_t exfat_c2o(struct exfat *exfat, unsigned int clus);

#endif