public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Richard <thomas.richard@bootlin.com>
To: linux-i2c@vger.kernel.org
Cc: jdelvare@suse.de, thomas.petazzoni@bootlin.com,
	Thomas Richard <thomas.richard@bootlin.com>
Subject: [PATCH i2c-tools] eeprog: use force option when eeprog gets data from a pipe
Date: Wed, 26 Jun 2024 11:08:33 +0200	[thread overview]
Message-ID: <20240626090833.356666-1-thomas.richard@bootlin.com> (raw)

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(-)

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;
-- 
2.39.2


             reply	other threads:[~2024-06-26  9:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26  9:08 Thomas Richard [this message]
2024-07-12 10:04 ` [PATCH i2c-tools] eeprog: use force option when eeprog gets data from a pipe Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240626090833.356666-1-thomas.richard@bootlin.com \
    --to=thomas.richard@bootlin.com \
    --cc=jdelvare@suse.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox