g_label_msdosfs.c (161246) | g_label_msdosfs.c (162834) |
---|---|
1/*- 2 * Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * Copyright (c) 2006 Tobias Reifenberger 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * Copyright (c) 2006 Tobias Reifenberger 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/geom/label/g_label_msdosfs.c 161246 2006-08-12 15:34:15Z pjd $"); | 29__FBSDID("$FreeBSD: head/sys/geom/label/g_label_msdosfs.c 162834 2006-09-30 08:16:49Z pjd $"); |
30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/malloc.h> 35 36#include <geom/geom.h> 37#include <geom/label/g_label.h> --- 105 unchanged lines hidden (view full) --- 143 * label of FAT32 volumes may be stored as a special entry in 144 * the root directory. 145 */ 146 fat_FirstDataSector = 147 UINT16BYTES(pfat32_bsbpb->BPB_RsvdSecCnt) + 148 (pfat32_bsbpb->BPB_NumFATs * 149 UINT32BYTES(pfat32_bsbpb->BPB_FATSz32)); 150 fat_BytesPerSector = UINT16BYTES(pfat32_bsbpb->BPB_BytsPerSec); | 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/malloc.h> 35 36#include <geom/geom.h> 37#include <geom/label/g_label.h> --- 105 unchanged lines hidden (view full) --- 143 * label of FAT32 volumes may be stored as a special entry in 144 * the root directory. 145 */ 146 fat_FirstDataSector = 147 UINT16BYTES(pfat32_bsbpb->BPB_RsvdSecCnt) + 148 (pfat32_bsbpb->BPB_NumFATs * 149 UINT32BYTES(pfat32_bsbpb->BPB_FATSz32)); 150 fat_BytesPerSector = UINT16BYTES(pfat32_bsbpb->BPB_BytsPerSec); |
151 | 151 |
152 G_LABEL_DEBUG(2, 153 "MSDOSFS: FAT_FirstDataSector=0x%x, FAT_BytesPerSector=%d", 154 fat_FirstDataSector, fat_BytesPerSector); 155 156 for (offset = fat_BytesPerSector * fat_FirstDataSector;; 157 offset += fat_BytesPerSector) { 158 sector = (uint8_t *)g_read_data(cp, offset, 159 fat_BytesPerSector, NULL); --- 63 unchanged lines hidden --- | 152 G_LABEL_DEBUG(2, 153 "MSDOSFS: FAT_FirstDataSector=0x%x, FAT_BytesPerSector=%d", 154 fat_FirstDataSector, fat_BytesPerSector); 155 156 for (offset = fat_BytesPerSector * fat_FirstDataSector;; 157 offset += fat_BytesPerSector) { 158 sector = (uint8_t *)g_read_data(cp, offset, 159 fat_BytesPerSector, NULL); --- 63 unchanged lines hidden --- |