5 * Copyright (C) 1994-1996 Bas Laarhoven,
6 * (C) 1996-1997 Claus-Justus Heine.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; see the file COPYING. If not, write to
20 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23 * $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape-bsm.h,v $
25 * $Date: 1997/10/05 19:18:07 $
27 * This file contains definitions for the bad sector map handling
28 * routines for the QIC-117 floppy-tape driver for Linux.
31 #include <linux/ftape.h>
32 #include <linux/ftape-header-segment.h>
34 #define EMPTY_SEGMENT (0xffffffff)
35 #define FAKE_SEGMENT (0xfffffffe)
37 /* maximum (format code 4) bad sector map size (bytes).
39 #define BAD_SECTOR_MAP_SIZE (29 * SECTOR_SIZE - 256)
41 /* format code 4 bad sector entry, ftape uses this
42 * internally for all format codes
44 typedef __u32 SectorMap;
45 /* variable and 1100 ft bad sector map entry. These three bytes represent
46 * a single sector address measured from BOT.
48 typedef struct NewSectorMap {
54 * ftape-bsm.c defined global vars.
58 * ftape-bsm.c defined global functions.
60 extern void update_bad_sector_map(__u8 * buffer);
61 extern void ftape_extract_bad_sector_map(__u8 * buffer);
62 extern SectorMap ftape_get_bad_sector_entry(int segment_id);
63 extern __u8 *ftape_find_end_of_bsm_list(__u8 * address);
64 extern void ftape_init_bsm(void);