Print this page
fixup .text where possible
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/crypto/io/swrand.c
          +++ new/usr/src/uts/common/crypto/io/swrand.c
↓ open down ↓ 131 lines elided ↑ open up ↑
 132  132  /*
 133  133   * Module linkage information for the kernel.
 134  134   */
 135  135  static struct modlcrypto modlcrypto = {
 136  136          &mod_cryptoops,
 137  137          "Kernel Random number Provider"
 138  138  };
 139  139  
 140  140  static struct modlinkage modlinkage = {
 141  141          MODREV_1,
 142      -        (void *)&modlcrypto,
 143      -        NULL
      142 +        {   (void *)&modlcrypto,
      143 +            NULL }
 144  144  };
 145  145  
 146  146  /*
 147  147   * CSPI information (entry points, provider info, etc.)
 148  148   */
 149  149  static void swrand_provider_status(crypto_provider_handle_t, uint_t *);
 150  150  
 151  151  static crypto_control_ops_t swrand_control_ops = {
 152  152          swrand_provider_status
 153  153  };
↓ open down ↓ 2 lines elided ↑ open up ↑
 156  156      uchar_t *, size_t, uint_t, uint32_t, crypto_req_handle_t);
 157  157  static int swrand_generate_random(crypto_provider_handle_t,
 158  158      crypto_session_id_t, uchar_t *, size_t, crypto_req_handle_t);
 159  159  
 160  160  static crypto_random_number_ops_t swrand_random_number_ops = {
 161  161          swrand_seed_random,
 162  162          swrand_generate_random
 163  163  };
 164  164  
 165  165  static crypto_ops_t swrand_crypto_ops = {
 166      -        &swrand_control_ops,
 167      -        NULL,
 168      -        NULL,
 169      -        NULL,
 170      -        NULL,
 171      -        NULL,
 172      -        NULL,
 173      -        NULL,
 174      -        &swrand_random_number_ops,
 175      -        NULL,
 176      -        NULL,
 177      -        NULL,
 178      -        NULL,
 179      -        NULL,
 180      -        NULL,
 181      -        NULL,
 182      -        NULL,
      166 +        .co_control_ops = &swrand_control_ops,
      167 +        .co_random_ops = &swrand_random_number_ops
 183  168  };
 184  169  
 185      -static crypto_provider_info_t swrand_prov_info = {
      170 +static crypto_provider_info_t swrand_prov_info = {{{{
 186  171          CRYPTO_SPI_VERSION_4,
 187  172          "Kernel Random Number Provider",
 188  173          CRYPTO_SW_PROVIDER,
 189  174          {&modlinkage},
 190  175          NULL,
 191  176          &swrand_crypto_ops,
 192  177          0,
 193  178          NULL
 194      -};
      179 +}}}};
 195  180  
 196  181  int
 197  182  _init(void)
 198  183  {
 199  184          int ret;
 200  185          hrtime_t ts;
 201  186          time_t now;
 202  187  
 203  188          mutex_init(&srndpool_lock, NULL, MUTEX_DEFAULT, NULL);
 204  189          mutex_init(&buffer_lock, NULL, MUTEX_DEFAULT, NULL);
↓ open down ↓ 704 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX