diff mbox

tap_int.h: remove repeating macroinstruction

Message ID 1414724010-1756-1-git-send-email-arei.gonglei@huawei.com
State New
Headers show

Commit Message

Gonglei (Arei) Oct. 31, 2014, 2:53 a.m. UTC
From: Gonglei <arei.gonglei@huawei.com>

DEFAULT_NETWORK_SCRIPT and DEFAULT_NETWORK_DOWN_SCRIPT
have been defined in net/net.h included in
tap.c, which is the only C file that using those two macro.
Let's remove the repeating macroinstruction.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
 net/tap_int.h | 3 ---
 1 file changed, 3 deletions(-)

Comments

Michael Tokarev Nov. 1, 2014, 6:10 p.m. UTC | #1
31.10.2014 05:53, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
> 
> DEFAULT_NETWORK_SCRIPT and DEFAULT_NETWORK_DOWN_SCRIPT
> have been defined in net/net.h included in
> tap.c, which is the only C file that using those two macro.
> Let's remove the repeating macroinstruction.
> 
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  net/tap_int.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/net/tap_int.h b/net/tap_int.h
> index 86bb224..79afdf2 100644
> --- a/net/tap_int.h
> +++ b/net/tap_int.h
> @@ -29,9 +29,6 @@
>  #include "qemu-common.h"
>  #include "qapi-types.h"
>  
> -#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
> -#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
> -
>  int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
>               int vnet_hdr_required, int mq_required);


Hmm.  We had this change in debian qemu-kvm for many years
(at least since 2008), here:
http://anonscm.debian.org/cgit/collab-maint/qemu-kvm.git/tree/debian/patches/04_use_etc_kvm_kvm-ifup.patch

I always thought it is some mis-merge of kvm to qemu.

So, ofcourse, applying to -trivial, thank you for getting
rid of it finally, because I really forgot about it...

/mjt
Michael Tokarev Nov. 1, 2014, 6:10 p.m. UTC | #2
31.10.2014 05:53, arei.gonglei@huawei.com пишет:
> From: Gonglei <arei.gonglei@huawei.com>
> 
> DEFAULT_NETWORK_SCRIPT and DEFAULT_NETWORK_DOWN_SCRIPT
> have been defined in net/net.h included in
> tap.c, which is the only C file that using those two macro.
> Let's remove the repeating macroinstruction.
> 
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  net/tap_int.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/net/tap_int.h b/net/tap_int.h
> index 86bb224..79afdf2 100644
> --- a/net/tap_int.h
> +++ b/net/tap_int.h
> @@ -29,9 +29,6 @@
>  #include "qemu-common.h"
>  #include "qapi-types.h"
>  
> -#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
> -#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
> -
>  int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
>               int vnet_hdr_required, int mq_required);
>  


Hmm.  We had this change in debian qemu-kvm for many years
(at least since 2008), here:
http://anonscm.debian.org/cgit/collab-maint/qemu-kvm.git/tree/debian/patches/04_use_etc_kvm_kvm-ifup.patch

I always thought it is some mis-merge of kvm to qemu.

So, ofcourse, applying to -trivial, thank you for getting
rid of it finally, because I really forgot about it...

/mjt
Michael Tokarev Nov. 2, 2014, 4:56 a.m. UTC | #3
31.10.2014 05:53, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
> 
> DEFAULT_NETWORK_SCRIPT and DEFAULT_NETWORK_DOWN_SCRIPT
> have been defined in net/net.h included in
> tap.c, which is the only C file that using those two macro.
> Let's remove the repeating macroinstruction.

Applied (as I noted yesterday), but with slight rename in
$subject - the new subject reads:

  tap_int.h: remove repeating NETWORK_SCRIPT defines

Is that okay with you?

Thanks,

/mjt
Gonglei (Arei) Nov. 2, 2014, 5:01 a.m. UTC | #4
On 2014/11/2 12:56, Michael Tokarev wrote:

> 31.10.2014 05:53, arei.gonglei@huawei.com wrote:
>> From: Gonglei <arei.gonglei@huawei.com>
>>
>> DEFAULT_NETWORK_SCRIPT and DEFAULT_NETWORK_DOWN_SCRIPT
>> have been defined in net/net.h included in
>> tap.c, which is the only C file that using those two macro.
>> Let's remove the repeating macroinstruction.
> 
> Applied (as I noted yesterday), but with slight rename in
> $subject - the new subject reads:
> 
>   tap_int.h: remove repeating NETWORK_SCRIPT defines
> 
> Is that okay with you?
> 

Ack. Thanks.

Best regards,
-Gonglei
diff mbox

Patch

diff --git a/net/tap_int.h b/net/tap_int.h
index 86bb224..79afdf2 100644
--- a/net/tap_int.h
+++ b/net/tap_int.h
@@ -29,9 +29,6 @@ 
 #include "qemu-common.h"
 #include "qapi-types.h"
 
-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
-
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
              int vnet_hdr_required, int mq_required);