Print this page
9696 add /etc/system.d support
Portions contributed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Toomas Soome <tsoome@me.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/modctl.c
          +++ new/usr/src/uts/common/os/modctl.c
↓ open down ↓ 1226 lines elided ↑ open up ↑
1227 1227          return (err);
1228 1228  }
1229 1229  
1230 1230  /*
1231 1231   * return the /devices paths associated with the specified devid and
1232 1232   * minor name.
1233 1233   */
1234 1234  /*ARGSUSED*/
1235 1235  static int
1236 1236  modctl_devid2paths(ddi_devid_t udevid, char *uminor_name, uint_t flag,
1237      -        size_t *ulensp, char *upaths)
     1237 +    size_t *ulensp, char *upaths)
1238 1238  {
1239 1239          ddi_devid_t     devid = NULL;
1240 1240          int             devid_len;
1241 1241          char            *minor_name = NULL;
1242 1242          dev_info_t      *dip = NULL;
1243 1243          int             circ;
1244 1244          struct ddi_minor_data   *dmdp;
1245 1245          char            *path = NULL;
1246 1246          int             ulens;
1247 1247          int             lens;
↓ open down ↓ 2096 lines elided ↑ open up ↑
3344 3344   */
3345 3345  void
3346 3346  mod_askparams()
3347 3347  {
3348 3348          static char s0[64];
3349 3349          intptr_t fd;
3350 3350  
3351 3351          if ((fd = kobj_open(systemfile)) != -1L)
3352 3352                  kobj_close(fd);
3353 3353          else
3354      -                systemfile = NULL;
     3354 +                systemfile = self_assembly = NULL;
3355 3355  
3356 3356          /*CONSTANTCONDITION*/
3357 3357          while (1) {
3358 3358                  printf("Name of system file [%s]:  ",
3359 3359                      systemfile ? systemfile : "/dev/null");
3360 3360  
3361 3361                  console_gets(s0, sizeof (s0));
3362 3362  
3363 3363                  if (s0[0] == '\0')
3364 3364                          break;
3365 3365                  else if (strcmp(s0, "/dev/null") == 0) {
3366      -                        systemfile = NULL;
     3366 +                        systemfile = self_assembly = NULL;
3367 3367                          break;
3368 3368                  } else {
3369 3369                          if ((fd = kobj_open(s0)) != -1L) {
3370 3370                                  kobj_close(fd);
3371 3371                                  systemfile = s0;
     3372 +                                self_assembly = NULL;
3372 3373                                  break;
3373 3374                          }
3374 3375                  }
3375 3376                  printf("can't find file %s\n", s0);
3376 3377          }
3377 3378  }
3378 3379  
3379 3380  static char loading_msg[] = "loading '%s' id %d\n";
3380 3381  static char load_msg[] = "load '%s' id %d loaded @ 0x%p/0x%p size %d/%d\n";
3381 3382  
↓ open down ↓ 1453 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX