recipes: networking/ineutils: Apply patches from Debian in order to refresh this...
[dragora.git] / patches / inetutils / 0009-ifconfig-Verbose-report-on-changed-flags.patch
blobf54657489243b226edf34970d8943ccc04d81423
1 From 8bcc74c9e79b06d06160ae0268eed78796e772d6 Mon Sep 17 00:00:00 2001
2 From: Mats Erik Andersson <gnu@gisladisker.se>
3 Date: Sun, 2 Aug 2015 00:57:04 +0200
4 Subject: [PATCH 09/60] ifconfig: Verbose report on changed flags.
6 ---
7 ChangeLog | 8 ++++++++
8 ifconfig/changeif.c | 24 ++++++++++++++++++++++++
9 2 files changed, 32 insertions(+)
11 diff --git a/ChangeLog b/ChangeLog
12 index 557b7a9c..6c592b72 100644
13 --- a/ChangeLog
14 +++ b/ChangeLog
15 @@ -1,3 +1,11 @@
16 +2015-08-02 Mats Erik Andersson <gnu@gisladisker.se>
18 + ifconfig: Verbose report on changed flags.
20 + * ifconfig/changeif.c (set_flags): In verbose report mode,
21 + compose a message to name those flags that were set, and
22 + also those that were cleared.
24 2015-08-01 Mats Erik Andersson <gnu@gisladisker.se>
26 ifconfig: Apply flags correctly.
27 diff --git a/ifconfig/changeif.c b/ifconfig/changeif.c
28 index a040587b..beac6f6d 100644
29 --- a/ifconfig/changeif.c
30 +++ b/ifconfig/changeif.c
31 @@ -367,6 +367,30 @@ set_flags (int sfd, struct ifreq *ifr, int setflags, int clrflags)
32 error (0, errno, "SIOCSIFFLAGS failed");
33 return -1;
36 + if (verbose)
37 + {
38 + printf ("Setting %sflags", setflags ? "" : "no ");
40 + if (setflags)
41 + {
42 + printf (" `");
43 + print_if_flags (setflags, NULL, ',');
44 + putchar ('\'');
45 + }
47 + printf (" of `%s'", ifr->ifr_name);
49 + if (clrflags)
50 + {
51 + printf (", clearing `");
52 + print_if_flags (clrflags, NULL, ',');
53 + putchar ('\'');
54 + }
56 + printf (".\n");
57 + }
59 return 0;
60 #endif
62 --
63 2.26.0.292.g33ef6b2f38