Changeset View
Changeset View
Standalone View
Standalone View
sbin/fsck_msdosfs/ext.h
Show All 26 Lines | |||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef EXT_H | #ifndef EXT_H | ||||
#define EXT_H | #define EXT_H | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <stdbool.h> | #include <stdbool.h> | ||||
oshogbo: Why we are using HAVE_CAPSICUM. | |||||
Not Done Inline ActionsHAVE_CAPSICUM is to address @delphij's note that this code is used on other platforms (Android, specifically) where Capsicum is not available. markj: HAVE_CAPSICUM is to address @delphij's note that this code is used on other platforms (Android… | |||||
#include "dosfs.h" | #include "dosfs.h" | ||||
#define LOSTDIR "LOST.DIR" | #define LOSTDIR "LOST.DIR" | ||||
Not Done Inline ActionsWrong sort. We went over this in the other review. oshogbo: Wrong sort. We went over this in the other review. | |||||
/* | |||||
* Options: | |||||
*/ | |||||
extern int alwaysno; /* assume "no" for all questions */ | extern int alwaysno; /* assume "no" for all questions */ | ||||
extern int alwaysyes; /* assume "yes" for all questions */ | extern int alwaysyes; /* assume "yes" for all questions */ | ||||
extern int preen; /* we are preening */ | extern int preen; /* we are preening */ | ||||
extern int rdonly; /* device is opened read only (supersedes above) */ | extern int rdonly; /* device is opened read only (supersedes above) */ | ||||
Not Done Inline ActionsThis is not a good practice to have everything as a global variables. Maybe we can pass this as a arguments to the function? oshogbo: This is not a good practice to have everything as a global variables. Maybe we can pass this as… | |||||
extern int skipclean; /* skip clean file systems if preening */ | extern int skipclean; /* skip clean file systems if preening */ | ||||
extern int allow_mmap; /* allow the use of mmap() */ | extern int allow_mmap; /* allow the use of mmap() */ | ||||
/* | /* | ||||
* function declarations | * function declarations | ||||
*/ | */ | ||||
int ask(int, const char *, ...) __printflike(2, 3); | int ask(int, const char *, ...) __printflike(2, 3); | ||||
/* | /* | ||||
* Check the dirty flag. If the file system is clean, then return 1. | * Check the dirty flag. If the file system is clean, then return 1. | ||||
* Otherwise, return 0 (this includes the case of FAT12 file systems -- | * Otherwise, return 0 (this includes the case of FAT12 file systems -- | ||||
* they have no dirty flag, so they must be assumed to be unclean). | * they have no dirty flag, so they must be assumed to be unclean). | ||||
*/ | */ | ||||
int checkdirty(int, struct bootblock *); | int checkdirty(int, struct bootblock *); | ||||
/* | /* | ||||
* Check file system given as arg | * Check file system given as arg | ||||
*/ | */ | ||||
int checkfilesys(const char *); | int checkfilesys(const char *, int); | ||||
/* | /* | ||||
* Return values of various functions | * Return values of various functions | ||||
*/ | */ | ||||
#define FSOK 0 /* Check was OK */ | #define FSOK 0 /* Check was OK */ | ||||
#define FSBOOTMOD 1 /* Boot block was modified */ | #define FSBOOTMOD 1 /* Boot block was modified */ | ||||
#define FSDIRMOD 2 /* Some directory was modified */ | #define FSDIRMOD 2 /* Some directory was modified */ | ||||
#define FSFATMOD 4 /* The FAT was modified */ | #define FSFATMOD 4 /* The FAT was modified */ | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |
Why we are using HAVE_CAPSICUM.