Util-Linux Archive on lore.kernel.org
 help / Atom feed
* [PATCH 1/3] agetty: rename variable changed to triggered
@ 2018-10-10 17:26 Stanislav Brabec
  2018-10-11 12:01 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Brabec @ 2018-10-10 17:26 UTC (permalink / raw)
  To: util-linux

changed variable name is not correct. It does not say that network
interface changed its address. It just says that the netlink message
processing was triggered.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
---
 term-utils/agetty.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 844220401..2f27d7f71 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -1554,7 +1554,7 @@ static void open_netlink(void)
 	}
 }
 
-static int process_netlink_msg(int *changed)
+static int process_netlink_msg(int *triggered)
 {
 	char buf[4096];
 	struct sockaddr_nl snl;
@@ -1594,7 +1594,7 @@ static int process_netlink_msg(int *changed)
 			return 0;
 		}
 
-		*changed = 1;
+		*triggered = 1;
 		break;
 	}
 
@@ -1603,9 +1603,9 @@ static int process_netlink_msg(int *changed)
 
 static int process_netlink(void)
 {
-	int changed = 0;
-	while (process_netlink_msg(&changed));
-	return changed;
+	int triggered = 0;
+	while (process_netlink_msg(&triggered));
+	return triggered;
 }
 
 static int wait_for_term_input(int fd)
-- 
2.19.0

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: sbrabec@suse.com
Křižíkova 148/34 (Corso IIa)                  tel: +49 911 7405384547
186 00 Praha 8-Karlín                          fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/3] agetty: rename variable changed to triggered
  2018-10-10 17:26 [PATCH 1/3] agetty: rename variable changed to triggered Stanislav Brabec
@ 2018-10-11 12:01 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2018-10-11 12:01 UTC (permalink / raw)
  To: Stanislav Brabec; +Cc: util-linux

On Wed, Oct 10, 2018 at 07:26:21PM +0200, Stanislav Brabec wrote:
>  term-utils/agetty.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 17:26 [PATCH 1/3] agetty: rename variable changed to triggered Stanislav Brabec
2018-10-11 12:01 ` Karel Zak

Util-Linux Archive on lore.kernel.org

Archives are clonable: git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
		util-linux@vger.kernel.org util-linux@archiver.kernel.org
	public-inbox-index util-linux


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox