Print this page
OS-192 zone_create() warning on headnode

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/zonecfg/zonecfg.c
          +++ new/usr/src/cmd/zonecfg/zonecfg.c
↓ open down ↓ 6402 lines elided ↑ open up ↑
6403 6403  
6404 6404          if (!global_scope) {
6405 6405                  zerr(gettext("resource specification incomplete"));
6406 6406                  saw_error = B_TRUE;
6407 6407                  if (ret_val == Z_OK)
6408 6408                          ret_val = Z_INSUFFICIENT_SPEC;
6409 6409          }
6410 6410  
6411 6411          if (save) {
6412 6412                  if (ret_val == Z_OK) {
     6413 +                        /*
     6414 +                         * If the zone doesn't yet have a debug ID, set one now.
     6415 +                         */
     6416 +                        if (zonecfg_get_did(handle) == -1)
     6417 +                                zonecfg_set_did(handle);
     6418 +
6413 6419                          if ((ret_val = zonecfg_save(handle)) == Z_OK) {
6414 6420                                  need_to_commit = B_FALSE;
6415 6421                                  (void) strlcpy(revert_zone, zone,
6416 6422                                      sizeof (revert_zone));
6417 6423                          }
6418 6424                  } else {
6419 6425                          zerr(gettext("Zone %s failed to verify"), zone);
6420 6426                  }
6421 6427          }
6422 6428          if (ret_val != Z_OK)
↓ open down ↓ 1201 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX