search for: inhibit_sleep

Displaying 1 result from an estimated 1 matches for "inhibit_sleep".

2016 Oct 24
2
[PATCH] p2v: Inhibit power saving during the conversion.
...X/virt-v2v-wrapper.sh"; char dmesg_file[] = "/tmp/p2v.XXXXXX/dmesg"; + int inhibit_fd = -1; #if DEBUG_STDERR print_config (config, stderr); @@ -218,6 +219,12 @@ start_conversion (struct config *config, set_running (1); set_cancel_requested (0); + inhibit_fd = inhibit_sleep (); +#ifdef DEBUG_STDERR + if (inhibit_fd == -1) + fprintf (stderr, "warning: virt-p2v cannot inhibit power saving during conversion.\n"); +#endif + data_conns = malloc (sizeof (struct data_conn) * nr_disks); if (data_conns == NULL) error (EXIT_FAILURE, errno, "malloc&...