ReactOS  0.4.10-dev-348-gbcec1fd
isohybrid.c File Reference
#include <time.h>
#include <ctype.h>
#include <fcntl.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include "isohybrid.h"
#include "reactos_support_code.h"
Include dependency graph for isohybrid.c:

Go to the source code of this file.

Classes

struct  iso_primary_descriptor
 

Macros

#define _FILE_OFFSET_BITS   64
 
#define FMT   "%-20s %s\n"
 

Enumerations

enum  { VERBOSE = 1, EFI = 2, MAC = 4 }
 

Functions

void usage (void)
 
void printh (void)
 
int check_option (int argc, char *argv[])
 
uint16_t bendian_short (const uint16_t s)
 
uint32_t bendian_int (const uint32_t s)
 
uint16_t lendian_short (const uint16_t s)
 
uint32_t lendian_int (const uint32_t s)
 
uint64_t lendian_64 (const uint64_t s)
 
int check_banner (const uint8_t *buf)
 
int check_catalogue (const uint8_t *buf)
 
int read_catalogue (const uint8_t *buf)
 
void display_catalogue (void)
 
void read_mbr_template (char *path, uint8_t *mbr)
 
int initialise_mbr (uint8_t *mbr)
 
void display_mbr (const uint8_t *mbr, size_t len)
 
uint32_t chksum_crc32 (unsigned char *block, unsigned int length)
 
static uint16_tascii_to_utf16le (uint16_t *dst, const char *src)
 
int main (int argc, char *argv[])
 

Variables

charprog = NULL
 
int opterr
 
int optind
 
struct stat isostat
 
unsigned int padding = 0
 
uint8_t mode = 0
 
uint16_t head = 64
 
uint8_t sector = 32
 
uint8_t entry = 0
 
uint8_t offset = 0
 
uint16_t type = 0x17
 
uint32_t id = 0
 
uint8_t hd0 = 0
 
uint8_t partok = 0
 
char mbr_template_path [1024] = {0}
 
uint16_t ve [16]
 
uint32_t catoffset = 0
 
uint32_t c = 0
 
uint32_t cc = 0
 
uint32_t cs = 0
 
uint32_t psize = 0
 
uint32_t isosize = 0
 
uint32_t de_lba = 0
 
uint16_t de_seg = 0
 
uint16_t de_count = 0
 
uint16_t de_mbz2 = 0
 
uint8_t de_boot = 0
 
uint8_t de_media = 0
 
uint8_t de_sys = 0
 
uint8_t de_mbz1 = 0
 
uint32_t efi_lba = 0
 
uint32_t mac_lba = 0
 
uint16_t efi_count = 0
 
uint16_t mac_count = 0
 
uint8_t efi_boot = 0
 
uint8_t efi_media = 0
 
uint8_t efi_sys = 0
 
int apm_parts = 3
 
uint32_t crc_tab [256]
 

Macro Definition Documentation

#define _FILE_OFFSET_BITS   64

Definition at line 26 of file isohybrid.c.

#define FMT   "%-20s %s\n"

Referenced by printh().

Enumeration Type Documentation

anonymous enum
Enumerator
VERBOSE 
EFI 
MAC 

Definition at line 57 of file isohybrid.c.

57 { VERBOSE = 1 , EFI = 2 , MAC = 4};
Definition: isohybrid.c:57
Definition: isohybrid.c:57

Function Documentation

static uint16_t* ascii_to_utf16le ( uint16_t dst,
const char src 
)
static

Definition at line 815 of file isohybrid.c.

816 {
817  uint8_t *p = (uint8_t *)dst;
818  char c;
819 
820  do {
821  c = *src++;
822  *p++ = c;
823  *p++ = 0;
824  } while (c);
825 
826  return (uint16_t *)p;
827 }
unsigned short int uint16_t
Definition: acefiex.h:54
GLuint const GLubyte GLvoid * src
Definition: s_context.h:57
uint32_t c
Definition: isohybrid.c:75
BYTE uint8_t
Definition: msvideo1.c:66
GLuint const GLubyte GLvoid const GLvoid * dst
Definition: s_context.h:57
GLfloat GLfloat p
Definition: glext.h:8902
uint32_t bendian_int ( const uint32_t  s)

Definition at line 414 of file isohybrid.c.

415 {
416  uint32_t r = 1;
417 
418  if (!*(uint8_t *)&r)
419  return s;
420 
421  r = (s & 0x000000FF) << 24 | (s & 0xFF000000) >> 24
422  | (s & 0x0000FF00) << 8 | (s & 0x00FF0000) >> 8;
423 
424  return r;
425 }
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble s
Definition: gl.h:2039
BYTE uint8_t
Definition: msvideo1.c:66
UINT32 uint32_t
Definition: types.h:75
uint16_t bendian_short ( const uint16_t  s)

Definition at line 400 of file isohybrid.c.

401 {
402  uint16_t r = 1;
403 
404  if (!*(uint8_t *)&r)
405  return s;
406 
407  r = (s & 0x00FF) << 8 | (s & 0xFF00) >> 8;
408 
409  return r;
410 }
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
unsigned short int uint16_t
Definition: acefiex.h:54
GLdouble s
Definition: gl.h:2039
BYTE uint8_t
Definition: msvideo1.c:66
int check_banner ( const uint8_t buf)

Definition at line 473 of file isohybrid.c.

Referenced by main().

474 {
475  static const char banner[] = "\0CD001\1EL TORITO SPECIFICATION\0\0\0\0" \
476  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" \
477  "\0\0\0\0\0";
478 
479  if (!buf || memcmp(buf, banner, sizeof(banner) - 1))
480  return 1;
481 
482  buf += sizeof(banner) - 1;
483  memcpy(&catoffset, buf, sizeof(catoffset));
484 
486 
487  return 0;
488 }
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
uint32_t catoffset
Definition: isohybrid.c:74
uint32_t lendian_int(const uint32_t s)
Definition: isohybrid.c:442
void banner(void)
Definition: main.c:541
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
int check_catalogue ( const uint8_t buf)

Definition at line 492 of file isohybrid.c.

Referenced by main().

493 {
494  int i = 0;
495 
496  for (i = 0, cs = 0; i < 16; i++)
497  {
498  ve[i] = 0;
499  memcpy(&ve[i], buf, sizeof(ve[i]));
500 
501  ve[i] = lendian_short(ve[i]);
502 
503  buf += 2;
504  cs += ve[i];
505 
506  if (mode & VERBOSE)
507  printf("ve[%d]: %d, cs: %d\n", i, ve[i], cs);
508  }
509  if ((ve[0] != 0x0001) || (ve[15] != 0xAA55) || (cs & 0xFFFF))
510  return 1;
511 
512  return 0;
513 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
uint16_t ve[16]
Definition: isohybrid.c:73
uint32_t cs
Definition: isohybrid.c:75
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
uint16_t lendian_short(const uint16_t s)
Definition: isohybrid.c:428
#define printf
Definition: config.h:203
int check_option ( int  argc,
char argv[] 
)

Definition at line 271 of file isohybrid.c.

Referenced by main().

272 {
273  char *err = NULL;
274  int n = 0, ind = 0;
275 
276  const char optstr[] = ":h:s:e:o:t:i:b:umfcp?vV";
277  struct option lopt[] = \
278  {
279  { "entry", required_argument, NULL, 'e' },
280  { "offset", required_argument, NULL, 'o' },
281  { "type", required_argument, NULL, 't' },
282  { "id", required_argument, NULL, 'i' },
283 
284  { "forcehd0", no_argument, NULL, 'f' },
285  { "ctrlhd0", no_argument, NULL, 'c' },
286  { "partok", no_argument, NULL, 'p'},
287 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
288  { "uefi", no_argument, NULL, 'u'},
289  { "mac", no_argument, NULL, 'm'},
290 #endif
291  { "mbr", required_argument, NULL, 'b' },
292 
293  { "help", no_argument, NULL, '?' },
294  { "verbose", no_argument, NULL, 'v' },
295  { "version", no_argument, NULL, 'V' },
296 
297  { 0, 0, 0, 0 }
298  };
299 
300  opterr = mode = 0;
301  while ((n = getopt_long_only(argc, argv, optstr, lopt, &ind)) != -1)
302  {
303  switch (n)
304  {
305  case 'h':
306  head = strtoul(optarg, &err, 0);
307  if (head < 1 || head > 256)
308  errx(1, "invalid head: `%s', 1 <= head <= 256", optarg);
309  break;
310 
311  case 's':
312  sector = strtoul(optarg, &err, 0);
313  if (sector < 1 || sector > 63)
314  errx(1, "invalid sector: `%s', 1 <= sector <= 63", optarg);
315  break;
316 
317  case 'e':
318  entry = strtoul(optarg, &err, 0);
319  if (entry < 1 || entry > 4)
320  errx(1, "invalid entry: `%s', 1 <= entry <= 4", optarg);
321  if (mode & MAC || mode & EFI)
322  errx(1, "setting an entry is unsupported with EFI or Mac");
323  break;
324 
325  case 'o':
326  offset = strtoul(optarg, &err, 0);
327  if (*err || offset > 64)
328  errx(1, "invalid offset: `%s', 0 <= offset <= 64", optarg);
329  break;
330 
331  case 't':
332  type = strtoul(optarg, &err, 0);
333  if (*err || type > 255)
334  errx(1, "invalid type: `%s', 0 <= type <= 255", optarg);
335  break;
336 
337  case 'i':
338  id = strtoul(optarg, &err, 0);
339  if (*err)
340  errx(1, "invalid id: `%s'", optarg);
341  break;
342 
343  case 'f':
344  hd0 = 1;
345  break;
346 
347  case 'c':
348  hd0 = 2;
349  break;
350 
351  case 'p':
352  partok = 1;
353  break;
354 
355 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
356  case 'u':
357  mode |= EFI;
358  if (entry)
359  errx(1, "setting an entry is unsupported with EFI or Mac");
360  break;
361 
362  case 'm':
363  mode |= MAC;
364  if (entry)
365  errx(1, "setting an entry is unsupported with EFI or Mac");
366  break;
367 #endif
368 
369  case 'b':
370  if (strlen(optarg) >= sizeof(mbr_template_path))
371  errx(1, "--mbr : Path too long");
373  break;
374 
375  case 'v':
376  mode |= VERBOSE;
377  break;
378 
379  case 'V':
380  printf("%s version %s\n", prog, VERSION);
381  exit(0);
382 
383  case ':':
384  errx(1, "option `-%c' takes an argument", optopt);
385 
386  default:
387  case '?':
388  if (optopt)
389  errx(1, "invalid option `-%c', see --help", optopt);
390 
391  printh();
392  exit(0);
393  }
394  }
395 
396  return optind;
397 }
static int argc
Definition: ServiceArgs.c:12
int getopt_long_only(optarg_ctx *o, int argc, WCHAR *const *argv, const WCHAR *shortopts, const struct option *longopts, int *longind)
UINT32 strtoul(const char *String, char **Terminator, UINT32 Base)
Definition: utclib.c:696
Definition: isohybrid.c:57
int optopt
Definition: getopt.c:47
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * prog
Definition: isohybrid.c:47
uint8_t entry
Definition: isohybrid.c:63
GLintptr offset
Definition: glext.h:5920
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static char ** argv
Definition: ServiceArgs.c:11
uint8_t sector
Definition: isohybrid.c:61
uint8_t hd0
Definition: isohybrid.c:68
GLuint n
Definition: s_context.h:57
int int int * err
Definition: fci.h:172
void printh(void)
Definition: isohybrid.c:235
smooth NULL
Definition: ftsmooth.c:416
Definition: getopt.h:108
Definition: isohybrid.c:57
#define errx(...)
uint16_t head
Definition: isohybrid.c:60
char mbr_template_path[1024]
Definition: isohybrid.c:71
int optind
Definition: getopt.c:47
const char * optarg
Definition: getopt.c:49
uint8_t partok
Definition: isohybrid.c:69
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
void exit(int exitcode)
Definition: _exit.c:33
#define VERSION
Definition: rdesktop.h:45
int opterr
Definition: getopt.c:46
#define printf
Definition: config.h:203
uint32_t chksum_crc32 ( unsigned char block,
unsigned int  length 
)

Definition at line 788 of file isohybrid.c.

789 {
790  register unsigned long crc;
791  unsigned long i;
792 
793  crc = 0xFFFFFFFF;
794  for (i = 0; i < length; i++)
795  {
796  crc = ((crc >> 8) & 0x00FFFFFF) ^ crc_tab[(crc ^ *block++) & 0xFF];
797  }
798  return (crc ^ 0xFFFFFFFF);
799 }
static unsigned int block
Definition: xmlmemory.c:118
GLenum GLclampf GLint i
Definition: glfuncs.h:14
uint32_t crc_tab[256]
Definition: isohybrid.c:97
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
void display_catalogue ( void  )

Definition at line 589 of file isohybrid.c.

Referenced by main().

590 {
591  printf("de_boot: %hhu\n", de_boot);
592  printf("de_media: %hhu\n", de_media);
593  printf("de_seg: %hu\n", de_seg);
594  printf("de_sys: %hhu\n", de_sys);
595  printf("de_mbz1: %hhu\n", de_mbz1);
596  printf("de_count: %hu\n", de_count);
597  printf("de_lba: %u\n", de_lba);
598  printf("de_mbz2: %hu\n", de_mbz2);
599 }
uint8_t de_sys
Definition: isohybrid.c:82
uint8_t de_mbz1
Definition: isohybrid.c:82
uint16_t de_count
Definition: isohybrid.c:81
uint16_t de_seg
Definition: isohybrid.c:81
uint8_t de_boot
Definition: isohybrid.c:82
uint16_t de_mbz2
Definition: isohybrid.c:81
uint8_t de_media
Definition: isohybrid.c:82
uint32_t de_lba
Definition: isohybrid.c:80
#define printf
Definition: config.h:203
void display_mbr ( const uint8_t mbr,
size_t  len 
)

Definition at line 760 of file isohybrid.c.

Referenced by main().

761 {
762  unsigned char c = 0;
763  unsigned int i = 0, j = 0;
764 
765  printf("sizeof(MBR): %zu bytes\n", len);
766  for (i = 0; i < len; i++)
767  {
768  if (!(i % 16))
769  printf("%04d ", i);
770 
771  if (!(i % 8))
772  printf(" ");
773 
774  c = mbr[i];
775  printf("%02x ", c);
776 
777  if (!((i + 1) % 16))
778  {
779  printf(" |");
780  for (; j <= i; j++)
781  printf("%c", isprint(mbr[j]) ? mbr[j] : '.');
782  printf("|\n");
783  }
784  }
785 }
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint j
Definition: glfuncs.h:98
GLenum GLclampf GLint i
Definition: glfuncs.h:14
const GLubyte * c
Definition: glext.h:8905
GLenum GLsizei len
Definition: glext.h:6722
#define isprint(c)
Definition: acclib.h:73
#define printf
Definition: config.h:203
int initialise_mbr ( uint8_t mbr)

Definition at line 620 of file isohybrid.c.

Referenced by main().

621 {
622  int i = 0;
623  uint32_t tmp = 0;
624  uint8_t ptype = 0, *rbm = mbr;
625  uint8_t bhead = 0, bsect = 0, bcyle = 0;
626  uint8_t ehead = 0, esect = 0, ecyle = 0;
627 
628 #ifndef ISOHYBRID_C_STANDALONE
629  extern unsigned char isohdpfx[][MBRSIZE];
630 #endif
631 
632  if (mbr_template_path[0]) {
634  } else {
635 
636 #ifdef ISOHYBRID_C_STANDALONE
637 
638  err(1, "This is a standalone binary. You must specify --mbr. E.g with /usr/lib/syslinux/isohdpfx.bin");
639 
640 #else
641 
642  memcpy(mbr, &isohdpfx[hd0 + 3 * partok], MBRSIZE);
643 
644 #endif /* ! ISOHYBRID_C_STANDALONE */
645 
646  }
647 
648 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
649  if (mode & MAC) {
650  memcpy(mbr, afp_header, sizeof(afp_header));
651  }
652 #endif
653 
654  if (!entry)
655  entry = 1;
656 
657 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
658  if (mode & EFI)
659  type = 0;
660 #endif
661 
662  mbr += MBRSIZE; /* offset 432 */
663 
664  tmp = lendian_int(de_lba * 4);
665  memcpy(mbr, &tmp, sizeof(tmp));
666  mbr += sizeof(tmp); /* offset 436 */
667 
668  tmp = 0;
669  memcpy(mbr, &tmp, sizeof(tmp));
670  mbr += sizeof(tmp); /* offset 440 */
671 
672  tmp = lendian_int(id);
673  memcpy(mbr, &tmp, sizeof(tmp));
674  mbr += sizeof(tmp); /* offset 444 */
675 
676  mbr[0] = '\0';
677  mbr[1] = '\0';
678  mbr += 2; /* offset 446 */
679 
680  ptype = type;
681  psize = c * head * sector - offset;
682 
683  bhead = (offset / sector) % head;
684  bsect = (offset % sector) + 1;
685  bcyle = offset / (head * sector);
686 
687  bsect += (bcyle & 0x300) >> 2;
688  bcyle &= 0xFF;
689 
690  ehead = head - 1;
691  esect = sector + (((cc - 1) & 0x300) >> 2);
692  ecyle = (cc - 1) & 0xFF;
693 
694  for (i = 1; i <= 4; i++)
695  {
696  memset(mbr, 0, 16);
697  if (i == entry)
698  {
699  mbr[0] = 0x80;
700  mbr[1] = bhead;
701  mbr[2] = bsect;
702  mbr[3] = bcyle;
703  mbr[4] = ptype;
704  mbr[5] = ehead;
705  mbr[6] = esect;
706  mbr[7] = ecyle;
707 
708  tmp = lendian_int(offset);
709  memcpy(&mbr[8], &tmp, sizeof(tmp));
710 
711  tmp = lendian_int(psize);
712  memcpy(&mbr[12], &tmp, sizeof(tmp));
713  }
714 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
715  if (i == 2 && (mode & EFI))
716  {
717  mbr[0] = 0x0;
718  mbr[1] = 0xfe;
719  mbr[2] = 0xff;
720  mbr[3] = 0xff;
721  mbr[4] = 0xef;
722  mbr[5] = 0xfe;
723  mbr[6] = 0xff;
724  mbr[7] = 0xff;
725 
726  tmp = lendian_int(efi_lba * 4);
727  memcpy(&mbr[8], &tmp, sizeof(tmp));
728 
729  tmp = lendian_int(efi_count);
730  memcpy(&mbr[12], &tmp, sizeof(tmp));
731  }
732  if (i == 3 && (mode & MAC))
733  {
734  mbr[0] = 0x0;
735  mbr[1] = 0xfe;
736  mbr[2] = 0xff;
737  mbr[3] = 0xff;
738  mbr[4] = 0x0;
739  mbr[5] = 0xfe;
740  mbr[6] = 0xff;
741  mbr[7] = 0xff;
742 
743  tmp = lendian_int(mac_lba * 4);
744  memcpy(&mbr[8], &tmp, sizeof(tmp));
745 
746  tmp = lendian_int(mac_count);
747  memcpy(&mbr[12], &tmp, sizeof(tmp));
748  }
749 #endif
750  mbr += 16;
751  }
752  mbr[0] = 0x55;
753  mbr[1] = 0xAA;
754  mbr += 2;
755 
756  return mbr - rbm;
757 }
void read_mbr_template(char *path, uint8_t *mbr)
Definition: isohybrid.c:603
Definition: isohybrid.c:57
#define MBRSIZE
Definition: isohybrid.h:25
uint8_t entry
Definition: isohybrid.c:63
uint16_t efi_count
Definition: isohybrid.c:84
GLintptr offset
Definition: glext.h:5920
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
uint32_t efi_lba
Definition: isohybrid.c:83
uint16_t type
Definition: isohybrid.c:65
uint8_t sector
Definition: isohybrid.c:61
uint8_t hd0
Definition: isohybrid.c:68
GLenum GLclampf GLint i
Definition: glfuncs.h:14
uint8_t offset
Definition: isohybrid.c:64
uint32_t lendian_int(const uint32_t s)
Definition: isohybrid.c:442
uint32_t psize
Definition: isohybrid.c:77
Definition: isohybrid.c:57
const GLubyte * c
Definition: glext.h:8905
uint16_t head
Definition: isohybrid.c:60
char mbr_template_path[1024]
Definition: isohybrid.c:71
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
uint16_t mac_count
Definition: isohybrid.c:84
#define err(...)
BYTE uint8_t
Definition: msvideo1.c:66
uint32_t de_lba
Definition: isohybrid.c:80
uint32_t cc
Definition: isohybrid.c:75
UINT32 uint32_t
Definition: types.h:75
uint8_t partok
Definition: isohybrid.c:69
uint32_t mac_lba
Definition: isohybrid.c:83
#define memset(x, y, z)
Definition: compat.h:39
uint64_t lendian_64 ( const uint64_t  s)

Definition at line 456 of file isohybrid.c.

457 {
458  uint64_t r = 1;
459 
460  if (*(uint8_t *)&r)
461  return s;
462 
463  r = (s & 0x00000000000000FFull) << 56 | (s & 0xFF00000000000000ull) >> 56
464  | (s & 0x000000000000FF00ull) << 40 | (s & 0x00FF000000000000ull) >> 40
465  | (s & 0x0000000000FF0000ull) << 24 | (s & 0x0000FF0000000000ull) >> 24
466  | (s & 0x00000000FF000000ull) << 8 | (s & 0x000000FF00000000ull) >> 8;
467 
468  return r;
469 }
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble s
Definition: gl.h:2039
BYTE uint8_t
Definition: msvideo1.c:66
UINT64 uint64_t
Definition: types.h:77
uint32_t lendian_int ( const uint32_t  s)

Definition at line 442 of file isohybrid.c.

Referenced by check_banner(), initialise_mbr(), main(), and read_catalogue().

443 {
444  uint32_t r = 1;
445 
446  if (*(uint8_t *)&r)
447  return s;
448 
449  r = (s & 0x000000FF) << 24 | (s & 0xFF000000) >> 24
450  | (s & 0x0000FF00) << 8 | (s & 0x00FF0000) >> 8;
451 
452  return r;
453 }
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble s
Definition: gl.h:2039
BYTE uint8_t
Definition: msvideo1.c:66
UINT32 uint32_t
Definition: types.h:75
uint16_t lendian_short ( const uint16_t  s)

Definition at line 428 of file isohybrid.c.

Referenced by check_catalogue(), main(), and read_catalogue().

429 {
430  uint16_t r = 1;
431 
432  if (*(uint8_t *)&r)
433  return s;
434 
435  r = (s & 0x00FF) << 8 | (s & 0xFF00) >> 8;
436 
437  return r;
438 }
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
unsigned short int uint16_t
Definition: acefiex.h:54
GLdouble s
Definition: gl.h:2039
BYTE uint8_t
Definition: msvideo1.c:66
int main ( int argc  ,
char argv[] 
)

hosttype.c Copyright (C) 2002 by Brian Palmer brian.nosp@m.p@sg.nosp@m.inet..nosp@m.com

Definition at line 972 of file isohybrid.c.

973 {
974  int i = 0;
975  FILE *fp = NULL;
976  uint8_t *buf = NULL, *bufz = NULL;
977  int cylsize = 0, frac = 0;
978  size_t orig_gpt_size, free_space, gpt_size;
979  struct iso_primary_descriptor descriptor;
980 
981  prog = strcpy(alloca(strlen(argv[0]) + 1), argv[0]);
982  i = check_option(argc, argv);
983  argc -= i;
984  argv += i;
985 
986  if (!argc)
987  {
988  usage();
989  return 1;
990  }
991 
992 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
993  if ((mode & EFI) && offset)
994  errx(1, "%s: --offset is invalid with UEFI images\n", argv[0]);
995 #endif
996 
997  srand(time(NULL) << (getppid() << getpid()));
998 
999  if (!(fp = fopen(argv[0], "rb+")))
1000  err(1, "could not open file `%s'", argv[0]);
1001 
1002  if (fseeko(fp, (off_t) (16 << 11), SEEK_SET))
1003  err(1, "%s: seek error - 0", argv[0]);
1004 
1005  if (fread(&descriptor, sizeof(char), sizeof(descriptor), fp) != sizeof(descriptor))
1006  err(1, "%s: read error - 0", argv[0]);
1007 
1008  if (fseeko(fp, (off_t) 17 * 2048, SEEK_SET))
1009  err(1, "%s: seek error - 1", argv[0]);
1010 
1011  bufz = buf = calloc(BUFSIZE, sizeof(char));
1012  if (fread(buf, sizeof(char), BUFSIZE, fp) != BUFSIZE)
1013  err(1, "%s", argv[0]);
1014 
1015  if (check_banner(buf))
1016  errx(1, "%s: could not find boot record", argv[0]);
1017 
1018  if (mode & VERBOSE)
1019  printf("catalogue offset: %d\n", catoffset);
1020 
1021  if (fseeko(fp, ((off_t) catoffset) * 2048, SEEK_SET))
1022  err(1, "%s: seek error - 2", argv[0]);
1023 
1024  buf = bufz;
1025  memset(buf, 0, BUFSIZE);
1026  if (fread(buf, sizeof(char), BUFSIZE, fp) != BUFSIZE)
1027  err(1, "%s", argv[0]);
1028 
1029  if (check_catalogue(buf))
1030  errx(1, "%s: invalid boot catalogue", argv[0]);
1031 
1032  buf += sizeof(ve);
1033  if (read_catalogue(buf))
1034  errx(1, "%s: unexpected boot catalogue parameters", argv[0]);
1035 
1036  if (mode & VERBOSE)
1038 
1039  buf += 32;
1040 
1041 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
1042  if (mode & EFI)
1043  {
1044  if (!read_efi_section(buf)) {
1045  buf += 32;
1046  if (!read_efi_catalogue(buf, &efi_count, &efi_lba) && efi_lba) {
1047  offset = 0;
1048  } else {
1049  errx(1, "%s: invalid efi catalogue", argv[0]);
1050  }
1051  } else {
1052  errx(1, "%s: unable to find efi image", argv[0]);
1053  }
1054  }
1055 #endif
1056 
1057  buf += 32;
1058 
1059 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
1060  if (mode & MAC)
1061  {
1062  if (!read_efi_section(buf)) {
1063  buf += 32;
1064  if (!read_efi_catalogue(buf, &mac_count, &mac_lba) && mac_lba) {
1065  offset = 0;
1066  } else {
1067  errx(1, "%s: invalid efi catalogue", argv[0]);
1068  }
1069  } else {
1070  errx(1, "%s: unable to find mac efi image", argv[0]);
1071  }
1072  }
1073 #endif
1074 
1075  if (fseeko(fp, (((off_t) de_lba) * 2048 + 0x40), SEEK_SET))
1076  err(1, "%s: seek error - 3", argv[0]);
1077 
1078  buf = bufz;
1079  memset(buf, 0, BUFSIZE);
1080  if (fread(buf, sizeof(char), 4, fp) != 4)
1081  err(1, "%s", argv[0]);
1082 
1083  if (memcmp(buf, "\xFB\xC0\x78\x70", 4))
1084  errx(1, "%s: boot loader does not have an isolinux.bin hybrid " \
1085  "signature. Note that isolinux-debug.bin does not support " \
1086  "hybrid booting", argv[0]);
1087 
1088  if (stat(argv[0], &isostat))
1089  err(1, "%s", argv[0]);
1090 
1091  isosize = lendian_int(descriptor.size) * lendian_short(descriptor.block_size);
1092  free_space = isostat.st_size - isosize;
1093 
1094  cylsize = head * sector * 512;
1095  frac = isostat.st_size % cylsize;
1096  padding = (frac > 0) ? cylsize - frac : 0;
1097 
1098  if (mode & VERBOSE)
1099  printf("imgsize: %zu, padding: %d\n", (size_t)isostat.st_size, padding);
1100 
1101  cc = c = ( isostat.st_size + padding) / cylsize;
1102  if (c > 1024)
1103  {
1104  warnx("Warning: more than 1024 cylinders: %d", c);
1105  warnx("Not all BIOSes will be able to boot this device");
1106  cc = 1024;
1107  }
1108 
1109  if (!id)
1110  {
1111  if (fseeko(fp, (off_t) 440, SEEK_SET))
1112  err(1, "%s: seek error - 4", argv[0]);
1113 
1114  if (fread(&id, 1, 4, fp) != 4)
1115  err(1, "%s: read error", argv[0]);
1116 
1117  id = lendian_int(id);
1118  if (!id)
1119  {
1120  if (mode & VERBOSE)
1121  printf("random ");
1122  id = rand();
1123  }
1124  }
1125  if (mode & VERBOSE)
1126  printf("id: %u\n", id);
1127 
1128  buf = bufz;
1129  memset(buf, 0, BUFSIZE);
1130  i = initialise_mbr(buf);
1131 
1132  if (mode & VERBOSE)
1133  display_mbr(buf, i);
1134 
1135  if (fseeko(fp, (off_t) 0, SEEK_SET))
1136  err(1, "%s: seek error - 5", argv[0]);
1137 
1138  if (fwrite(buf, sizeof(char), i, fp) != (size_t)i)
1139  err(1, "%s: write error - 1", argv[0]);
1140 
1141 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
1142  if (efi_lba) {
1143  reverse_uuid(basic_partition);
1144  reverse_uuid(hfs_partition);
1145 
1146  /* 512 byte header, 128 entries of 128 bytes */
1147  orig_gpt_size = gpt_size = 512 + (128 * 128);
1148 
1149  /* Leave space for the APM if necessary */
1150  if (mac_lba)
1151  gpt_size += (4 * 2048);
1152 
1153  buf = calloc(gpt_size, sizeof(char));
1154  memset(buf, 0, gpt_size);
1155 
1156  /*
1157  * We need to ensure that we have enough space for the secondary GPT.
1158  * Unlike the primary, this doesn't need a hole for the APM. We still
1159  * want to be 1MB aligned so just bump the padding by a megabyte.
1160  */
1161  if (free_space < orig_gpt_size && padding < orig_gpt_size) {
1162  padding += 1024 * 1024;
1163  }
1164 
1165  /*
1166  * Determine the size of the ISO filesystem. This will define the size
1167  * of the partition that covers it.
1168  */
1169  psize = isosize / 512;
1170 
1171  /*
1172  * Primary GPT starts at sector 1, secondary GPT starts at 1 sector
1173  * before the end of the image
1174  */
1175  initialise_gpt(buf, 1, (isostat.st_size + padding - 512) / 512, 1);
1176 
1177  if (fseeko(fp, (off_t) 512, SEEK_SET))
1178  err(1, "%s: seek error - 6", argv[0]);
1179 
1180  if (fwrite(buf, sizeof(char), gpt_size, fp) != (size_t)gpt_size)
1181  err(1, "%s: write error - 2", argv[0]);
1182  }
1183 
1184  if (mac_lba)
1185  {
1186  /* Apple partition entries filling 2048 bytes each */
1187  int apm_size = apm_parts * 2048;
1188 
1189  buf = realloc(buf, apm_size);
1190  memset(buf, 0, apm_size);
1191 
1192  initialise_apm(buf, APM_OFFSET);
1193 
1194  fseeko(fp, (off_t) APM_OFFSET, SEEK_SET);
1195  fwrite(buf, sizeof(char), apm_size, fp);
1196  }
1197 #endif
1198 
1199  if (padding)
1200  {
1201  if (fsync(fileno(fp)))
1202  err(1, "%s: could not synchronise", argv[0]);
1203 
1204  if (ftruncate(fileno(fp), isostat.st_size + padding))
1205  err(1, "%s: could not add padding bytes", argv[0]);
1206  }
1207 
1208 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
1209  if (efi_lba) {
1210  buf = realloc(buf, orig_gpt_size);
1211  memset(buf, 0, orig_gpt_size);
1212 
1213  buf += orig_gpt_size - sizeof(struct gpt_header);
1214 
1215  initialise_gpt(buf, (isostat.st_size + padding - 512) / 512, 1, 0);
1216 
1217  /* Shift back far enough to write the 128 GPT entries */
1218  buf -= 128 * sizeof(struct gpt_part_header);
1219 
1220  /*
1221  * Seek far enough back that the gpt header is 512 bytes before the
1222  * end of the image
1223  */
1224 
1225  if (fseeko(fp, (isostat.st_size + padding) - orig_gpt_size, SEEK_SET))
1226  err(1, "%s: seek error - 8", argv[0]);
1227 
1228  if (fwrite(buf, sizeof(char), orig_gpt_size, fp) != orig_gpt_size)
1229  err(1, "%s: write error - 4", argv[0]);
1230  }
1231 #endif
1232 
1233  free(buf);
1234  fclose(fp);
1235 
1236  return 0;
1237 }
#define realloc
Definition: debug_ros.c:6
void display_catalogue(void)
Definition: isohybrid.c:589
static int argc
Definition: ServiceArgs.c:12
void usage(void)
Definition: isohybrid.c:228
Definition: isohybrid.c:57
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
int check_option(int argc, char *argv[])
Definition: isohybrid.c:271
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
uint16_t ve[16]
Definition: isohybrid.c:73
char * prog
Definition: isohybrid.c:47
#define free
Definition: debug_ros.c:5
__kernel_off_t off_t
Definition: linux.h:201
uint16_t efi_count
Definition: isohybrid.c:84
GLintptr offset
Definition: glext.h:5920
void __cdecl srand(_In_ unsigned int _Seed)
#define warnx(...)
int check_banner(const uint8_t *buf)
Definition: isohybrid.c:473
__u16 time
Definition: mkdosfs.c:366
int read_catalogue(const uint8_t *buf)
Definition: isohybrid.c:517
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
uint32_t efi_lba
Definition: isohybrid.c:83
uint32_t catoffset
Definition: isohybrid.c:74
static char ** argv
Definition: ServiceArgs.c:11
#define alloca
Definition: malloc.h:361
uint8_t sector
Definition: isohybrid.c:61
uint32_t isosize
Definition: isohybrid.c:77
GLenum GLclampf GLint i
Definition: glfuncs.h:14
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_ int __cdecl rand(void)
Definition: rand.c:10
int ftruncate(int, off_t)
Definition: unistd.h:30
smooth NULL
Definition: ftsmooth.c:416
uint32_t lendian_int(const uint32_t s)
Definition: isohybrid.c:442
uint32_t psize
Definition: isohybrid.c:77
int apm_parts
Definition: isohybrid.c:87
#define SEEK_SET
Definition: jmemansi.c:26
_CRTIMP int __cdecl getpid(void)
unsigned int padding
Definition: isohybrid.c:50
struct stat isostat
Definition: isohybrid.c:49
static void free_space(struct gl_context *ctx)
Definition: t_draw.c:40
_Check_return_ _CRTIMP int __cdecl fileno(_In_ FILE *_File)
Definition: isohybrid.c:57
#define errx(...)
const GLubyte * c
Definition: glext.h:8905
uint16_t head
Definition: isohybrid.c:60
int check_catalogue(const uint8_t *buf)
Definition: isohybrid.c:492
uint16_t mac_count
Definition: isohybrid.c:84
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
#define err(...)
BYTE uint8_t
Definition: msvideo1.c:66
uint32_t de_lba
Definition: isohybrid.c:80
void display_mbr(const uint8_t *mbr, size_t len)
Definition: isohybrid.c:760
uint16_t lendian_short(const uint16_t s)
Definition: isohybrid.c:428
uint32_t cc
Definition: isohybrid.c:75
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
Definition: stat.h:345
int initialise_mbr(uint8_t *mbr)
Definition: isohybrid.c:620
#define calloc
Definition: rosglue.h:14
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
uint32_t mac_lba
Definition: isohybrid.c:83
#define memset(x, y, z)
Definition: compat.h:39
#define BUFSIZE
Definition: discard.c:12
#define printf
Definition: config.h:203
void printh ( void  )

Definition at line 235 of file isohybrid.c.

Referenced by check_option().

236 {
237 #define FMT "%-20s %s\n"
238 
239  usage();
240 
241  printf("\n");
242  printf("Options:\n");
243  printf(FMT, " -h <X>", "Number of geometry heads (default 64)");
244  printf(FMT, " -s <X>", "Number of geometry sectors (default 32)");
245  printf(FMT, " -e --entry", "Specify partition entry number (1-4)");
246  printf(FMT, " -o --offset", "Specify partition offset (default 0)");
247  printf(FMT, " -t --type", "Specify partition type (default 0x17)");
248  printf(FMT, " -i --id", "Specify MBR ID (default random)");
249 #ifdef REACTOS_ISOHYBRID_EFI_MAC_SUPPORT
250  printf(FMT, " -u --uefi", "Build EFI bootable image");
251  printf(FMT, " -m --mac", "Add AFP table support");
252 #endif
253  printf(FMT, " -b --mbr <PATH>", "Load MBR from PATH");
254 
255  printf("\n");
256  printf(FMT, " --forcehd0", "Assume we are loaded as disk ID 0");
257  printf(FMT, " --ctrlhd0", "Assume disk ID 0 if the Ctrl key is pressed");
258  printf(FMT, " --partok", "Allow booting from within a partition");
259 
260  printf("\n");
261  printf(FMT, " -? --help", "Display this help");
262  printf(FMT, " -v --verbose", "Display verbose output");
263  printf(FMT, " -V --version", "Display version information");
264 
265  printf("\n");
266  printf("Report bugs to <pj.pandit@yahoo.co.in>\n");
267 }
void usage(void)
Definition: isohybrid.c:228
#define FMT
#define printf
Definition: config.h:203
int read_catalogue ( const uint8_t buf)

Definition at line 517 of file isohybrid.c.

Referenced by main().

518 {
519  memcpy(&de_boot, buf++, 1);
520  memcpy(&de_media, buf++, 1);
521 
522  memcpy(&de_seg, buf, 2);
524  buf += 2;
525 
526  memcpy(&de_sys, buf++, 1);
527  memcpy(&de_mbz1, buf++, 1);
528 
529  memcpy(&de_count, buf, 2);
531  buf += 2;
532 
533  memcpy(&de_lba, buf, 4);
535  buf += 4;
536 
537  memcpy(&de_mbz2, buf, 2);
539  buf += 2;
540 
541  if (de_boot != 0x88 || de_media != 0
542  || (de_seg != 0 && de_seg != 0x7C0) || de_count != 4)
543  return 1;
544 
545  return 0;
546 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
uint8_t de_sys
Definition: isohybrid.c:82
uint8_t de_mbz1
Definition: isohybrid.c:82
uint16_t de_count
Definition: isohybrid.c:81
uint32_t lendian_int(const uint32_t s)
Definition: isohybrid.c:442
uint16_t de_seg
Definition: isohybrid.c:81
uint8_t de_boot
Definition: isohybrid.c:82
uint16_t de_mbz2
Definition: isohybrid.c:81
uint8_t de_media
Definition: isohybrid.c:82
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
uint32_t de_lba
Definition: isohybrid.c:80
uint16_t lendian_short(const uint16_t s)
Definition: isohybrid.c:428
void read_mbr_template ( char path,
uint8_t mbr 
)

Definition at line 603 of file isohybrid.c.

Referenced by initialise_mbr().

604 {
605  FILE *fp;
606  int ret;
607 
608  fp = fopen(path, "rb");
609  if (fp == NULL)
610  err(1, "could not open MBR template file `%s'", path);
611  clearerr(fp);
612  ret = fread(mbr, 1, MBRSIZE, fp);
613  if (ferror(fp) || ret != MBRSIZE)
614  err(1, "error while reading MBR template file `%s'", path);
615  fclose(fp);
616 }
_Check_return_ _CRTIMP int __cdecl ferror(_In_ FILE *_File)
#define MBRSIZE
Definition: isohybrid.h:25
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
smooth NULL
Definition: ftsmooth.c:416
int ret
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
#define err(...)
Definition: services.c:325
_CRTIMP void __cdecl clearerr(_Inout_ FILE *_File)
void usage ( void  )

Definition at line 228 of file isohybrid.c.

Referenced by main(), and printh().

229 {
230  printf("Usage: %s [OPTIONS] <boot.iso>\n", prog);
231 }
char * prog
Definition: isohybrid.c:47
#define printf
Definition: config.h:203

Variable Documentation

int apm_parts = 3

Definition at line 87 of file isohybrid.c.

Referenced by main().

uint32_t c = 0

Definition at line 75 of file isohybrid.c.

Referenced by ascii_to_utf16le().

uint32_t catoffset = 0

Definition at line 74 of file isohybrid.c.

Referenced by check_banner(), and main().

uint32_t crc_tab[256]

Definition at line 97 of file isohybrid.c.

Referenced by chksum_crc32().

uint32_t cs = 0

Definition at line 75 of file isohybrid.c.

Referenced by __xmlGlobalInitMutexLock(), array_tests(), balance_data_chunk(), BlpArchInitialize(), CFn_FitCharSet(), check_catalogue(), client_security_QueryInterface(), Collection_addCert(), Collection_addCRL(), Collection_addCTL(), Collection_enumCert(), Collection_enumCRL(), Collection_enumCTL(), Collection_release(), create_chain(), create_test_wndproc(), fnIMLangFontLink2_CodePagesToCodePage(), fnIMLangFontLink2_CodePageToCodePages(), full_title(), fullscreen_wnd_proc(), get_glyph_indices(), III_antialias(), InternetHostSecurityManager_QueryCustomPolicy(), IntGetNewWindowMode(), IntSetNewWindowMode(), iso2022jp_mbtowc(), iso2022jp_wctomb(), main_window_procA(), mdi_child_wnd_proc_1(), mdi_child_wnd_proc_2(), MDIClientWndProc_common(), MIDIMAP_LoadSettings(), CardRegion::MoveCard(), MsgiAnsiToUnicodeCleanup(), MsgiAnsiToUnicodeMessage(), MsgiUnicodeToAnsiCleanup(), MsgiUnicodeToAnsiMessage(), OleDocumentView_UIActivate(), CardStack::Pop(), PopupMenuWndProc(), RealDefWindowProcA(), RealDefWindowProcW(), StringTest::replace(), scroll_init_proc(), scrub_chunk(), CardRegion::SetCardStack(), shader_glsl_destroy(), SPY_DumpStructure(), STATIC_WindowProc(), StaticWndProc_common(), SysLinkWindowProc(), test_control_procA(), test_flash_ax(), test_GetCharABCWidths(), test_GetGlyphOutline(), test_MDI_child_stack(), test_nonexistent_font(), test_realization(), test_RtlInitializeCriticalSectionEx(), test_RtlLeaveCriticalSection(), test_set_getsockopt(), tool_window_procA(), toolbar_subclass_proc(), TypeCmd(), UserLoadKbdLayout(), wined3d_cs_create(), wined3d_cs_run(), wined3d_cs_st_submit(), winsizes_wnd_proc(), and CardWindow::WndProc().

uint8_t de_boot = 0

Definition at line 82 of file isohybrid.c.

Referenced by display_catalogue(), and read_catalogue().

uint16_t de_count = 0

Definition at line 81 of file isohybrid.c.

Referenced by display_catalogue(), and read_catalogue().

uint32_t de_lba = 0

Definition at line 80 of file isohybrid.c.

Referenced by display_catalogue(), initialise_mbr(), main(), and read_catalogue().

uint8_t de_mbz1 = 0

Definition at line 82 of file isohybrid.c.

Referenced by display_catalogue(), and read_catalogue().

uint16_t de_mbz2 = 0

Definition at line 81 of file isohybrid.c.

Referenced by display_catalogue(), and read_catalogue().

uint8_t de_media = 0

Definition at line 82 of file isohybrid.c.

Referenced by display_catalogue(), and read_catalogue().

uint16_t de_seg = 0

Definition at line 81 of file isohybrid.c.

Referenced by display_catalogue(), and read_catalogue().

uint8_t de_sys = 0

Definition at line 82 of file isohybrid.c.

Referenced by display_catalogue(), and read_catalogue().

uint8_t efi_boot = 0

Definition at line 85 of file isohybrid.c.

uint16_t efi_count = 0

Definition at line 84 of file isohybrid.c.

Referenced by initialise_mbr(), and main().

uint32_t efi_lba = 0

Definition at line 83 of file isohybrid.c.

Referenced by initialise_mbr(), and main().

uint8_t efi_media = 0

Definition at line 85 of file isohybrid.c.

uint8_t efi_sys = 0

Definition at line 85 of file isohybrid.c.

uint8_t entry = 0

Definition at line 63 of file isohybrid.c.

Referenced by _mesa_alloc_dispatch_table(), _mesa_DeleteHashTable(), _mesa_HashDeleteAll(), _mesa_HashInsert(), _mesa_HashLookup_unlocked(), _mesa_HashNextEntry(), _mesa_HashNumEntries(), _mesa_HashPrint(), _mesa_HashRemove(), _mesa_HashWalk(), _svcauth_des(), abort_dochost_tasks(), abort_window_bindings(), acpi_bus_find_driver(), acpi_bus_receive_event(), acquire_shader_resources(), ACTION_CostFinalize(), ACTION_FinishCustomActions(), ACTION_GetComponentInstallStates(), ACTION_GetFeatureInstallStates(), ACTION_InstallFiles(), ACTION_InstallValidate(), ACTION_MsiPublishAssemblies(), ACTION_MsiUnpublishAssemblies(), ACTION_PatchFiles(), ACTION_ProcessComponents(), ACTION_PublishFeatures(), ACTION_RefCountComponent(), ACTION_RegisterClassInfo(), ACTION_RegisterExtensionInfo(), ACTION_RegisterMIMEInfo(), ACTION_RegisterProgIdInfo(), ACTION_RemoveFiles(), ACTION_UnpublishFeatures(), ACTION_UnpublishProduct(), ACTION_UnregisterClassInfo(), ACTION_UnregisterExtensionInfo(), ACTION_UnregisterMIMEInfo(), ACTION_UnregisterProgIdInfo(), ACTION_UpdateComponentStates(), FileChildWindow::activate_entry(), activate_textservices(), add_active_textservice(), add_coclass_typeinfo(), add_component_by_priority(), add_cookie(), add_cookie_headers(), add_data_to_folder(), add_dispinterface_typeinfo(), add_enum_typeinfo(), add_files_to_folder(), add_func_desc(), add_function_decl(), add_importlib(), add_local_oid_text_to_control(), add_resource_data_entry(), add_resource_dir_entry(), add_sink_handler(), add_source_to_list(), add_struct_field(), add_structure_typeinfo(), add_table(), add_typedef(), add_undo(), add_union_typeinfo(), add_var_desc(), add_wildcard(), QuickLaunchBar::AddButton(), StartMenu::AddEntry(), StartMenu::AddShellEntries(), QuickLaunchBar::AddShortcuts(), AddStringToHash(), alloc_child_window(), alloc_entry(), alloc_msi_remote_handle(), alloc_msihandle(), alloc_rootdir_entry(), alloc_user_entry(), AllocateDictionaryEntry(), apartment_disconnectproxies(), apartment_findfromoxid(), apartment_findfromtid(), apartment_freeunusedlibraries(), apartment_getclassobject(), apartment_release(), append_attr(), append_attr_list(), append_str(), append_warning(), apply_lights(), arbfp_blit_set(), assign_stub_out_args(), ATL::AtlComModuleRegisterServer(), ATL::AtlComModuleUnregisterServer(), attr_cache_entry_create(), attr_cache_find_or_create(), AVISplitter_next_request(), BIDI_DetermineLevels(), build_iface_list(), Bus_FDO_PnP(), Bus_PlugInDevice(), byte_swap_ifd_data(), cache_authorization(), cache_basic_authorization(), cache_cleanup(), cache_containers_enum(), cache_containers_find(), cache_containers_free(), cache_insert(), cache_lookup(), Pane::calc_single_width(), Pane::calc_widths(), calculate_ea_list_length(), calculate_file_cost(), callwndproc_proc(), cctrl_event_OnButtonClicked(), cctrl_event_OnCheckButtonToggled(), cctrl_event_OnControlActivating(), cctrl_event_OnItemSelected(), cert_find_alt_name_entry(), CertAddStoreToCollection(), CertGetNameStringW(), CertRemoveStoreFromCollection(), CertVerifyCRLRevocation(), ChannelHooks_ClientFillBuffer(), ChannelHooks_ClientGetSize(), ChannelHooks_ClientNotify(), ChannelHooks_ServerFillBuffer(), ChannelHooks_ServerGetSize(), ChannelHooks_ServerNotify(), check_all_user_types(), check_arg_attrs(), check_coclass_attrs(), check_codebase(), check_conformance_expr_list(), check_dispiface_attrs(), check_enum_attrs(), check_field_attrs(), check_for_additional_prototype_types(), check_function_attrs(), check_iface_attrs(), check_library_attrs(), check_module_attrs(), check_option(), check_remoting_args(), check_remoting_fields(), check_statements(), check_struct_attrs(), check_typedef_attrs(), check_union_attrs(), ChildWndProc(), chmc_pmgl_done(), ciffile_FindComponent(), ciffile_FindGroup(), ciffile_Release(), ClassInsertCScanList(), ClassRemoveCScanList(), clear_output_vars(), clear_task_timer(), ClientIdentity_QueryMultipleInterfaces(), clipbrd_wndproc(), clone_hlsl_type(), close_output_buffer(), cmp_codepage(), CoGetPSClsid(), collect_connections(), collect_objects(), CollectProgramsThread::collect_programs(), FindProgramDlg::collect_programs_callback(), collect_query_data(), Collection_control(), Collection_enumCert(), Collection_enumCRL(), Collection_enumCTL(), Collection_release(), COM_GetRegisteredClassObject(), COM_RevokeAllClasses(), FileChildWindow::Command(), compare_hlsl_types(), compare_param_hlsl_types(), CompartmentEnumGuid_Next(), CompartmentMgr_ClearCompartment(), CompartmentMgr_Destructor(), CompartmentMgr_GetCompartment(), compile_function(), COMPOBJ_DllList_Add(), COMPOBJ_DllList_Free(), COMPOBJ_DllList_Get(), component_free(), component_GetDependency(), component_GetUrl(), ComponentEnum_Clone(), ComponentEnum_Next(), ComponentEnum_Release(), ComponentFactory_CreateBitmapFromHBITMAP(), components_count_expr_list(), components_count_type(), connect_scripts(), connection_collector(), context_apply_fbo_state(), context_bind_shader_resources(), context_create_fbo_entry(), context_destroy_gl_resources(), context_entry_from_guid(), context_enum_fbo_entries(), context_find_fbo_entry(), context_get_entry(), context_handle_registered(), context_load_shader_resources(), context_texture_update(), ContextPropertyList_Copy(), ContextPropertyList_EnumPropIDs(), ContextPropertyList_FindProperty(), ContextPropertyList_Free(), ContextPropertyList_RemoveProperty(), ContextPropertyList_SetProperty(), Control_WndProc(), Control_WndProc_Create(), ConvertDbgHelp(), copy_data_blocks(), CorDebug_Terminate(), CoRegisterPSClsid(), CoRevokeClassObject(), count_children(), XMLStorage::XMLWriter::create(), create_automatic_entry(), create_msft_typeinfo(), create_msft_typelib(), create_sltg_typelib(), create_sub_body(), create_taskdialog_template(), CreateComponentInfo(), CreateTestPalette(), CredUIConfirmCredentialsW(), CredUIPromptForCredentialsW(), CRYPT_AsnDecodeAltNameEntry(), CRYPT_AsnDecodeCRLEntry(), CRYPT_AsnDecodeCTLEntry(), CRYPT_AsnEncodeAltNameEntry(), CRYPT_CollectionAddContext(), CRYPT_CollectionAdvanceEnum(), CRYPT_FindCertificateInCRL(), CRYPT_GetCachedSIP(), CRYPT_RegWriteToReg(), crypt_sip_free(), CryptCATEnumerateMember(), CryptEnumOIDInfo(), CryptFindOIDInfo(), ctrl_container_on_wm_destroy(), ctrl_container_reparent(), ctrl_container_resize(), ctrl_free(), ctrl_set_font(), CURSORICON_LoadFromFileW(), customctrl_resize(), d3d8_allocate_handle(), d3d8_free_handle(), d3d8_get_object(), d3d8_resource_free_private_data(), d3d9_resource_free_private_data(), d3d_device3_NextViewport(), d3d_device_inner_Release(), d3d_viewport_NextLight(), d3drm_object_cleanup(), d3drm_object_delete_destroy_callback(), D3DXFrameFind(), D3DXLoadMeshFromXInMemory(), D3DXLoadSkinMeshFromXof(), DataCache_CreateEntry(), DataCache_Destroy(), DataCache_DiscardCache(), DataCache_Draw(), DataCache_EnumCache(), DataCache_GetEntryForFormatEtc(), DataCache_GetExtent(), DataCache_IsDirty(), DataCache_Load(), DataCache_OnRun(), DataCache_OnStop(), DataCache_Save(), DataCache_Uncache(), DataCache_UpdateCache(), ddraw7_EnumSurfaces(), ddraw_allocate_handle(), ddraw_free_handle(), ddraw_get_object(), ddraw_surface7_FreePrivateData(), deactivate_remove_conflicting_ts(), deactivate_textservices(), debug_dump_instr_list(), debug_dump_ir_constructor(), declare_prefix(), declare_stub_args(), declare_var(), declare_vars(), decode_readdir_entry(), deleg_lock_find(), deleg_lock_update(), deleg_open_find(), delegation_find(), delegation_remove(), delete_domain(), dequeue_task(), destroy_format(), destroy_script(), detach_inner_window(), detach_ranges(), detach_selection(), device_assign(), device_status(), dict_enum_Next(), dictionary_Items(), dictionary_Keys(), dictionary_RemoveAll(), disable_children(), CMenuFocusManager::DisableMouseTrack(), DllMain(), do_warning(), does_any_iface(), dump_TLBRefType(), dupattrs(), EMFDRV_CreatePalette(), empty_body_list(), empty_frame_queue(), empty_header_list(), empty_new_prop_list(), empty_param_list(), empty_redo_stack(), end_container(), enum_components_Next(), enum_groups_Next(), CEnumRegRoot::EnumerateNext(), CEnumNTDirectory::EnumerateNext(), EnumerateSecurityPackagesW(), EnumTfDocumentMgr_Next(), TaskBar::EnumWndProc(), ept_delete(), ept_insert(), ept_map(), event_add_local(), event_add_source(), event_cleanup_subscriptions(), event_remove(), event_subscribe(), events_OnFileOk(), events_OnFolderChange(), events_OnFolderChanging(), events_OnOverwrite(), events_OnSelectionChange(), events_OnTypeChange(), exec_queued_code(), ext4_xattr_block_fetch(), ext4_xattr_inode_fetch(), ext4_xattr_write_to_disk(), ShellDirectory::extract_icons(), fcbopen_main(), FCIDestroy(), feature_cost(), fields_memsize(), file_device_find_or_create(), file_layout_recall_all(), file_layout_recall_file(), file_layout_recall_fsid(), FileChildWindow::FileChildWindow(), FileExists(), fill_delegated_proxy_table(), fill_delegated_stub_table(), fill_in_file_stream_information(), fill_process(), fill_source_list(), fill_stubless_table(), find_action_by_guid(), find_adjacent_face(), find_arg(), find_array_or_string_in_struct(), find_body(), find_cached_table(), find_cookie(), RegDirectory::find_entry(), WinDirectory::find_entry(), ShellDirectory::find_entry(), NtObjDirectory::find_entry(), find_entry_by_id(), find_entry_by_name(), find_entry_default(), find_entry_shell(), find_entry_win(), find_ept_entry(), find_ffp_frag_shader(), find_file(), find_filepatch(), find_first_entry(), find_global_prop(), find_hfontitem(), find_http_header(), find_identifier(), find_importinfo(), find_input_signature(), find_installed_monitor(), find_last_loop(), find_local(), find_loop_control_values(), find_name_space(), find_next(), find_prop(), find_proxy_manager(), find_ps_factory(), find_resource_data(), find_resource_dir_entry(), find_resourceA(), find_resourceW(), find_sub_namespace(), find_superblock(), find_window(), FindOrAddString(), fix_incomplete(), fix_incomplete_types(), flush_pending_tasks(), follow_parent(), free_assembly(), free_cached_tables(), free_cookie_domain_list(), free_entries(), free_extension(), free_feature(), free_folder(), free_handle(), free_hlsl_type(), free_http_headers(), free_information_tree(), free_instr_list(), free_list(), free_oid_info(), free_output_buffer(), free_package_structures(), free_parsed_config_file(), free_recorded_instruction(), free_resource_directory(), free_session(), free_sinks(), free_source_list(), free_stack(), Entry::free_subentries(), free_tls_list(), free_transforms(), free_user_entry(), FreeChangeNotifications(), FreeDictionaryEntry(), FreeUrlCacheSpaceW(), function_invoke(), GdipCreateBitmapFromHBITMAP(), GdipDeleteGraphics(), GdipEnumerateMetafileSrcRectDestPoints(), GdipPlayMetafileRecord(), gen_struct_fields(), gen_stub(), gen_stub_thunk(), generic_handle_registered(), get_active_textservice(), get_attrp(), get_attrv(), get_best_icon_file_entry(), get_best_icon_file_offset(), get_block_bh_mdl(), get_block_bh_pin(), get_body(), get_bool_const(), get_cctrl(), get_cctrl_from_dlgid(), get_client_counts(), get_context_handle_offset(), get_cookie(), get_cookie_container(), get_cookie_domain(), get_declared_prefix_uri(), get_default_script_guid(), get_domattr(), get_driver_version_info(), get_first_item(), get_func_flags(), get_func_handle_var(), get_func_obj_entry(), get_func_oi2_flags(), get_function_buffer_size(), get_generic_handle_offset(), get_glsl_program_entry(), get_item(), get_keyitem_pair(), get_loop_control_const(), get_manifest_in_module(), get_mime_filter(), get_overloaded_func(), get_padding(), get_param_flags(), get_parameter_by_name(), get_path(), Entry::get_path_base(), get_range_object(), get_reflection_type(), get_resource_sizes(), get_runtime_info(), get_script_host(), get_server(), get_size_procformatstring(), get_src_param(), get_static_entry(), get_struct_fc(), get_stub_manager(), get_stub_manager_from_ipid(), get_stub_manager_from_object(), get_temp_binary(), get_textservice_clsid(), get_textservice_sink(), get_ttf_nametable_entry(), get_type(), get_user_full_handle(), get_user_object_handle(), get_volume_space_required(), GetDictionaryEntry(), CNtObjectFolderExtractIcon::GetIconLocation(), CRegistryFolderExtractIcon::GetIconLocation(), CRegistryFolder::GetInfoFromPidl(), CNtObjectFolder::GetInfoFromPidl(), GetTargetInterface(), gid_cmp(), glsl_blitter_get_program(), grab_table(), group_cache_copy(), group_cmp(), gxv_EntryTable_validate(), gxv_StateArray_validate(), gxv_XEntryTable_validate(), gxv_XStateArray_validate(), handle_readdir(), has_all_extensions_removed(), has_delegated_locks(), has_extensions(), has_one_extension_installed(), has_out_arg_or_return(), hash_mac_addrs(), HashAddString(), hook_thread_proc(), HTMLAttributeCollection_invoke(), HTMLAttributeCollection_Release(), HTMLDocumentNode_destructor(), HTMLElement_destructor(), HtmlHelpW(), IAssemblyEnumImpl_GetNextAssembly(), IAssemblyEnumImpl_Release(), ICO_ExtractIconExW(), IcoDecoder_GetFrame(), ICreateTypeInfo2_fnAddRefTypeInfo(), id3_link(), IDirectInputDevice2WImpl_GetProperty(), IDirectInputDevice2WImpl_SetProperty(), IDirectMusicCollectionImpl_EnumInstrument(), IDirectMusicCollectionImpl_GetInstrument(), IDirectSoundBufferImpl_Unlock(), idmap_query_attrs(), IDxDiagContainerImpl_EnumChildContainerNames(), IDxDiagContainerImpl_EnumPropNames(), IDxDiagContainerImpl_GetChildContainerInternal(), IDxDiagContainerImpl_GetProp(), IEnumSTATSTGImpl_GetNextRef(), IFileDialog2_fnUnadvise(), IFileDialogCustomize_fnGetSelectedControlItem(), IHlinkBC_fnRelease(), IHlinkBC_SetInitialHlink(), IHlinkBC_UpdateHlink(), ImageUnload(), IMAPIPROP_GetValue(), IMM_FreeAllImmHkl(), IMM_FreeThreadData(), IMM_GetImmHkl(), IMM_GetThreadData(), import_certs_from_dir(), BookmarkList::import_IE_favorites(), inf_free(), inf_next_section(), inf_section_free(), inf_section_next_value(), init_library(), init_script_cache(), init_table_list(), initialise_mbr(), initializer_size(), insert_assembly(), Pane::insert_entries(), insert_entries(), TrayNotifyDlg::InsertItem(), CExplorerBand::InsertSubitems(), install_assembly(), InternetSession_UnregisterMimeFilter(), invalidate_handle(), IOAPICDump(), IOAPICSetupIrqs(), IPersistStreamImpl_Load(), IPropData_fnGetPropList(), IPropData_fnHrGetPropAccess(), IPropData_fnRelease(), IRichEditOle_fnGetObject(), IrotEnumRunning(), IrotGetObject(), IrotGetTimeOfLastChange(), IrotIsRunning(), IrotNoteChangeTime(), IrotRegister(), IrotRevoke(), is_attr(), is_full_pointer_function(), is_full_uninstall(), is_interpreted_func(), is_object(), is_registered_patch_media(), is_warning_enabled(), CMenuFocusManager::IsTrackedWindow(), CMenuFocusManager::IsTrackedWindowOrParent(), iterate_all_classes(), iterate_all_extensions(), ITypeInfo_fnAddressOfMember(), ITypeInfo_fnGetRefTypeInfo(), ITypeLib2_fnRelease(), ShellBrowser::jump_to(), FileChildWindow::jump_to_int(), ShellBrowser::jump_to_pidl(), KeystrokeMgr_IsPreservedKey(), KeystrokeMgr_PreserveKey(), KeystrokeMgr_UnpreserveKey(), layout_coverage_status(), layout_ordered_insert(), layout_recall_merge(), layout_recall_range(), layout_state_deferred_recalls(), layout_state_find_and_delete(), layout_state_find_or_create(), layout_state_free_layouts(), layout_state_free_recalls(), layout_state_merge(), layout_update_range(), lie_about_fs_type(), lineGetCountryW(), list_add(), list_search(), LISTBOX_Directory(), LL_hook_proc(), load_given_appid(), load_given_class(), load_given_extension(), load_given_mime(), load_given_progid(), LoadIfdMetadata(), LocalServer_QueryService(), Lookup(), lookup_identifier(), lookup_named_item(), LookupIconIdFromDirectoryEx(), loop_condition(), mac_entry_insert(), main(), make_directory_records(), make_statement_typedef(), ME_ApplyStyle(), ME_CommitCoalescingUndo(), ME_CommitUndo(), ME_ContinueCoalescingTransaction(), ME_DestroyEditor(), ME_EmptyUndoStack(), ME_Redo(), ME_Undo(), merge_free_rows(), merge_table(), MimeBody_DeleteProp(), MimeBody_GetParameters(), MimeBody_SetProp(), MimeInternat_FindCharset(), MimeInternat_GetCharsetInfo(), MimeInternat_Release(), MmAllocSwapPage(), MMDevEnum_UnregisterEndpointNotificationCallback(), MmPageOutPhysicalAddress(), MmpPageOutPhysicalAddress(), move_attr(), move_files_wildcard(), MSFT_CustData(), MSFT_ReadAllGuids(), MSFT_ReadAllRefs(), MSFT_ReadGuid(), MSFT_ReadName(), MSFT_ReadString(), msi_add_cabinet_stream(), msi_check_publish(), msi_check_unpublish(), MSI_CommitTables(), msi_dialog_destroy(), msi_dialog_find_control(), msi_dialog_find_control_by_hwnd(), msi_dialog_find_control_by_type(), msi_dialog_find_font(), msi_dialog_set_tab_order(), msi_dialog_update_all_controls(), msi_dialog_update_controls(), msi_event_cleanup_all_subscriptions(), msi_event_fire(), msi_get_cabinet_stream(), msi_get_loaded_component(), msi_get_loaded_feature(), msi_get_loaded_file(), msi_get_loaded_folder(), MSI_GetFeatureCost(), msi_package_add_info(), msi_package_add_media_disk(), msi_publish_patches(), msi_publish_sourcelist(), msi_reset_folders(), msi_resolve_target_folder(), msi_seltree_add_child_features(), MSI_SetFeatureStates(), MSI_SetFeatureStateW(), MSI_SetTargetPathW(), msi_table_apply_transform(), msi_vcl_get_cost(), MsiDatabaseMergeW(), MsiSourceListAddSourceExW(), MUIClearPage(), MUIDisplayError(), MUIDisplayPage(), MUIGetString(), mxwriter_get_output(), name_cache_entry_create(), name_cache_search(), name_cache_unlink_children_recursive(), namespacemanager_getDeclaredPrefix(), namespacemanager_getURI(), navigate_history(), NBNameCacheAddEntry(), CEnumRegKey::NextKey(), CEnumRegKey::NextValue(), nfs41_attr_cache_lookup(), nfs41_attr_cache_update(), nfs41_client_delegation_free(), nfs41_client_delegation_recovery(), nfs41_client_delegation_return_lru(), nfs41_CloseSrvOpen(), nfs41_Create(), nfs41_CreateVNetRoot(), nfs41_GetReparsePoint(), nfs41_Lock(), nfs41_mount(), nfs41_QueryDirectory(), nfs41_QueryEaInformation(), nfs41_QueryFileInformation(), nfs41_QuerySecurityInformation(), nfs41_QueryVolumeInformation(), nfs41_Read(), nfs41_recover_client_state(), nfs41_server_find_or_create(), nfs41_SetEaInformation(), nfs41_SetFileInformation(), nfs41_SetReparsePoint(), nfs41_SetSecurityInformation(), nfs41_shutdown_daemon(), nfs41_superblock_list_free(), nfs41_Unlock(), nfs41_unmount(), nfs41_upcall(), nfs41_UpcallCreate(), nfs41_Write(), nfs_decode_compound(), nfs_encode_compound(), FindProgramDlg::Notify(), NotifyArea::Notify(), notify_clients(), nsChannelBSC_beginning_transaction(), nswindow_to_window(), NtUserValidateHandleSecure(), OLEFontImpl_Release(), ShellBrowser::OnDefaultCommand(), ShellBrowser::OnTreeGetDispInfo(), ShellBrowser::OnTreeItemExpanding(), ShellBrowser::OnTreeItemRClick(), ShellBrowser::OnTreeItemSelected(), open_connection(), open_dde_url(), open_state_free(), open_stream(), open_unlock_delegate(), open_unlock_remove(), OutputQueue_FreeSamples(), OutputQueueImpl_ThreadProc(), Pane::Pane(), parse_hlsl(), parse_supported_runtime(), pass(), patch_add_media(), patch_offset_list_free(), patch_update_file_sequence(), patch_update_filepatch_sequence(), pattern_threads_init(), PdhCloseQuery(), PdhCollectQueryDataWithTime(), PeekHistory(), PHEventSink_Invoke(), pnfs_file_device_list_free(), pnfs_file_device_list_invalidate(), pnfs_file_device_notify(), pnfs_layout_list_free(), pnfs_layout_recall_status(), pnfs_layout_state_prepare(), pnfs_rpc_layoutget(), pool_alloc(), pool_destroy(), pop_control_frame(), pop_element(), pop_task(), populate_ea_list(), principal_cmp(), procaddr(), process_colcache(), process_directory(), process_dochost_tasks(), process_palette(), process_response_headers(), process_state_property(), process_tfs_stmts(), process_timer(), CMenuFocusManager::ProcessMouseDown(), CMenuFocusManager::ProcessMouseMove(), CMenuFocusManager::ProcessMouseUp(), NotifyArea::ProcessTrayNotification(), PropertyBag_Release(), PropertyStore_GetAt(), PropertyStore_GetCount(), PropertyStore_LookupValue(), PropertyStore_Release(), proxy_free_variables(), proxy_manager_destroy(), proxy_manager_disconnect(), proxy_manager_find_ifproxy(), Proxy_MarshalInterface(), QueryCygwinSymlink(), queue_add_timer(), queue_get_timeout(), queue_timer(), queue_timer_expire(), queueoutchar(), radiobuttonlist_on_bn_clicked(), radiobuttonlist_set_selected_item(), RegDirectory::read_directory(), WinDirectory::read_directory(), RegistryRoot::read_directory(), ShellDirectory::read_directory(), NtObjDirectory::read_directory(), read_directory(), Entry::read_directory_base(), read_directory_shell(), read_directory_win(), read_prop(), Entry::read_tree(), read_tree_shell(), read_tree_win(), ReadChmSystem(), readdir_add_dots(), reader_clear_attrs(), reader_clear_elements(), reader_clear_ns(), reader_get_element(), reader_lookup_ns(), reader_lookup_nsdef(), reader_mark_ns_nodes(), reader_move_to_first_attribute(), reader_parse_endtag(), reader_pop_element(), reader_pop_ns_nodes(), recover_locks(), TaskBar::Refresh(), NotifyArea::Refresh(), TrayNotifyDlg::Refresh(), refresh_child(), reg_typedefs(), release_script(), release_script_hosts(), release_shader_resources(), release_std_git(), release_typelib(), ReleaseComponentInfos(), remove_attribute(), remove_folder(), remove_persistent_folder(), remove_target_tasks(), reset_cabinet(), retrieve_cached_authorization(), retrieve_cached_basic_authorization(), revoke_registered_psclsids(), root_client_find(), root_client_find_addrs(), root_free(), rpc_cancel_thread(), RPC_RegisterChannelHook(), RPC_RegisterInterface(), RPC_UnregisterAllChannelHooks(), RPC_UnregisterInterface(), RpcAssoc_Release(), RpcMgmtWaitServerListen(), RPCRT4_destroy_all_protseqs(), RPCRT4_find_interface(), RPCRT4_get_or_create_serverprotseq(), RPCRT4_GetAssociation(), RPCRT4_ServerFreeAllRegisteredAuthInfo(), RPCRT4_ServerGetRegisteredAuthInfo(), RPCRT4_start_listen(), RPCRT4_stop_listen(), RpcServerAssoc_FindContextHandle(), RpcServerAssoc_GetAssociation(), RpcServerInqBindings(), RpcServerUnregisterIf(), RtlDeleteTimerQueueEx(), run_insert_script(), RunningObjectTableImpl_Destroy(), RunningObjectTableImpl_GetObject(), RunningObjectTableImpl_GetTimeOfLastChange(), RunningObjectTableImpl_IsRunning(), RunningObjectTableImpl_NoteChangeTime(), RunningObjectTableImpl_Release(), RunningObjectTableImpl_Revoke(), RuntimeHost_AddDomain(), RuntimeHost_DeleteDomain(), RuntimeHost_Destroy(), runtimehost_uninit(), sampler(), save_persistent_cookie(), schan_EnumerateSecurityPackagesW(), schedule_install_files(), ScriptFreeCache(), SdbpAddStringToTable(), SdbpTableDestroy(), SECUR32_findPackageW(), SECUR32_freeProviders(), ShellBrowser::select_entry(), ShellBrowser::select_folder(), session_destroy(), FileChildWindow::set_curdir(), set_curdir(), set_glsl_compute_shader_program(), set_glsl_shader_program(), set_lib_flags(), set_target_path(), set_textservice_sink(), set_var_types(), TrayNotifyDlg::SetIconMode(), shader_arb_handle_instruction(), shader_arb_load_constants_f(), shader_cleanup_reg_maps(), shader_constant_is_local(), shader_delete_constant_list(), shader_generate_arb_declarations(), shader_generate_glsl_declarations(), shader_glsl_compile_compute_shader(), shader_glsl_destroy(), shader_glsl_find_ffp_fragment_shader(), shader_glsl_find_ffp_vertex_shader(), shader_glsl_load_constants_f(), shader_glsl_load_constants_i(), shader_glsl_load_constantsB(), shader_glsl_loop(), shader_glsl_rep(), shader_hw_else(), shader_hw_endif(), shader_hw_endloop(), shader_hw_endrep(), shader_hw_ifc(), shader_hw_loop(), shader_hw_rep(), shader_record_sample(), shader_sm4_free(), SHChangeNotify(), SHChangeNotifyDeregister(), should_enumerate_device(), SLTG_DoRefs(), SLTG_ReadName(), sltg_write_header(), snapshot_GetData(), snapshot_GetDataHere(), SnmpUtilVarBindListFree(), Entry::sort_directory(), SortDirectory(), source_find(), SQLWritePrivateProfileString(), stack_find(), stack_peek(), stack_pop(), start_address_thread(), START_TEST(), state_cleanup(), stateblock_init_lights(), stateid_array(), StdGlobalInterfaceTable_FindEntry(), StdGlobalInterfaceTable_GetInterfaceFromGlobal(), StdGlobalInterfaceTable_RegisterInterfaceInGlobal(), StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(), string_buffer_get(), string_buffer_list_cleanup(), StringHashTableFree(), StringListAppend(), struct_var_initializer(), stub_manager_delete(), stub_manager_disconnect(), stub_manager_find_ifstub(), stub_manager_ipid_to_ifstub(), SYSLINK_ClearDoc(), SYSLINK_Draw(), SYSLINK_GetFocusLink(), SYSLINK_GetLinkItemByIndex(), SYSLINK_GetNextLink(), SYSLINK_GetPrevLink(), SYSLINK_HitTest(), SYSLINK_LinkAtPt(), SYSLINK_Render(), SYSLINK_SetFocusLink(), TABLE_find_matching_rows(), TableFindPtr(), taskdialog_clear_controls(), test_AddMonitor(), test_CompareStringA(), test_decodeCRLDistPoints(), test_decodeCRLIssuingDistPoint(), test_decodeCRLToBeSigned(), test_default_properties(), test_DeleteMonitor(), test_encodeAltName(), test_encodeAuthorityKeyId2(), test_encodeCRLDistPoints(), test_encodeCRLIssuingDistPoint(), test_encodeCRLToBeSigned(), test_enumerate(), test_get_attributes(), test_get_dataType(), test_get_nodeTypeString(), test_GetAcceptLanguagesA(), test_GetDIBits(), test_GetProductInfo(), test_handles_process(), test_HashLinks(), test_installOIDFunctionAddress(), test_nodeTypedValue(), test_saxreader_encoding(), test_saxreader_features(), test_slist(), test_SummaryInfo(), test_thread_start_address(), test_tiff_palette(), testFindCertInCRL(), testFindCRL(), testQuery(), thread_count(), ThreadFocusHookProc(), ThreadMgr_AssociateFocus(), ThreadMgr_Destructor(), ThreadMgr_OnDocumentMgrDestruction(), TLB_append_guid(), TLB_append_str(), TLB_copy_all_custdata(), TLB_FreeCustData(), TLB_get_custdata_by_guid(), TLB_ReadTypeLib(), TransactedSnapshotImpl_Commit(), TransactedSnapshotImpl_CopyTree(), TransactedSnapshotImpl_CreateStubEntry(), TransactedSnapshotImpl_DestroyTemporaryCopy(), TransactedSnapshotImpl_EnsureReadEntry(), TransactedSnapshotImpl_FindFirstChild(), TransactedSnapshotImpl_MadeCopy(), TransactedSnapshotImpl_MakeStreamDirty(), tt_face_free_name(), tt_face_load_font_dir(), tt_face_load_loca(), tt_face_load_name(), tt_face_lookup_table(), TWAIN_ProcessEvent(), type_buffer_alignment(), type_has_full_pointer(), type_has_pointers(), type_new_function(), type_union_get_cases(), type_union_get_switch_value(), ui_create_colourmap(), ui_draw_text(), uid_cmp(), uninitialize_directinput_instance(), uninstall_assembly(), union_memsize(), unregister_namespace(), update_ini_callback(), update_open_dropdown(), NotifyArea::UpdateIcons(), urlcache_entry_alloc(), urlcache_entry_commit(), user_cache_copy(), user_type_offset(), user_type_registered(), UserAllocHandle(), UserDereferenceObject(), UserFreeHandle(), UserGetObject(), UserGetObjectNoErr(), UserMarkObjectDestroy(), username_cmp(), UserObjectInDestroy(), vbnamespacemanager_popContext(), vbnamespacemanager_Release(), verify_cert_revocation_with_crl_offline(), verify_cert_revocation_with_crl_online(), vfatDelFCBFromTable(), vfatGrabFCBFromTable(), viewport_activate(), visit_http_headers(), warning_disable(), warning_enable(), wine_rb_get(), wine_rb_put(), wine_rb_remove(), wined3d_colour_from_ddraw_colour(), wined3d_palette_get_entries(), wined3d_palette_set_entries(), wined3d_private_store_cleanup(), wined3d_private_store_get_private_data(), wined3d_register_window(), wined3d_state_get_light(), wined3d_state_record_lights(), wined3d_texture_cleanup(), wined3d_texture_set_compatible_renderbuffer(), wined3d_texture_unload(), wined3d_unregister_window(), wined3d_wndproc(), WMSFT_compile_custdata(), WMSFT_compile_guids(), WMSFT_compile_impfile(), WMSFT_compile_impinfo(), WMSFT_compile_names(), WMSFT_compile_strings(), FileChildWindow::WndProc(), NotifyArea::WndProc(), StartMenu::WndProc(), WNetEnumCachedPasswords(), write_args(), write_client_call_routine(), write_client_ifaces(), write_coclasses(), write_conf_or_var_desc(), write_context_handle_rundowns(), write_cpp_method_def(), write_data_blocks(), write_descriptors(), write_endpoints(), write_enums(), write_expr_eval_routine_list(), write_expr_eval_routines(), write_fields(), write_files(), write_fixed_array_pointer_descriptions(), write_folders(), write_forward_decls(), write_func_param_struct(), write_function_stub(), write_generic_handle_routine_list(), write_generic_handle_routines(), write_header_stmts(), write_id_data_stmts(), write_imports(), write_inline_wrappers(), write_interfaces(), write_local_stubs_stmts(), write_method_macro(), write_msi_summary_info(), write_no_repeat_pointer_descriptions(), write_output_buffer(), write_parameters_init(), write_pointer_checks(), write_pointer_description_offsets(), write_proc_func_header(), write_procformatstring_func(), write_procformatstring_stmts(), write_progids(), write_proxy_stmts(), write_range_tfs(), write_registry_values(), write_remoting_arg(), write_remoting_arguments(), write_resources(), write_rundown_routines(), write_server_stmts(), write_struct_members(), write_struct_tfs(), write_typelib_interfaces(), write_union_tfs(), write_user_quad_list(), write_user_types(), write_varying_array_pointer_descriptions(), WSHIoctl_GetInterfaceList(), xmlDictGrow(), xmlDictLookup(), xmlDictQLookup(), xmlHashAddEntry3(), xmlHashLookup3(), xmlHashQLookup3(), xmlHashRemoveEntry3(), xmlHashUpdateEntry3(), xmlreader_MoveToAttributeByName(), xmlreader_MoveToElement(), xmlreader_MoveToNextAttribute(), xmlwriter_Release(), xslprocessor_addParameter(), xslprocessor_Release(), and yyparse().

uint8_t hd0 = 0

Definition at line 68 of file isohybrid.c.

Referenced by check_option(), and initialise_mbr().

uint16_t head = 64

Definition at line 60 of file isohybrid.c.

Referenced by check_option(), initialise_mbr(), and main().

uint32_t id = 0

Definition at line 66 of file isohybrid.c.

uint32_t isosize = 0

Definition at line 77 of file isohybrid.c.

Referenced by main().

struct stat isostat

Definition at line 49 of file isohybrid.c.

Referenced by main().

uint16_t mac_count = 0

Definition at line 84 of file isohybrid.c.

Referenced by initialise_mbr(), and main().

uint32_t mac_lba = 0

Definition at line 83 of file isohybrid.c.

Referenced by initialise_mbr(), and main().

char mbr_template_path[1024] = {0}

Definition at line 71 of file isohybrid.c.

Referenced by check_option(), and initialise_mbr().

Definition at line 56 of file isohybrid.c.

Definition at line 64 of file isohybrid.c.

Referenced by initialise_mbr().

int opterr

Definition at line 46 of file getopt.c.

Referenced by _getopt_internal(), check_option(), and getopt().

uint8_t partok = 0

Definition at line 69 of file isohybrid.c.

Referenced by check_option(), and initialise_mbr().

uint32_t psize = 0

Definition at line 77 of file isohybrid.c.

Referenced by initialise_mbr(), and main().

uint16_t type = 0x17

Definition at line 65 of file isohybrid.c.

Referenced by initialise_mbr().

uint16_t ve[16]

Definition at line 73 of file isohybrid.c.

Referenced by check_catalogue(), and main().