From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200304180613.h3I6DY517452@augusta.math.psu.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] "Can't read from nvram: /env/nvrof file does not exist" In-Reply-To: Your message of "Thu, 17 Apr 2003 23:24:23 EDT." <6265ada728c8d7a1a8ce196d11a02462@plan9.bell-labs.com> From: Dan Cross Date: Fri, 18 Apr 2003 02:13:33 -0400 Topicbox-Message-UUID: 9271c724-eacb-11e9-9e20-41e7f4b1d025 > never mind, i missed this part: > > if(strstr(v[0], "/9fat") == nil) > safeoff = 0; > > the open failed, but the error is lost. Yeah. It's an unfortunate side effect of readnvram's error recovery. If it fails to read nvram, it tries to write it, so error printing is delayed. As you noted, to use $nvram, $nvoff is not necessary. > the open might fail because you typed > the wrong value for $nvram, or perhaps > it fails because the open is ORDWR? > i doubt the ide driver is smart > enough to know that flash is only OREAD, > so i don't think this is it. Wha...? What do you mean `flash is only OREAD'? This is a solid state device that looks like an IDE hard disk, and most likely is writable. After looking at the code again, I'm pretty sure that plan9.nvr doesn't exist in the 9fat, or that there's a typo in $nvram such that it points to a non-existant file. - Dan C.