vlog: Introduce VLOG_DEFINE_THIS_MODULE for declaring vlog module in use.
[sliver-openvswitch.git] / extras / ezio / tty.c
index 709b802..a4bb14c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2009 Nicira Networks, Inc.
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "fatal-signal.h"
 #include "socket-util.h"
 #include "util.h"
-
-#define THIS_MODULE VLM_tty
 #include "vlog.h"
 
+VLOG_DEFINE_THIS_MODULE(tty)
+
 /* Get major() and minor() macros. */
 #if MAJOR_IN_MKDEV
 #  include <sys/mkdev.h>
@@ -263,7 +263,7 @@ tty_set_raw_mode(int fd, speed_t speed)
             return errno;
         }
         s->tios = tios;
-        fatal_signal_add_hook(restore_termios, s, true);
+        fatal_signal_add_hook(restore_termios, NULL, s, true);
 
         tios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
                           | INLCR | IGNCR | ICRNL | IXON);
@@ -374,7 +374,9 @@ tty_fork_child(int master_fd, char *argv[])
 }
 
 int
-tty_set_window_size(int fd UNUSED, int rows UNUSED, int columns UNUSED)
+tty_set_window_size(int fd OVS_UNUSED,
+                    int rows OVS_UNUSED,
+                    int columns OVS_UNUSED)
 {
 #ifdef TIOCGWINSZ
     struct winsize win;