* minor einfo and mtd_debug improvement
@ 2001-10-05 18:37 Larry Doolittle
2001-10-08 9:15 ` David Woodhouse
0 siblings, 1 reply; 2+ messages in thread
From: Larry Doolittle @ 2001-10-05 18:37 UTC (permalink / raw)
To: linux-mtd
The following changes let einfo and mtd_debug do the right
thing when the underlying MTD device is marked readonly.
- Larry
diff -ur mtd-util-20011003/einfo.c /home/ldoolitt/cvs/mtd/util/einfo.c
--- mtd-util-20011003/einfo.c Mon Oct 1 15:42:08 2001
+++ /home/ldoolitt/cvs/mtd/util/einfo.c Tue Apr 10 00:57:45 2001
@@ -20,7 +20,7 @@
}
// Open and size the device
- if ((Fd = open(argv[1],O_RDONLY)) < 0)
+ if ((Fd = open(argv[1],O_RDWR)) < 0)
{
fprintf(stderr,"File open error\n");
return 8;
diff -ur mtd-util-20011003/mtd_debug.c /home/ldoolitt/cvs/mtd/util/mtd_debug.c
--- mtd-util-20011003/mtd_debug.c Mon Oct 1 16:01:41 2001
+++ /home/ldoolitt/cvs/mtd/util/mtd_debug.c Mon Jun 18 03:47:25 2001
@@ -357,7 +357,6 @@
{
const char *progname;
int err = 0,fd,option = OPT_INFO;
- int open_flag;
(progname = strrchr (argv[0],'/')) ? progname++ : (progname = argv[0]);
/* parse command-line options */
@@ -373,8 +372,7 @@
showusage (progname);
/* open device */
- open_flag = (option==OPT_INFO || option==OPT_READ) ? O_RDONLY : O_RDWR;
- if ((fd = open (argv[2],O_SYNC | open_flag)) < 0)
+ if ((fd = open (argv[2],O_SYNC | O_RDWR)) < 0)
{
perror ("open()");
exit (1);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: minor einfo and mtd_debug improvement
2001-10-05 18:37 minor einfo and mtd_debug improvement Larry Doolittle
@ 2001-10-08 9:15 ` David Woodhouse
0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2001-10-08 9:15 UTC (permalink / raw)
To: Larry Doolittle; +Cc: linux-mtd
ldoolitt@recycle.lbl.gov said:
> The following changes let einfo and mtd_debug do the right thing when
> the underlying MTD device is marked readonly.
Thanks; applied. The patch was backwards - 'cvs diff -u' would have given
better results.
--
dwmw2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-10-08 9:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-05 18:37 minor einfo and mtd_debug improvement Larry Doolittle
2001-10-08 9:15 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox