diff mbox series

[i2c-tools] eeprog: use force option when eeprog gets data from a pipe

Message ID 20240626090833.356666-1-thomas.richard@bootlin.com
State New
Headers show
Series [i2c-tools] eeprog: use force option when eeprog gets data from a pipe | expand

Commit Message

Thomas Richard June 26, 2024, 9:08 a.m. UTC
When a pipe is used to send data to eeprog, the force option shall be used.
If not, the first character is catched by confirm_action().

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
 eeprog/eeprog.8 | 2 +-
 eeprog/eeprog.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Wolfram Sang July 12, 2024, 10:04 a.m. UTC | #1
On Wed, Jun 26, 2024 at 11:08:33AM +0200, Thomas Richard wrote:
> When a pipe is used to send data to eeprog, the force option shall be used.
> If not, the first character is catched by confirm_action().
> 
> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>

Thanks, applied!
diff mbox series

Patch

diff --git a/eeprog/eeprog.8 b/eeprog/eeprog.8
index 6a61102..70f78ae 100644
--- a/eeprog/eeprog.8
+++ b/eeprog/eeprog.8
@@ -95,6 +95,6 @@  Write the current timestamp at address 0x200 of the EEPROM on bus 0 at address 0
 .P
  	date |
 .B eeprog
-/dev/i2c-0 0x33 -w 0x200
+-f /dev/i2c-0 0x33 -w 0x200
 .SH AUTHOR
 Stefano Barbato
diff --git a/eeprog/eeprog.c b/eeprog/eeprog.c
index 9978241..ef18ae1 100644
--- a/eeprog/eeprog.c
+++ b/eeprog/eeprog.c
@@ -65,7 +65,7 @@  void do_usage_if(int b, int line)
 "		eeprog /dev/i2c-1 0x51 -x -r 0x22:0x20\n"
 "	3- write the current timestamp at address 0x200 of the EEPROM on\n"
 "	   bus 0 at address 0x33\n"
-"		date | eeprog /dev/i2c-0 0x33 -w 0x200\n";
+"		date | eeprog -f /dev/i2c-0 0x33 -w 0x200\n";
 
 	if(!b)
 		return;