Deleted Added
full compact
fat.c (203874) fat.c (209364)
1/*
2 * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank
3 * Copyright (c) 1995 Martin Husemann
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26
27#include <sys/cdefs.h>
28#ifndef lint
29__RCSID("$NetBSD: fat.c,v 1.12 2000/10/10 20:24:52 is Exp $");
30static const char rcsid[] =
1/*
2 * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank
3 * Copyright (c) 1995 Martin Husemann
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26
27#include <sys/cdefs.h>
28#ifndef lint
29__RCSID("$NetBSD: fat.c,v 1.12 2000/10/10 20:24:52 is Exp $");
30static const char rcsid[] =
31 "$FreeBSD: head/sbin/fsck_msdosfs/fat.c 203874 2010-02-14 12:31:28Z kib $";
31 "$FreeBSD: head/sbin/fsck_msdosfs/fat.c 209364 2010-06-20 09:40:54Z brian $";
32#endif /* not lint */
33
34#include <stdlib.h>
35#include <string.h>
36#include <ctype.h>
37#include <stdio.h>
38#include <unistd.h>
39

--- 42 unchanged lines hidden (view full) ---

82 return 1;
83 }
84
85 if (lseek(fs, off, SEEK_SET) != off) {
86 perror("Unable to read FAT");
87 goto err;
88 }
89
32#endif /* not lint */
33
34#include <stdlib.h>
35#include <string.h>
36#include <ctype.h>
37#include <stdio.h>
38#include <unistd.h>
39

--- 42 unchanged lines hidden (view full) ---

82 return 1;
83 }
84
85 if (lseek(fs, off, SEEK_SET) != off) {
86 perror("Unable to read FAT");
87 goto err;
88 }
89
90 if (read(fs, buffer, boot->bpbBytesPerSec) != boot->bpbBytesPerSec) {
90 if ((size_t)read(fs, buffer, boot->bpbBytesPerSec) !=
91 boot->bpbBytesPerSec) {
91 perror("Unable to read FAT");
92 goto err;
93 }
94
95 /*
96 * If we don't understand the FAT, then the file system must be
97 * assumed to be unclean.
98 */

--- 592 unchanged lines hidden ---
92 perror("Unable to read FAT");
93 goto err;
94 }
95
96 /*
97 * If we don't understand the FAT, then the file system must be
98 * assumed to be unclean.
99 */

--- 592 unchanged lines hidden ---