From patchwork Wed Jun 26 09:08:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richard X-Patchwork-Id: 807606 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FBA318410D for ; Wed, 26 Jun 2024 09:09:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719392968; cv=none; b=J5OoEWoqjvyHCSmlRXIJTpMTm/y8hO7bURxlLaHSeCUYD+ppDVFAgu5pbGwVwTtxgjwCOKbtkXgZp9R55nL+/YeMV293wSM+MrpzAEnDA1VgAl8qd6hWpbkbTxSn2qk5ep7CGaNDNyCxaPvxxOYd9RQbwA5fmtuPzoao5s/GW/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719392968; c=relaxed/simple; bh=LQGBhB8CzLDrfbu2RQ+7+lH19tE16e4kgrN3rqhqVQc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=gy/CbikwXR1OOkPsGYX62zDcQXq935NOYPU5Np+BUL54/PFdU9ynw1vEqnUW8PsaIxoklo2T0w+YdWEp12ygCSgiRhzB8DU9bvq7h0CkeJNrcoVgBy7YfAPlp6DYx0jc9xZbaXZ+PSTLDp4864GaNTc7E15Rm8jq4hpFKU1XUyY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Kbl8F7L2; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Kbl8F7L2" Received: by mail.gandi.net (Postfix) with ESMTPSA id 8571460003; Wed, 26 Jun 2024 09:09:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1719392958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=pco9TU8U5Bl23OKH0jbTgomLqieC7XmRZYQ84sMqkmE=; b=Kbl8F7L2Dwyii1Ilh5A/TVfVaXytMjQNw2H4ZfTQGjcMzAbYZsfapd88ebcm1FcKj8uxWj 4C8DOPHbGAz1WzdRkfCEmE287oTNqShYXJGerL8oTLX8//QhKQJymyIeyd1kSsAFom7GOa 1sgl0EQxRxNNPkQbCgx5nC0Sz7KbDTKCPsMIHHboLXeV6BG7qxQBKv/efTYB2scgXBwRbR TBcphuOBBUckcFkUgVVd07vs3Yu/YkcYd3HFUUqf9UrcYH3ybmF5kz56cbBq0figYy2/IY m7JyV0F43p64H4yE1kPnQmjFdexL/l88qgQByujXlP4AP01pda9iQcqkJGeK3g== From: Thomas Richard To: linux-i2c@vger.kernel.org Cc: jdelvare@suse.de, thomas.petazzoni@bootlin.com, Thomas Richard Subject: [PATCH i2c-tools] eeprog: use force option when eeprog gets data from a pipe Date: Wed, 26 Jun 2024 11:08:33 +0200 Message-Id: <20240626090833.356666-1-thomas.richard@bootlin.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: thomas.richard@bootlin.com 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 --- 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;