Print this page
Code review comments from pmooney (sundry), and igork (screwups in zonecfg refactoring)

@@ -2115,21 +2115,18 @@
                 (void) fprintf(of, "%s\n", cmd_to_str(CMD_END));
         }
 
         (void) zonecfg_endadminent(handle);
 
-        if ((err = zonecfg_getsecflagsent(handle, &secflagstab)) != Z_OK) {
-                zone_perror(zone, err, B_FALSE);
-                goto done;
-        }
-
+        if (zonecfg_getsecflagsent(handle, &secflagstab) == Z_OK) {
         (void) fprintf(of, "%s %s\n", cmd_to_str(CMD_ADD),
             rt_to_str(RT_SECFLAGS));
         export_prop(of, PT_DEFAULT, secflagstab.zone_secflags_default);
         export_prop(of, PT_LOWER, secflagstab.zone_secflags_lower);
         export_prop(of, PT_UPPER, secflagstab.zone_secflags_upper);
         (void) fprintf(of, "%s\n", cmd_to_str(CMD_END));
+        }
 
         /*
          * There is nothing to export for pcap since this resource is just
          * a container for an rctl alias.
          */

@@ -5622,18 +5619,14 @@
 
 static void
 info_secflags(zone_dochandle_t handle, FILE *fp)
 {
         struct zone_secflagstab sftab;
-        int err;
-
-        if ((err = zonecfg_lookup_secflags(handle, &sftab)) != Z_OK) {
-                zone_perror(zone, err, B_TRUE);
-                return;
-        }
 
+        if (zonecfg_lookup_secflags(handle, &sftab) == Z_OK) {
         output_secflags(fp, &sftab);
+        }
 }
 
 void
 info_func(cmd_t *cmd)
 {

@@ -6391,23 +6384,20 @@
                         ret_val = Z_BAD_PROPERTY;
                 }
         }
         (void) zonecfg_endadminent(handle);
 
-        if ((err = zonecfg_getsecflagsent(handle, &secflagstab)) != Z_OK) {
-                zone_perror(zone, err, B_TRUE);
-                return;
-        }
-
+        if (zonecfg_getsecflagsent(handle, &secflagstab) == Z_OK) {
         /*
          * No properties are required, but any specified should be
          * valid
          */
         if (verify_secflags(&secflagstab) != B_TRUE) {
                 /* Error is reported from verify_secflags */
                 ret_val = Z_BAD_PROPERTY;
         }
+        }
 
         if (!global_scope) {
                 zerr(gettext("resource specification incomplete"));
                 saw_error = B_TRUE;
                 if (ret_val == Z_OK)