Print this page
patch tsoome-feedback

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/zpool/zpool_vdev.c
          +++ new/usr/src/cmd/zpool/zpool_vdev.c
↓ open down ↓ 1395 lines elided ↑ open up ↑
1396 1396                          if ((type = is_grouping(path, &min, &max)) != NULL) {
1397 1397                                  (void) fprintf(stderr, gettext("Cannot use "
1398 1398                                      "'%s' as a device for splitting\n"), type);
1399 1399                                  nvlist_free(newroot);
1400 1400                                  return (NULL);
1401 1401                          }
1402 1402                  }
1403 1403          }
1404 1404  
1405 1405          if (zpool_vdev_split(zhp, newname, &newroot, props, flags) != 0) {
1406      -                if (newroot != NULL)
1407      -                        nvlist_free(newroot);
     1406 +                nvlist_free(newroot);
1408 1407                  return (NULL);
1409 1408          }
1410 1409  
1411 1410          return (newroot);
1412 1411  }
1413 1412  
1414 1413  /*
1415 1414   * Get and validate the contents of the given vdev specification.  This ensures
1416 1415   * that the nvlist returned is well-formed, that all the devices exist, and that
1417 1416   * they are not currently in use by any other known consumer.  The 'poolconfig'
↓ open down ↓ 56 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX