]> git.ozlabs.org Git - yaboot.git/commitdiff
Add additional check on /dev/nvram to avoid misleading error message
authorEthan Benson <erbenson@alaska.net>
Sat, 8 May 2004 22:04:51 +0000 (22:04 +0000)
committerEthan Benson <erbenson@alaska.net>
Sat, 8 May 2004 22:04:51 +0000 (22:04 +0000)
* ybin/ybin: Add additional check on /dev/nvram, if we cannot read a
  couple bytes report it as broken.  This avoids misleading
  `Incompatible nvsetenv' message on kernels without /dev/nvram support.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-71

0arch-timestamps0
ChangeLog
ybin/ybin

index 19e722865bf1cef2ac18d5047c1565ba1fd7c4d8..bd9a73ce4bb8732d665f45abdb28f70e4f5360f2 100644 (file)
@@ -1,7 +1,7 @@
-./0arch-timestamps0    1082939268      1083998321
+./0arch-timestamps0    1083998323      1084053888
 ./BUGS 1082938563      1000991730
 ./COPYING      1082938564      1000991730
-./ChangeLog    1083998225      1083998312
+./ChangeLog    1084053787      1084053885
 ./Config       1082938563      1002101497
 ./INSTALL      1082938564      1000991730
 ./Makefile     1082938564      1082247755
 ./doc/examples/simpleboot.chrp 1082938564      1068017750
 ./doc/examples/yaboot.conf.multi-boot  1082938564      1006348765
 ./doc/examples/yaboot.conf.rs6000      1082938564      1006348765
-./doc/examples 1083998321      1068017750
+./doc/examples 1084053888      1068017750
 ./doc/yaboot-howto.de.sgml     1082938567      1077455488
 ./doc/yaboot-howto.sgml        1082938567      1077455511
-./doc  1083998321      1081830064
+./doc  1084053888      1081830064
 ./etc/yaboot.conf      1082938564      1006348765
-./etc  1083998321      1007269243
+./etc  1084053888      1007269243
 ./first/ofboot 1083998120      1065311880
-./first        1083998321      1071492158
+./first        1084053888      1071492158
 ./include/asm/elf.h    1082938564      1000991730
 ./include/asm/ppc_asm.tmpl     1082938564      1000991730
 ./include/asm/processor.h      1082938564      1000991730
-./include/asm  1083998321      1007269243
+./include/asm  1084053888      1007269243
 ./include/bootinfo.h   1082938564      1007200690
 ./include/byteorder.h  1082938564      1000991730
 ./include/cfg.h        1082938564      1007200690
 ./include/debug.h      1082938566      1007200690
 ./include/errors.h     1082938563      1007200690
 ./include/et/com_err.h 1082938564      1000991731
-./include/et   1083998321      1007269243
+./include/et   1084053888      1007269243
 ./include/ext2fs/bitops.h      1082938564      1003927524
 ./include/ext2fs/ext2_err.h    1082938564      1003927524
 ./include/ext2fs/ext2_io.h     1082938564      1003927524
 ./include/ext2fs/ext2fs.h      1082938564      1003927524
-./include/ext2fs       1083998321      1007269243
+./include/ext2fs       1084053888      1007269243
 ./include/fdisk-part.h 1082938564      1007200690
 ./include/file.h       1082938564      1007200690
 ./include/fs.h 1082938564      1007200690
 ./include/linux/iso_fs.h       1082938564      1000991731
 ./include/linux/stat.h 1082938564      1000991731
 ./include/linux/types.h        1082938564      1000991731
-./include/linux        1083998321      1007269243
+./include/linux        1084053888      1007269243
 ./include/mac-part.h   1082938564      1007200690
 ./include/md5.h        1082938564      1000991730
 ./include/partition.h  1082938564      1007200690
 ./include/prom.h       1082938564      1007200690
 ./include/reiserfs/reiserfs.h  1082938564      1025684115
-./include/reiserfs     1083998321      1025684115
+./include/reiserfs     1084053888      1025684115
 ./include/setjm2.h     1082938564      1000991730
 ./include/setjmp.h     1082938564      1000991730
 ./include/stdlib.h     1082938564      1000991730
@@ -70,9 +70,9 @@
 ./include/swab.h       1082938564      1000991730
 ./include/types.h      1082938564      1000991730
 ./include/xfs/xfs.h    1082938563      1002101334
-./include/xfs  1083998321      1007269244
+./include/xfs  1084053888      1007269244
 ./include/yaboot.h     1082938564      1007200690
-./include      1083998321      1007269244
+./include      1084053888      1007269244
 ./lib/ctype.c  1082938564      1000991731
 ./lib/libext2fs.a      1082938566      1003927524
 ./lib/malloc.c 1082938566      1007200690
@@ -81,7 +81,7 @@
 ./lib/strstr.c 1082938566      1000991731
 ./lib/strtol.c 1082938566      1000991731
 ./lib/vsprintf.c       1082938566      1000991731
-./lib  1083998321      1069320301
+./lib  1084053888      1069320301
 ./man/bootstrap.8      1082938566      1000991731
 ./man/mkofboot.8       1082938566      1006348765
 ./man/ofpath.8 1082938566      1000991731
@@ -89,7 +89,7 @@
 ./man/yaboot.conf.5    1082938566      1004256691
 ./man/yabootconfig.8   1082938566      1027929577
 ./man/ybin.8   1082938566      1006348765
-./man  1083998321      1027929577
+./man  1084053888      1027929577
 ./man.patch    1082938566      1006348761
 ./second/cache.S       1082938566      1007200690
 ./second/cfg.c 1082938566      1007200690
 ./second/prom.c        1082938566      1067937197
 ./second/setjmp.S      1082938566      1000991732
 ./second/yaboot.c      1082938566      1032059504
-./second       1083998321      1069320301
+./second       1084053888      1069320301
 ./util/addnote.c       1082938566      1007200691
 ./util/elfextract.c    1082938566      1007303237
-./util 1083998321      1069320301
-./ybin/mkofboot        1083998321      1073219938
-./ybin/ofpath  1083998169      1083997485
-./ybin/yabootconfig    1083996990      1082931877
-./ybin/ybin    1083996990      1082247741
-./ybin 1083998321      1083997485
-.      1083998321      1083998312
+./util 1084053888      1069320301
+./ybin/mkofboot        1084053888      1073219938
+./ybin/ofpath  1084053730      1083997485
+./ybin/yabootconfig    1084053741      1082931877
+./ybin/ybin    1084053724      1084053572
+./ybin 1084053888      1084053572
+.      1084053888      1084053885
index 4b349ac24b432d4957ccca141e4426da2daba815..c3bf9605f1a4b8bf411a138cbb5c0fa634f9cbb9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,21 @@
 # arch-tag: automatic-ChangeLog--erbenson@alaska.net--public/yaboot--devel--1.3
 #
 
+2004-05-08 22:04:51 GMT        Ethan Benson <erbenson@alaska.net>      patch-71
+
+    Summary:
+      Add additional check on /dev/nvram to avoid misleading error message
+    Revision:
+      yaboot--devel--1.3--patch-71
+
+    * ybin/ybin: Add additional check on /dev/nvram, if we cannot read a
+      couple bytes report it as broken.  This avoids misleading
+      `Incompatible nvsetenv' message on kernels without /dev/nvram support.
+
+    modified files:
+     0arch-timestamps0 ChangeLog ybin/ybin
+
+
 2004-05-08 06:38:44 GMT        Ethan Benson <erbenson@alaska.net>      patch-70
 
     Summary:
index beebfac807dfc2125e54222f7701efb403c34042..029c868a83be178f55e194e21ff647275c9c8519 100755 (executable)
--- a/ybin/ybin
+++ b/ybin/ybin
@@ -462,6 +462,10 @@ checkconf()
                    echo 1>&2 "$PRG: /dev/nvram: Permission denied"
                    echo 1>&2 "$PRG: Warning: nvram will not be updated"
                    nonvram=1
+               elif ! (dd if=/dev/nvram of=/dev/null bs=1 count=10 > /dev/null 2>&1) ; then
+                   echo 1>&2 "$PRG: /dev/nvram: No such device"
+                   echo 1>&2 "$PRG: Warning: nvram will not be updated"
+                   nonvram=1
                else
                    nonvram=1
                    echo 1>&2 "$PRG: Warning: Incompatible version of \`nvsetenv', nvram will not be updated"