Hello community, here is the log from the commit of package powerpc-utils checked in at Fri Oct 13 16:32:42 CEST 2006. -------- --- arch/ppc/powerpc-utils/powerpc-utils.changes 2006-05-15 11:26:55.000000000 +0200 +++ /mounts/work_src_done/STABLE/powerpc-utils/powerpc-utils.changes 2006-10-13 13:49:27.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Oct 13 13:48:56 CEST 2006 - olh@suse.de + +- handle short writes to /dev/nvram, current kernels limit write + size to PAGE_SIZE + +------------------------------------------------------------------- New: ---- get_release_number.sh powerpc-utils.nvram.short-write.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ powerpc-utils.spec ++++++ --- /var/tmp/diff_new_pack.dS4BRY/_old 2006-10-13 16:32:18.000000000 +0200 +++ /var/tmp/diff_new_pack.dS4BRY/_new 2006-10-13 16:32:18.000000000 +0200 @@ -16,7 +16,7 @@ Obsoletes: ppc64-utils Provides: ppc64-utils Version: 1.0.0 -Release: 5 +Release: 200610131432 License: IBM Public License URL: http://powerpc-utils.ozlabs.org/ Group: System/Management @@ -31,6 +31,7 @@ Patch2: powerpc-utils.ofpathname.show_of_path.patch Patch3: powerpc-utils.ofpathname.correct-vscsi-scan.patch Patch4: powerpc-utils.bootlist.easy-network-dev.patch +Patch5: powerpc-utils.nvram.short-write.patch %description IBM PPC64 hardware utilities for accessing NVRAM, flashing firmware, @@ -51,6 +52,7 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 cd powerpc-utils-papr-%{papr_version} %build @@ -85,6 +87,9 @@ %config %attr (755,root,root) /etc/init.d/ibmvscsis.sh %changelog -n powerpc-utils +* Fri Oct 13 2006 - olh@suse.de +- handle short writes to /dev/nvram, current kernels limit write + size to PAGE_SIZE * Mon May 15 2006 - olh@suse.de - the kernel ibmvscsis patch was updated to provide the type field again. remove last patch again (173880 - LTC23729) ++++++ powerpc-utils.nvram.short-write.patch ++++++ /usr/sbin/nvram: ERROR: only wrote 4096 bytes of the "common" partition back to /dev/nvram, expected to write 8192 bytes --- cmds/nvram.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) Index: powerpc-utils-1.0.0/cmds/nvram.c =================================================================== --- powerpc-utils-1.0.0.orig/cmds/nvram.c +++ powerpc-utils-1.0.0/cmds/nvram.c @@ -1342,10 +1342,12 @@ update_of_config_var(struct nvram *nvram struct partition_header *phead, *new_phead; char *data_offset; char *new_part; + char *new_part_p; char *new_part_offset, *new_part_end; char *tmp_offset; int config_name_len; int len, part_size, found = 0; + int written; phead = nvram_find_partition(nvram, 0, pname, NULL); if (phead == NULL) { @@ -1446,11 +1448,18 @@ update_of_config_var(struct nvram *nvram } /* write the partition out to nvram */ - len = write(nvram->fd, new_part, part_size); - if (len != part_size) { - err_msg("only wrote %d bytes of the \"%s\" partition back\n" - "\tto %s, expected to write %d bytes\n", - len, pname, nvram->filename, part_size); + new_part_p = new_part; + written = part_size; + while (written > 0) { + len = write(nvram->fd, new_part_p, written); + if (len < 0) { + perror(nvram->filename); + break; + } + if (len == 0 && written) + break; + written -= len; + new_part_p +=len; } free(new_part); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org