1 /* ----------------------------------------------------------------------- *
3 * Copyright 2010 Gene Cumm
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
16 * Makes an image that contains the LBA in every *word of every sector
25 #define NUM_SECT (256*63+1)
27 #define SECT_INT (512 / sizeof(int))
29 typedef unsigned char uint8_t;
30 typedef unsigned int uint32_t;
32 const char DEF_FN[] = "lba.img";
34 int main(int argc, char *argv[])
36 int i, j, b[SECT_INT], rv = 0, one = 0;
43 if (strcasecmp("-1", argv[1]) == 0) {
59 for (i = 0; i < NUM_SECT; i++) {
63 for (j = 0; j < (512 / sizeof(int)); j++) {
71 puts("Unable to open for writing");