Your message dated Wed, 07 Mar 2007 17:17:02 +0000 with message-id <[EMAIL PROTECTED]> and subject line Bug#413131: fixed in powerpc-utils 1.1.3-21 has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database)
--- Begin Message ---Package: powerpc-utils Severity: important Tags: patch Hi, on recent kernels like 2.6.19 nvsetenv does work anymore: $ nvsetenv Error reading /dev/nvram: No such file or directory This is caused by the fact that nvsetenv tries to read from /dev/nvram with a single read call whereas Linux only supplies 4k and the data to be read is over 4k. The same applies for writing. The following patch fixes nvsetenv for me so that I can set options again. --- powerpc-utils-1.1.3/nwnvsetenv.c 2007-03-02 15:34:30.531458670 +0100 +++ powerpc-utils-1.1.3-al/nwnvsetenv.c 2007-03-02 15:54:04.320050019 +0100 @@ -75,7 +75,7 @@ /* seek NVRAM until common (OF) part return the lenght of the part in case of sucess, 0 otherwise. - chrph is set to the value of the "coommon" blocek eventually found + chrph is set to the value of the "common" block eventually found *nvstart is set to the seekpoint where common block starts. */ @@ -102,12 +102,18 @@ static char* nvload( int nvfd , int nvsize) { char* nvbuf = malloc(nvsize); + char *b = nvbuf; + int i; if (!nvbuf) { perror("Error allocating buffer"); exit(EXIT_FAILURE); } - if (read(nvfd, nvbuf, nvsize) != nvsize) { + while ((i = read(nvfd, b, nvsize)) > 0) { + b += i; + nvsize -= i; + } + if (i == -1) { perror("Error reading /dev/nvram"); exit(EXIT_FAILURE); } @@ -225,10 +231,15 @@ fprintf(stderr,"Error seeking /dev/nvram\n"); exit(EXIT_FAILURE); } - written = write(nvfd, nvbuf, nvsize); - if (written != nvsize) + + while ((written = write(nvfd, nvbuf, nvsize)) > 0) + { + nvsize -= written; + nvbuf += written; + } + if (written == -1) { - fprintf(stderr,"Error writing /dev/nvram %x %x\n", nvsize, seek); + fprintf(stderr,"Error writing /dev/nvram %x %x %x\n", nvsize, seek, written); exit(EXIT_FAILURE); } } Adam -- Adam [EMAIL PROTECTED] Lackorzynski http://os.inf.tu-dresden.de/~adam/
--- End Message ---
--- Begin Message ---Source: powerpc-utils Source-Version: 1.1.3-21 We believe that the bug you reported is fixed in the latest version of powerpc-utils, which is due to be installed in the Debian FTP archive: powerpc-utils_1.1.3-21.diff.gz to pool/main/p/powerpc-utils/powerpc-utils_1.1.3-21.diff.gz powerpc-utils_1.1.3-21.dsc to pool/main/p/powerpc-utils/powerpc-utils_1.1.3-21.dsc powerpc-utils_1.1.3-21_powerpc.deb to pool/main/p/powerpc-utils/powerpc-utils_1.1.3-21_powerpc.deb A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [EMAIL PROTECTED], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Michael Schmitz <[EMAIL PROTECTED]> (supplier of updated powerpc-utils package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [EMAIL PROTECTED]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.7 Date: Wed, 7 Mar 2007 15:57:34 +0100 Source: powerpc-utils Binary: powerpc-utils Architecture: source powerpc Version: 1.1.3-21 Distribution: unstable Urgency: low Maintainer: Michael Schmitz <[EMAIL PROTECTED]> Changed-By: Michael Schmitz <[EMAIL PROTECTED]> Description: powerpc-utils - Various utilities for Linux/PowerPC Closes: 413131 Changes: powerpc-utils (1.1.3-21) unstable; urgency=low . * Fix problem with truncated nvram reads/writes, reported by Adam Lackorzynski <[EMAIL PROTECTED]>. Closes: #413131. Files: c54a7ecb97e2284ddde0cf34d73f85f2 646 utils important powerpc-utils_1.1.3-21.dsc 5f1b5023c5a07be025d76f7c06eb0f0c 27975 utils important powerpc-utils_1.1.3-21.diff.gz f7ba128f3be6a526ea31f22b129f2368 38292 utils important powerpc-utils_1.1.3-21_powerpc.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF7tU0jH3TJU9qR44RAs2oAJ4stFU6gG9LvHwlCL12ZY+ChDSsswCgim5X Pza6Bb5ajwvOFRJcBAEfDlY= =WFXa -----END PGP SIGNATURE-----
--- End Message ---

