Print this page
onc plus-be-gone

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/swapgeneric.c
          +++ new/usr/src/uts/common/os/swapgeneric.c
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21      -/* ONC_PLUS EXTRACT START */
  22   21  /*
  23   22   * Copyright (c) 1982, 2010, Oracle and/or its affiliates. All rights reserved.
  24   23   */
  25      -/* ONC_PLUS EXTRACT END */
  26   24  
  27   25  /*
  28   26   * Configure root, swap and dump devices.
  29   27   */
  30   28  
  31   29  #include <sys/types.h>
  32   30  #include <sys/param.h>
  33   31  #include <sys/sysmacros.h>
  34   32  #include <sys/signal.h>
  35   33  #include <sys/cred.h>
↓ open down ↓ 283 lines elided ↑ open up ↑
 319  317          static char *wmesg = "forceload of %s failed";
 320  318          char *name;
 321  319  
 322  320          name = sysp->sys_ptr;
 323  321          BMDPRINTF(("preload_module: %s\n", name));
 324  322          if (modloadonly(NULL, name) < 0)
 325  323                  cmn_err(CE_WARN, wmesg, name);
 326  324          return (0);
 327  325  }
 328  326  
 329      -/* ONC_PLUS EXTRACT START */
 330  327  /*
 331  328   * We want to load all the modules needed to mount the root filesystem,
 332  329   * so that when we start the ball rolling in 'getrootdev', every module
 333  330   * should already be in memory, just waiting to be init-ed.
 334  331   */
 335  332  
 336  333  int
 337  334  loadrootmodules(void)
 338  335  {
 339  336          struct vfssw    *vsw;
 340  337          char            *this;
 341  338          char            *name;
 342  339          int             err;
 343      -/* ONC_PLUS EXTRACT END */
 344  340          int             i, proplen;
 345  341          extern char     *impl_module_list[];
 346  342          extern char     *platform_module_list[];
 347  343  
 348  344          /* Make sure that the PROM's devinfo tree has been created */
 349  345          ASSERT(ddi_root_node());
 350  346  
 351  347          BMDPRINTF(("loadrootmodules: fstype %s\n", rootfs.bo_fstype));
 352  348          BMDPRINTF(("loadrootmodules: name %s\n", rootfs.bo_name));
 353  349          BMDPRINTF(("loadrootmodules: flags 0x%x\n", rootfs.bo_flags));
↓ open down ↓ 122 lines elided ↑ open up ↑
 476  472          }
 477  473  
 478  474          /*
 479  475           * Preload (load-only, no init) all modules which
 480  476           * were added to the /etc/system file with the
 481  477           * FORCELOAD keyword.
 482  478           */
 483  479          BMDPRINTF(("loadrootmodules: preload_module\n"));
 484  480          (void) mod_sysctl_type(MOD_FORCELOAD, preload_module, NULL);
 485  481  
 486      -/* ONC_PLUS EXTRACT START */
 487  482          /*
 488  483           * If we booted otw then load in the plumbing
 489  484           * routine now while we still can. If we didn't
 490  485           * boot otw then we will load strplumb in main().
 491  486           *
 492  487           * NFS is actually a set of modules, the core routines,
 493  488           * a diskless helper module, rpcmod, and the tli interface.  Load
 494  489           * them now while we still can.
 495  490           *
 496  491           * Because we glomb all versions of nfs into a single module
↓ open down ↓ 78 lines elided ↑ open up ↑
 575  570           * Preload modules needed for booting as a cluster.
 576  571           */
 577  572          err = clboot_loadrootmodules();
 578  573  
 579  574  out:
 580  575          if (err != 0 && (boothowto & RB_ASKNAME))
 581  576                  goto loop;
 582  577  
 583  578          return (err);
 584  579  }
 585      -/* ONC_PLUS EXTRACT END */
 586  580  
 587  581  static int
 588  582  get_bootpath_prop(char *bootpath)
 589  583  {
 590  584          if (root_is_ramdisk) {
 591  585                  if (BOP_GETPROP(bootops, "bootarchive", bootpath) == -1)
 592  586                          return (-1);
 593  587                  (void) strlcat(bootpath, ":a", BO_MAXOBJNAME);
 594  588          } else {
 595  589                  /*
↓ open down ↓ 622 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX