* [PATCH] xl: rename variable pause to pause_after_migration
@ 2016-07-20 8:30 Wei Liu
2016-07-20 9:43 ` Roger Pau Monne
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Wei Liu @ 2016-07-20 8:30 UTC (permalink / raw)
To: Xen-devel; +Cc: Ian Jackson, Boris Ostrovsky, Wei Liu, Roger Pau Monne
Gcc 4.4.4 complained that the "pause" variable introduced in 22b430e0
("xl: add option to leave domain paused after migration") shadowed
pause(2) declaration in unistd.h.
Rename "pause" to "pause_after_migration" to fix this issue.
Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Roger Pau Monne <roger.pau@citrix.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
tools/libxl/xl_cmdimpl.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 82d6254..9267de8 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -4778,7 +4778,8 @@ static void migrate_domain(uint32_t domid, const char *rune, int debug,
exit(EXIT_FAILURE);
}
-static void migrate_receive(int debug, int daemonize, int monitor, int pause,
+static void migrate_receive(int debug, int daemonize, int monitor,
+ int pause_after_migration,
int send_fd, int recv_fd,
libxl_checkpointed_stream checkpointed,
char *colo_proxy_script)
@@ -4888,7 +4889,7 @@ static void migrate_receive(int debug, int daemonize, int monitor, int pause,
if (rc) goto perhaps_destroy_notify_rc;
}
- if (!pause) {
+ if (!pause_after_migration) {
rc = libxl_domain_unpause(ctx, domid);
if (rc) goto perhaps_destroy_notify_rc;
}
@@ -5005,7 +5006,7 @@ int main_restore(int argc, char **argv)
int main_migrate_receive(int argc, char **argv)
{
- int debug = 0, daemonize = 1, monitor = 1, pause = 0;
+ int debug = 0, daemonize = 1, monitor = 1, pause_after_migration = 0;
libxl_checkpointed_stream checkpointed = LIBXL_CHECKPOINTED_STREAM_NONE;
int opt;
char *script = NULL;
@@ -5037,7 +5038,7 @@ int main_migrate_receive(int argc, char **argv)
script = optarg;
break;
case 'p':
- pause = 1;
+ pause_after_migration = 1;
break;
}
@@ -5045,7 +5046,7 @@ int main_migrate_receive(int argc, char **argv)
help("migrate-receive");
return EXIT_FAILURE;
}
- migrate_receive(debug, daemonize, monitor, pause,
+ migrate_receive(debug, daemonize, monitor, pause_after_migration,
STDOUT_FILENO, STDIN_FILENO,
checkpointed, script);
@@ -5091,7 +5092,7 @@ int main_migrate(int argc, char **argv)
const char *ssh_command = "ssh";
char *rune = NULL;
char *host;
- int opt, daemonize = 1, monitor = 1, debug = 0, pause = 0;
+ int opt, daemonize = 1, monitor = 1, debug = 0, pause_after_migration = 0;
static struct option opts[] = {
{"debug", 0, 0, 0x100},
{"live", 0, 0, 0x200},
@@ -5113,7 +5114,7 @@ int main_migrate(int argc, char **argv)
monitor = 0;
break;
case 'p':
- pause = 1;
+ pause_after_migration = 1;
break;
case 0x100: /* --debug */
debug = 1;
@@ -5148,7 +5149,7 @@ int main_migrate(int argc, char **argv)
verbose_len, verbose_buf,
daemonize ? "" : " -e",
debug ? " -d" : "",
- pause ? " -p" : "");
+ pause_after_migration ? " -p" : "");
}
migrate_domain(domid, rune, debug, config_filename);
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xl: rename variable pause to pause_after_migration
2016-07-20 8:30 [PATCH] xl: rename variable pause to pause_after_migration Wei Liu
@ 2016-07-20 9:43 ` Roger Pau Monne
2016-07-20 10:34 ` Wei Liu
2016-07-20 12:12 ` Ian Jackson
2016-07-20 15:24 ` Wei Liu
2 siblings, 1 reply; 5+ messages in thread
From: Roger Pau Monne @ 2016-07-20 9:43 UTC (permalink / raw)
To: Wei Liu; +Cc: Xen-devel, Boris Ostrovsky, Ian Jackson
On Wed, Jul 20, 2016 at 09:30:17AM +0100, Wei Liu wrote:
> Gcc 4.4.4 complained that the "pause" variable introduced in 22b430e0
> ("xl: add option to leave domain paused after migration") shadowed
> pause(2) declaration in unistd.h.
>
> Rename "pause" to "pause_after_migration" to fix this issue.
>
> Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Thanks, I haven't noticied that it was shadowing pause(2).
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xl: rename variable pause to pause_after_migration
2016-07-20 9:43 ` Roger Pau Monne
@ 2016-07-20 10:34 ` Wei Liu
0 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2016-07-20 10:34 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: Xen-devel, Boris Ostrovsky, Wei Liu, Ian Jackson
On Wed, Jul 20, 2016 at 11:43:19AM +0200, Roger Pau Monne wrote:
> On Wed, Jul 20, 2016 at 09:30:17AM +0100, Wei Liu wrote:
> > Gcc 4.4.4 complained that the "pause" variable introduced in 22b430e0
> > ("xl: add option to leave domain paused after migration") shadowed
> > pause(2) declaration in unistd.h.
> >
> > Rename "pause" to "pause_after_migration" to fix this issue.
> >
> > Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>
> Acked-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Thanks, I haven't noticied that it was shadowing pause(2).
My compile test passed. Newer gcc is happy with that. I didn't bother to
look into the differences between different gcc versions though.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xl: rename variable pause to pause_after_migration
2016-07-20 8:30 [PATCH] xl: rename variable pause to pause_after_migration Wei Liu
2016-07-20 9:43 ` Roger Pau Monne
@ 2016-07-20 12:12 ` Ian Jackson
2016-07-20 15:24 ` Wei Liu
2 siblings, 0 replies; 5+ messages in thread
From: Ian Jackson @ 2016-07-20 12:12 UTC (permalink / raw)
To: Wei Liu; +Cc: Xen-devel, Boris Ostrovsky, Roger Pau Monne
Wei Liu writes ("[PATCH] xl: rename variable pause to pause_after_migration"):
> Gcc 4.4.4 complained that the "pause" variable introduced in 22b430e0
> ("xl: add option to leave domain paused after migration") shadowed
> pause(2) declaration in unistd.h.
>
> Rename "pause" to "pause_after_migration" to fix this issue.
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xl: rename variable pause to pause_after_migration
2016-07-20 8:30 [PATCH] xl: rename variable pause to pause_after_migration Wei Liu
2016-07-20 9:43 ` Roger Pau Monne
2016-07-20 12:12 ` Ian Jackson
@ 2016-07-20 15:24 ` Wei Liu
2 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2016-07-20 15:24 UTC (permalink / raw)
To: Xen-devel; +Cc: Ian Jackson, Boris Ostrovsky, Wei Liu, Roger Pau Monne
Pushed.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-20 15:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-20 8:30 [PATCH] xl: rename variable pause to pause_after_migration Wei Liu
2016-07-20 9:43 ` Roger Pau Monne
2016-07-20 10:34 ` Wei Liu
2016-07-20 12:12 ` Ian Jackson
2016-07-20 15:24 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).