[5/5,v3,MTD-UTILS] Unified reading from standard input and from file

Submitted by Jehan Bing on Aug. 6, 2009, 12:41 a.m.

Details

Message ID 4A7A26B3.7020503@orb.com
State Accepted
Commit ed777541152b791e0055cd718126b576c90e5116
Headers show

Commit Message

Jehan Bing Aug. 6, 2009, 12:41 a.m.
Allow writing the OOB when using the standard input.

Signed-off-by: Jehan Bing <jehan@orb.com>

Patch hide | download patch | download mbox

--- a/nandwrite.c	2009-08-05 15:48:25.000000000 -0700
+++ b/nandwrite.c	2009-08-05 15:48:49.000000000 -0700
@@ -392,12 +392,6 @@  int main(int argc, char * const argv[])
 		goto restoreoob;
 	}
 
-	/* For now, don't allow writing oob when reading from standard input. */
-	if (ifd == STDIN_FILENO && writeoob) {
-		fprintf(stderr, "Can't write oob when reading from standard input.\n");
-		goto closeall;
-	}
-
 	pagelen = meminfo.writesize + ((writeoob) ? meminfo.oobsize : 0);
 
 	/*