On 08/17/2015 12:23 PM, Gabriel Krisman Bertazi wrote: > @@ -15206,6 +15206,52 @@ static int update_ucode_cmd(char **args, int > num_args) > } > > /** > + * update_all_ucodes - update-all-ucodes Command line interface. > + * @args: argument vector > + * @num_args: number of arguments > + * > + * Returns: > + * 0 if success / non-zero on failure > + **/ > +static int update_all_ucodes(char **args, int num_args) > +{ > + struct ipr_ioa *ioa; > + struct ipr_dev *dev; > + int failed_count = 0; > + struct ipr_fw_images *lfw; > + int rc; > + > + for_each_ioa(ioa) { > + if (!ioa->ioa.scsi_dev_data) > + return; > + for_each_dev(ioa, dev) { > + if (ipr_is_volume_set(dev)) > + continue; > + > + lfw = get_latest_fw_image(dev); > + if (!lfw || lfw->version <= get_fw_version(dev)) > + continue; > + > + if (&dev->ioa->ioa == dev) > + rc = update_ioa_ucode(dev->ioa, lfw->file); > + else > + rc = update_dev_ucode(dev, lfw->file); > + > + free(lfw); > + > + if (rc) > + failed_count++; > + } > + } > + > + if (failed_count) > + printf("Failed to update %d devices. Run dmesg for more > information.\n", > + failed_count);
This should go to stderr rather than stdout. > + > + return 0; > +} > + > +/** > * show_ucode_levels - List microcode level of every device and adapter > * @args: argument vector > * @num_args: number of arguments -- Brian King Power Linux I/O IBM Linux Technology Center ------------------------------------------------------------------------------ _______________________________________________ Iprdd-devel mailing list Iprdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iprdd-devel