Print this page
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/os/biosdisk.c
          +++ new/usr/src/uts/i86pc/os/biosdisk.c
↓ open down ↓ 117 lines elided ↑ open up ↑
 118  118                              (uchar_t *)&biosdev_info[drivenum - 0x80],
 119  119                              sizeof (biosdev_data_t));
 120  120                  }
 121  121          }
 122  122  }
 123  123  #endif
 124  124  
 125  125  static int
 126  126  bios_check_extension_present(uchar_t drivenum)
 127  127  {
 128      -        struct bop_regs rp = {0};
      128 +        struct bop_regs rp = {{0}};
 129  129          extern struct bootops           *bootops;
 130  130  
 131  131          rp.eax.word.ax = 0x4100;
 132  132          rp.ebx.word.bx = 0x55AA;
 133  133          rp.edx.word.dx = drivenum;
 134  134  
 135  135          /* make sure we have extension support */
 136  136          BOP_DOINT(bootops, 0x13, &rp);
 137  137  
 138  138          if (((rp.eflags & PS_C) != 0) || (rp.ebx.word.bx != 0xAA55)) {
↓ open down ↓ 7 lines elided ↑ open up ↑
 146  146                      "not supported cx = %x\n", rp.ecx.word.cx));
 147  147                  return (0);
 148  148          }
 149  149  
 150  150          return (1);
 151  151  }
 152  152  
 153  153  static int
 154  154  get_dev_params(uchar_t drivenum)
 155  155  {
 156      -        struct bop_regs rp = {0};
      156 +        struct bop_regs rp = {{0}};
 157  157          fn48_t   *bufp;
 158  158          extern struct bootops           *bootops;
 159  159          int i;
 160  160          int index;
 161  161          uchar_t *tmp;
 162  162  
 163  163          dprintf(("In get_dev_params\n"));
 164  164  
 165  165          bufp = (fn48_t *)BIOS_RES_BUFFER_ADDR;
 166  166  
↓ open down ↓ 31 lines elided ↑ open up ↑
 198  198          tmp = (uchar_t *)&biosdev_info[index].fn48_dev_params;
 199  199          for (i = 0; i < sizeof (*bufp); i++)
 200  200                  tmp[i] = ((uchar_t *)bufp)[i];
 201  201  
 202  202          return (1);
 203  203  }
 204  204  
 205  205  static int
 206  206  drive_present(uchar_t drivenum)
 207  207  {
 208      -        struct bop_regs rp = {0};
      208 +        struct bop_regs rp = {{0}};
 209  209  
 210  210          rp.eax.byte.ah = 0x8;   /* get params */
 211  211          rp.edx.byte.dl = drivenum;
 212  212  
 213  213          BOP_DOINT(bootops, 0x13, &rp);
 214  214  
 215  215          if (((rp.eflags & PS_C) != 0) || rp.eax.byte.ah != 0) {
 216  216                  dprintf(("drive not present drivenum %x eflag %x ah %x\n",
 217  217                      drivenum, rp.eflags, rp.eax.byte.ah));
 218  218                  return (0);
 219  219          }
 220  220  
 221  221          dprintf(("drive-present %x\n", drivenum));
 222  222          return (1);
 223  223  }
 224  224  
 225  225  static void
 226  226  reset_disk(uchar_t drivenum)
 227  227  {
 228      -        struct bop_regs rp = {0};
      228 +        struct bop_regs rp = {{0}};
 229  229          int status;
 230  230  
 231  231          rp.eax.byte.ah = 0x0;   /* reset disk */
 232  232          rp.edx.byte.dl = drivenum;
 233  233  
 234  234          BOP_DOINT(bootops, 0x13, &rp);
 235  235  
 236  236          status = rp.eax.byte.ah;
 237  237  
 238  238          if (((rp.eflags & PS_C) != 0) || status != 0)
 239  239                  dprintf(("Bad disk reset driv %x, status %x\n", drivenum,
 240  240                      status));
 241  241  }
 242  242  
 243  243  /* Get first block */
 244  244  static int
 245  245  read_firstblock(uchar_t drivenum)
 246  246  {
 247  247  
 248      -        struct bop_regs rp = {0};
      248 +        struct bop_regs rp = {{0}};
 249  249          caddr_t  bufp;
 250  250          uchar_t status;
 251  251          int i, index;
 252  252  
 253  253  
 254  254          reset_disk(drivenum);
 255  255          bufp = (caddr_t)BIOS_RES_BUFFER_ADDR;
 256  256  
 257  257  
 258  258          rp.eax.byte.ah = 0x2;   /* Read disk */
↓ open down ↓ 23 lines elided ↑ open up ↑
 282  282          biosdev_info[index].first_block_valid = 1;
 283  283          for (i = 0; i < 512; i++)
 284  284                  biosdev_info[index].first_block[i] = *((uchar_t *)bufp + i);
 285  285  
 286  286          return (1);
 287  287  }
 288  288  
 289  289  static int
 290  290  is_eltorito(uchar_t drivenum)
 291  291  {
 292      -        struct bop_regs rp = {0};
      292 +        struct bop_regs rp = {{0}};
 293  293          fn4b_t   *bufp;
 294  294          extern struct bootops           *bootops;
 295  295          int i;
 296  296  
 297  297          dprintf(("In is_eltorito\n"));
 298  298  
 299  299          bufp = (fn4b_t *)BIOS_RES_BUFFER_ADDR;
 300  300  
 301  301          /*
 302  302           * We cannot use bzero here as we're initializing data
↓ open down ↓ 26 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX