public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* erase.c
@ 2001-03-12 21:43 Kári Davíðsson
  2001-03-12 22:53 ` erase.c Alice Hennessy
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kári Davíðsson @ 2001-03-12 21:43 UTC (permalink / raw)
  To: mtd

Hi,

In the intel chip that we are using here all sectors seem to be locked
by default.
So in the erase utility I propose the following patch.

Maybe it is ambigous to do force unlocking of sectors like this.
Should we maybe have a separate utility to lock/unlock sectors?

K.D.

--- ../mtd/util/erase.c Thu Sep 21 22:00:07 2000
+++ util/erase.c        Mon Mar 12 14:58:58 2001
@@ -51,6 +51,12 @@
                 erase.length, erase.start);
          fflush(stdout);
 
+         if(ioctl(Fd, MEMUNLOCK, &erase) != 0)
+         {
+                 perror("\nMTD Unlock failure");
+                 close(Fd);
+                 return 8;
+                }
          if (ioctl(Fd,MEMERASE,&erase) != 0)
              {      
                  perror("\nMTD Erase failure");


To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-03-14  2:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-12 21:43 erase.c Kári Davíðsson
2001-03-12 22:53 ` erase.c Alice Hennessy
2001-03-12 23:10 ` erase.c Alice Hennessy
2001-03-13  8:03 ` erase.c David Woodhouse
2001-03-13 18:44   ` erase.c Alice Hennessy
2001-03-14  2:55     ` erase.c Alice Hennessy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox