Hello community,

here is the log from the commit of package hyper-v for openSUSE:Factory checked 
in at 2014-12-06 13:47:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hyper-v (Old)
 and      /work/SRC/openSUSE:Factory/.hyper-v.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hyper-v"

Changes:
--------
--- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes  2014-11-13 
09:21:36.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes     2014-12-06 
13:47:10.000000000 +0100
@@ -1,0 +2,5 @@
+Tue Nov 25 17:46:30 UTC 2014 - [email protected]
+
+- introduce -n/--no-daemon option (fate#317317533)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hyper-v.tools.hv.hv_fcopy_daemon.c ++++++
--- /var/tmp/diff_new_pack.dv25IH/_old  2014-12-06 13:47:11.000000000 +0100
+++ /var/tmp/diff_new_pack.dv25IH/_new  2014-12-06 13:47:11.000000000 +0100
@@ -33,6 +33,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <dirent.h>
+#include <getopt.h>
 
 static int target_fd;
 static char target_fname[W_MAX_PATH];
@@ -126,15 +127,43 @@
 
 }
 
-int main(void)
+void print_usage(char *argv[])
+{
+       fprintf(stderr, "Usage: %s [options]\n"
+               "Options are:\n"
+               "  -n, --no-daemon        stay in foreground, don't daemonize\n"
+               "  -h, --help             print this help\n", argv[0]);
+}
+
+int main(int argc, char *argv[])
 {
        int fd, fcopy_fd, len;
        int error;
+       int daemonize = 1, long_index = 0, opt;
        int version = FCOPY_CURRENT_VERSION;
        char *buffer[4096 * 2];
        struct hv_fcopy_hdr *in_msg;
 
-       if (daemon(1, 0)) {
+       static struct option long_options[] = {
+               {"help",        no_argument,       0,  'h' },
+               {"no-daemon",   no_argument,       0,  'n' },
+               {0,             0,                 0,  0   }
+       };
+
+       while ((opt = getopt_long(argc, argv, "hn", long_options,
+                                 &long_index)) != -1) {
+               switch (opt) {
+               case 'n':
+                       daemonize = 0;
+                       break;
+               case 'h':
+               default:
+                       print_usage(argv);
+                       exit(EXIT_FAILURE);
+               }
+       }
+
+       if (daemonize && daemon(1, 0)) {
                syslog(LOG_ERR, "daemon() failed; error: %s", strerror(errno));
                exit(EXIT_FAILURE);
        }

++++++ hyper-v.tools.hv.hv_kvp_daemon.c ++++++
--- /var/tmp/diff_new_pack.dv25IH/_old  2014-12-06 13:47:11.000000000 +0100
+++ /var/tmp/diff_new_pack.dv25IH/_new  2014-12-06 13:47:11.000000000 +0100
@@ -44,6 +44,7 @@
 #include <fcntl.h>
 #include <dirent.h>
 #include <net/if.h>
+#include <getopt.h>
 
 /*
  * KVP protocol: The user mode component first registers with the
@@ -1419,7 +1420,15 @@
        return sendmsg(fd, &message, 0);
 }
 
-int main(void)
+void print_usage(char *argv[])
+{
+       fprintf(stderr, "Usage: %s [options]\n"
+               "Options are:\n"
+               "  -n, --no-daemon        stay in foreground, don't daemonize\n"
+               "  -h, --help             print this help\n", argv[0]);
+}
+
+int main(int argc, char *argv[])
 {
        int fd, len, nl_group;
        int error;
@@ -1437,9 +1446,30 @@
        struct hv_kvp_ipaddr_value *kvp_ip_val;
        char *kvp_recv_buffer;
        size_t kvp_recv_buffer_len;
+       int daemonize = 1, long_index = 0, opt;
 
-       if (daemon(1, 0))
+       static struct option long_options[] = {
+               {"help",        no_argument,       0,  'h' },
+               {"no-daemon",   no_argument,       0,  'n' },
+               {0,             0,                 0,  0   }
+       };
+
+       while ((opt = getopt_long(argc, argv, "hn", long_options,
+                                 &long_index)) != -1) {
+               switch (opt) {
+               case 'n':
+                       daemonize = 0;
+                       break;
+               case 'h':
+               default:
+                       print_usage(argv);
+                       exit(EXIT_FAILURE);
+               }
+       }
+
+       if (daemonize && daemon(1, 0))
                return 1;
+
        openlog("KVP", 0, LOG_USER);
        syslog(LOG_INFO, "KVP starting; pid is:%d", getpid());
 

++++++ hyper-v.tools.hv.hv_vss_daemon.c ++++++
--- /var/tmp/diff_new_pack.dv25IH/_old  2014-12-06 13:47:11.000000000 +0100
+++ /var/tmp/diff_new_pack.dv25IH/_new  2014-12-06 13:47:11.000000000 +0100
@@ -37,6 +37,7 @@
 #include <linux/hyperv.h>
 #include <linux/netlink.h>
 #include <syslog.h>
+#include <getopt.h>
 
 static struct sockaddr_nl addr;
 
@@ -156,7 +157,15 @@
        return sendmsg(fd, &message, 0);
 }
 
-int main(void)
+void print_usage(char *argv[])
+{
+       fprintf(stderr, "Usage: %s [options]\n"
+               "Options are:\n"
+               "  -n, --no-daemon        stay in foreground, don't daemonize\n"
+               "  -h, --help             print this help\n", argv[0]);
+}
+
+int main(int argc, char *argv[])
 {
        int fd, len, nl_group;
        int error;
@@ -168,8 +177,28 @@
        struct hv_vss_msg *vss_msg;
        char *vss_recv_buffer;
        size_t vss_recv_buffer_len;
+       int daemonize = 1, long_index = 0, opt;
+
+       static struct option long_options[] = {
+               {"help",        no_argument,       0,  'h' },
+               {"no-daemon",   no_argument,       0,  'n' },
+               {0,             0,                 0,  0   }
+       };
+
+       while ((opt = getopt_long(argc, argv, "hn", long_options,
+                                 &long_index)) != -1) {
+               switch (opt) {
+               case 'n':
+                       daemonize = 0;
+                       break;
+               case 'h':
+               default:
+                       print_usage(argv);
+                       exit(EXIT_FAILURE);
+               }
+       }
 
-       if (daemon(1, 0))
+       if (daemonize && daemon(1, 0))
                return 1;
 
        openlog("Hyper-V VSS", 0, LOG_USER);

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to