fat.c
Source contains low-bit mask syntaxReassigns seq_file count
SHA-256c60957113df12ceb07a4024560c6f4d896ca0009c459a7ab18ab8410f204e036
MaleculeO(Er)H₃(DbFMg)
Evidence
26:26… ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29
30#include <sys/cdefs.h>
31#ifndef lint
32__RCSID("$NetBSD: fat.c,v 1.18 2006/06/05 16:51:18 christos Exp $");
33#endif /* not lint */
34
35#include <sys/endian.h>
36#include <sys/queue.h>
37#include <sys/limits.h>
38#include <sys/mman.h>
39#include <sys/param.h>
40
41#include <assert.h>
42#include <stdbool.h>
43#include <stdlib.h>
44#include <string.h>
45#include <ctype.h>
46#include <stdio.h>
47#include <unistd.h>
48
49#include "ext.h"
50#include "fsutil.h"
51
52static int _readfat(struct fat_descriptor *);
53static inline struct bootblock* boot_of_(struc …
128:12… ap == NULL)
129 return FSFATAL;
130
131 if (allone) {
132 memset(lbp->map, 0xff, bitmap_size);
133 lbp->count = bits;
134 } else {
135 lbp->count = 0;
⋯9 lines
228:11… uster: lower 4 bits belongs to the subsequent cluster */
229 if ((cl & 1) == 1)
230 retval >>= 4;
231 retval &= CLUST12_MASK;
⋯5 lines
372:45…
373 if (lseek(fd, fat_addr, SEEK_SET) != fat_addr ||
374 (size_t)write(fd, entry->chunk, writesize) != writesize) {
375 pfatal("Unable to write FAT");
376 return (FSFATAL);
377 }
378
379 entry->dirty = false;
709:4… t->is_mmapped = false;
710 fat->use_cache = false;
711
712 /* Attempt to mmap() first */
713 if (allow_mmap) {
714 fat->fatbuf = mmap(NULL, fat->fatsize,
⋯10 lines