[CRIU] [PATCH 1/9] tun: rename FD_TYPES__TUN to FD_TYPES__TUNF

Ruslan Kuprieiev kupruser at gmail.com
Wed Oct 8 03:35:24 PDT 2014


We have two global enums with the member TUN. The first one is in fdinfo.proto and the
second one is in netdev.proto. protoc complains about having TUN in 2 global enums because
of the enum rules for C++(even though we're compiling .proto files for python).
So lets rename TUN into TUNF to avoid that conflict.

Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 protobuf/fdinfo.proto | 2 +-
 tun.c                 | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/protobuf/fdinfo.proto b/protobuf/fdinfo.proto
index 049c018..ac80f62 100644
--- a/protobuf/fdinfo.proto
+++ b/protobuf/fdinfo.proto
@@ -14,7 +14,7 @@ enum fd_types {
 	FANOTIFY	= 12;
 	NETLINKSK	= 13;
 	NS		= 14;
-	TUN		= 15;
+	TUNF		= 15;
 	EXT		= 16;
 	TIMERFD		= 17;
 }
diff --git a/tun.c b/tun.c
index de4458a..283d834 100644
--- a/tun.c
+++ b/tun.c
@@ -309,7 +309,7 @@ static int dump_tunfile(int lfd, u32 id, const struct fd_parms *p)
 }
 
 const struct fdtype_ops tunfile_dump_ops = {
-	.type = FD_TYPES__TUN,
+	.type = FD_TYPES__TUNF,
 	.dump = dump_tunfile,
 };
 
@@ -374,7 +374,7 @@ err:
 }
 
 static struct file_desc_ops tunfile_desc_ops = {
-	.type = FD_TYPES__TUN,
+	.type = FD_TYPES__TUNF,
 	.open = tunfile_open,
 };
 
-- 
1.9.3



More information about the CRIU mailing list