Small cleanup: mostly whitespace vs. tabs.

This commit is contained in:
Pedro F. Giffuni 2014-04-30 21:19:46 +00:00
parent 382b6bbafe
commit b251c17a97
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265164

View file

@ -51,50 +51,50 @@ static const char rcsid[] =
#include <time.h>
#include <unistd.h>
#define MAXU16 0xffff /* maximum unsigned 16-bit quantity */
#define BPN 4 /* bits per nibble */
#define NPB 2 /* nibbles per byte */
#define MAXU16 0xffff /* maximum unsigned 16-bit quantity */
#define BPN 4 /* bits per nibble */
#define NPB 2 /* nibbles per byte */
#define DOSMAGIC 0xaa55 /* DOS magic number */
#define MINBPS 512 /* minimum bytes per sector */
#define MAXSPC 128 /* maximum sectors per cluster */
#define MAXNFT 16 /* maximum number of FATs */
#define DEFBLK 4096 /* default block size */
#define DEFBLK16 2048 /* default block size FAT16 */
#define DEFRDE 512 /* default root directory entries */
#define RESFTE 2 /* reserved FAT entries */
#define MINCLS12 1U /* minimum FAT12 clusters */
#define MINCLS16 0xff5U /* minimum FAT16 clusters */
#define MINCLS32 0xfff5U /* minimum FAT32 clusters */
#define MAXCLS12 0xff4U /* maximum FAT12 clusters */
#define MAXCLS16 0xfff4U /* maximum FAT16 clusters */
#define MAXCLS32 0xffffff4U /* maximum FAT32 clusters */
#define DOSMAGIC 0xaa55 /* DOS magic number */
#define MINBPS 512 /* minimum bytes per sector */
#define MAXSPC 128 /* maximum sectors per cluster */
#define MAXNFT 16 /* maximum number of FATs */
#define DEFBLK 4096 /* default block size */
#define DEFBLK16 2048 /* default block size FAT16 */
#define DEFRDE 512 /* default root directory entries */
#define RESFTE 2 /* reserved FAT entries */
#define MINCLS12 1U /* minimum FAT12 clusters */
#define MINCLS16 0xff5U /* minimum FAT16 clusters */
#define MINCLS32 0xfff5U /* minimum FAT32 clusters */
#define MAXCLS12 0xff4U /* maximum FAT12 clusters */
#define MAXCLS16 0xfff4U /* maximum FAT16 clusters */
#define MAXCLS32 0xffffff4U /* maximum FAT32 clusters */
#define mincls(fat) ((fat) == 12 ? MINCLS12 : \
#define mincls(fat) ((fat) == 12 ? MINCLS12 : \
(fat) == 16 ? MINCLS16 : \
MINCLS32)
#define maxcls(fat) ((fat) == 12 ? MAXCLS12 : \
#define maxcls(fat) ((fat) == 12 ? MAXCLS12 : \
(fat) == 16 ? MAXCLS16 : \
MAXCLS32)
#define mk1(p, x) \
#define mk1(p, x) \
(p) = (u_int8_t)(x)
#define mk2(p, x) \
#define mk2(p, x) \
(p)[0] = (u_int8_t)(x), \
(p)[1] = (u_int8_t)((x) >> 010)
#define mk4(p, x) \
#define mk4(p, x) \
(p)[0] = (u_int8_t)(x), \
(p)[1] = (u_int8_t)((x) >> 010), \
(p)[2] = (u_int8_t)((x) >> 020), \
(p)[3] = (u_int8_t)((x) >> 030)
#define argto1(arg, lo, msg) argtou(arg, lo, 0xff, msg)
#define argto2(arg, lo, msg) argtou(arg, lo, 0xffff, msg)
#define argto4(arg, lo, msg) argtou(arg, lo, 0xffffffff, msg)
#define argtox(arg, lo, msg) argtou(arg, lo, UINT_MAX, msg)
#define argto1(arg, lo, msg) argtou(arg, lo, 0xff, msg)
#define argto2(arg, lo, msg) argtou(arg, lo, 0xffff, msg)
#define argto4(arg, lo, msg) argtou(arg, lo, 0xffffffff, msg)
#define argtox(arg, lo, msg) argtou(arg, lo, UINT_MAX, msg)
struct bs {
u_int8_t bsJump[3]; /* bootstrap entry point */
@ -131,7 +131,7 @@ struct bsx {
u_int8_t exReserved1; /* reserved */
u_int8_t exBootSignature; /* extended boot signature */
u_int8_t exVolumeID[4]; /* volume ID number */
u_int8_t exVolumeLabel[11]; /* volume label */
u_int8_t exVolumeLabel[11]; /* volume label */
u_int8_t exFileSysType[8]; /* file system type */
} __packed;
@ -164,7 +164,7 @@ struct bpb {
u_int bpbBackup; /* backup boot sector */
};
#define BPBGAP 0, 0, 0, 0, 0, 0
#define BPBGAP 0, 0, 0, 0, 0, 0
static struct {
const char *name;