[Spice-devel] [vdagent-linux v2 4/5] build-sys: remove prefix from filenames

Frediano Ziglio fziglio at redhat.com
Fri Sep 16 14:38:56 UTC 2016


> 
> ---
>  .gitignore                                         |  6 +++++
>  Makefile.am                                        | 28
>  +++++++++++-----------
>  src/vdagent/{vdagent-audio.c => audio.c}           |  2 +-
>  src/vdagent/{vdagent-audio.h => audio.h}           |  4 ++--
>  src/vdagent/{vdagent-file-xfers.c => file-xfers.c} |  4 ++--
>  src/vdagent/{vdagent-file-xfers.h => file-xfers.h} |  0
>  src/vdagent/vdagent.c                              |  6 ++---
>  src/vdagent/{vdagent-x11-priv.h => x11-priv.h}     |  0
>  src/vdagent/{vdagent-x11-randr.c => x11-randr.c}   |  4 ++--
>  src/vdagent/{vdagent-x11.c => x11.c}               |  4 ++--
>  src/vdagent/{vdagent-x11.h => x11.h}               |  4 ++--
>  src/vdagentd/{vdagentd-uinput.c => uinput.c}       |  4 ++--
>  src/vdagentd/{vdagentd-uinput.h => uinput.h}       |  0
>  src/vdagentd/vdagentd.c                            |  6 ++---
>  .../{vdagent-virtio-port.c => virtio-port.c}       |  2 +-
>  .../{vdagent-virtio-port.h => virtio-port.h}       |  4 ++--
>  src/vdagentd/{vdagentd-xorg-conf.c => xorg-conf.c} |  2 +-
>  src/vdagentd/{vdagentd-xorg-conf.h => xorg-conf.h} |  0
>  18 files changed, 43 insertions(+), 37 deletions(-)
>  rename src/vdagent/{vdagent-audio.c => audio.c} (99%)
>  rename src/vdagent/{vdagent-audio.h => audio.h} (91%)
>  rename src/vdagent/{vdagent-file-xfers.c => file-xfers.c} (99%)
>  rename src/vdagent/{vdagent-file-xfers.h => file-xfers.h} (100%)
>  rename src/vdagent/{vdagent-x11-priv.h => x11-priv.h} (100%)
>  rename src/vdagent/{vdagent-x11-randr.c => x11-randr.c} (99%)
>  rename src/vdagent/{vdagent-x11.c => x11.c} (99%)
>  rename src/vdagent/{vdagent-x11.h => x11.h} (95%)
>  rename src/vdagentd/{vdagentd-uinput.c => uinput.c} (99%)
>  rename src/vdagentd/{vdagentd-uinput.h => uinput.h} (100%)
>  rename src/vdagentd/{vdagent-virtio-port.c => virtio-port.c} (99%)
>  rename src/vdagentd/{vdagent-virtio-port.h => virtio-port.h} (97%)
>  rename src/vdagentd/{vdagentd-xorg-conf.c => xorg-conf.c} (99%)
>  rename src/vdagentd/{vdagentd-xorg-conf.h => xorg-conf.h} (100%)
> 
> diff --git a/.gitignore b/.gitignore
> index 4c039ee..ae47a90 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -8,6 +8,12 @@ src/stamp-h1
>  src/*.o
>  src/.deps
>  src/.dirstamp
> +src/vdagent/*.o
> +src/vdagent/.deps
> +src/vdagent/.dirstamp
> +src/vdagentd/*.o
> +src/vdagentd/.deps
> +src/vdagentd/.dirstamp
>  config.log
>  config.status
>  aclocal.m4
> diff --git a/Makefile.am b/Makefile.am
> index 861d806..7755f09 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -29,14 +29,14 @@ src_spice_vdagent_LDADD =			\
>  
>  src_spice_vdagent_SOURCES =			\
>  	$(common_sources)			\
> -	src/vdagent/vdagent-audio.c		\
> -	src/vdagent/vdagent-audio.h		\
> -	src/vdagent/vdagent-file-xfers.c	\
> -	src/vdagent/vdagent-file-xfers.h	\
> -	src/vdagent/vdagent-x11-priv.h		\
> -	src/vdagent/vdagent-x11-randr.c		\
> -	src/vdagent/vdagent-x11.c		\
> -	src/vdagent/vdagent-x11.h		\
> +	src/vdagent/audio.c			\
> +	src/vdagent/audio.h			\
> +	src/vdagent/file-xfers.c		\
> +	src/vdagent/file-xfers.h		\
> +	src/vdagent/x11-priv.h			\
> +	src/vdagent/x11-randr.c			\
> +	src/vdagent/x11.c			\
> +	src/vdagent/x11.h			\
>  	src/vdagent/vdagent.c			\
>  	$(NULL)
>  
> @@ -63,12 +63,12 @@ src_spice_vdagentd_SOURCES =			\
>  	$(common_sources)			\
>  	src/vdagentd/vdagentd.c			\
>  	src/vdagentd/session-info.h		\
> -	src/vdagentd/vdagentd-uinput.c		\
> -	src/vdagentd/vdagentd-uinput.h		\
> -	src/vdagentd/vdagentd-xorg-conf.c	\
> -	src/vdagentd/vdagentd-xorg-conf.h	\
> -	src/vdagentd/vdagent-virtio-port.c	\
> -	src/vdagentd/vdagent-virtio-port.h	\
> +	src/vdagentd/uinput.c			\
> +	src/vdagentd/uinput.h			\
> +	src/vdagentd/xorg-conf.c		\
> +	src/vdagentd/xorg-conf.h		\
> +	src/vdagentd/virtio-port.c		\
> +	src/vdagentd/virtio-port.h		\
>  	$(NULL)
>  
>  if HAVE_CONSOLE_KIT
> diff --git a/src/vdagent/vdagent-audio.c b/src/vdagent/audio.c
> similarity index 99%
> rename from src/vdagent/vdagent-audio.c
> rename to src/vdagent/audio.c
> index 6b11cd8..e823569 100644
> --- a/src/vdagent/vdagent-audio.c
> +++ b/src/vdagent/audio.c
> @@ -26,7 +26,7 @@
>  #include <alsa/asoundlib.h>
>  #include <alsa/mixer.h>
>  #include <alsa/error.h>
> -#include "vdagent-audio.h"
> +#include "audio.h"
>  
>  #define ALSA_MUTE   0
>  #define ALSA_UNMUTE 1
> diff --git a/src/vdagent/vdagent-audio.h b/src/vdagent/audio.h
> similarity index 91%
> rename from src/vdagent/vdagent-audio.h
> rename to src/vdagent/audio.h
> index 6f29d4b..7d0ae35 100644
> --- a/src/vdagent/vdagent-audio.h
> +++ b/src/vdagent/audio.h
> @@ -1,6 +1,6 @@
> -/*  vdagent-audio.h vdagentd audio handling header
> +/*  audio.h vdagentd audio handling header
>  
> -    Copyright 2015 Red Hat, Inc.
> +    Copyright 2015, 2016 Red Hat, Inc.
>  
>      This program is free software: you can redistribute it and/or modify
>      it under the terms of the GNU General Public License as published by
> diff --git a/src/vdagent/vdagent-file-xfers.c b/src/vdagent/file-xfers.c
> similarity index 99%
> rename from src/vdagent/vdagent-file-xfers.c
> rename to src/vdagent/file-xfers.c
> index 48b3069..bfb2ce5 100644
> --- a/src/vdagent/vdagent-file-xfers.c
> +++ b/src/vdagent/file-xfers.c
> @@ -1,6 +1,6 @@
>  /*  vdagent file xfers code
>  
> -    Copyright 2013 Red Hat, Inc.
> +    Copyright 2013 - 2016 Red Hat, Inc.
>  
>      Red Hat Authors:
>      Hans de Goede <hdegoede at redhat.com>
> @@ -37,7 +37,7 @@
>  #include <glib.h>
>  
>  #include "vdagentd-proto.h"
> -#include "vdagent-file-xfers.h"
> +#include "file-xfers.h"
>  
>  struct vdagent_file_xfers {
>      GHashTable *xfers;
> diff --git a/src/vdagent/vdagent-file-xfers.h b/src/vdagent/file-xfers.h
> similarity index 100%
> rename from src/vdagent/vdagent-file-xfers.h
> rename to src/vdagent/file-xfers.h
> diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c
> index a3cdd9b..333dfd5 100644
> --- a/src/vdagent/vdagent.c
> +++ b/src/vdagent/vdagent.c
> @@ -40,9 +40,9 @@
>  #include "udscs.h"
>  #include "vdagentd-proto.h"
>  #include "vdagentd-proto-strings.h"
> -#include "vdagent-audio.h"
> -#include "vdagent-x11.h"
> -#include "vdagent-file-xfers.h"
> +#include "audio.h"
> +#include "x11.h"
> +#include "file-xfers.h"
>  
>  static const char *portdev = "/dev/virtio-ports/com.redhat.spice.0";
>  static const char *vdagentd_socket = VDAGENTD_SOCKET;
> diff --git a/src/vdagent/vdagent-x11-priv.h b/src/vdagent/x11-priv.h
> similarity index 100%
> rename from src/vdagent/vdagent-x11-priv.h
> rename to src/vdagent/x11-priv.h
> diff --git a/src/vdagent/vdagent-x11-randr.c b/src/vdagent/x11-randr.c
> similarity index 99%
> rename from src/vdagent/vdagent-x11-randr.c
> rename to src/vdagent/x11-randr.c
> index 02089b2..bc480fe 100644
> --- a/src/vdagent/vdagent-x11-randr.c
> +++ b/src/vdagent/x11-randr.c
> @@ -31,8 +31,8 @@
>  #include <X11/extensions/Xinerama.h>
>  
>  #include "vdagentd-proto.h"
> -#include "vdagent-x11.h"
> -#include "vdagent-x11-priv.h"
> +#include "x11.h"
> +#include "x11-priv.h"
>  
>  #define MM_PER_INCH (25.4)
>  
> diff --git a/src/vdagent/vdagent-x11.c b/src/vdagent/x11.c
> similarity index 99%
> rename from src/vdagent/vdagent-x11.c
> rename to src/vdagent/x11.c
> index da27602..e88a8ea 100644
> --- a/src/vdagent/vdagent-x11.c
> +++ b/src/vdagent/x11.c
> @@ -42,8 +42,8 @@
>  #include <X11/Xlib.h>
>  #include <X11/extensions/Xfixes.h>
>  #include "vdagentd-proto.h"
> -#include "vdagent-x11.h"
> -#include "vdagent-x11-priv.h"
> +#include "x11.h"
> +#include "x11-priv.h"
>  
>  /* Stupid X11 API, there goes our encapsulate all data in a struct design */
>  int (*vdagent_x11_prev_error_handler)(Display *, XErrorEvent *);
> diff --git a/src/vdagent/vdagent-x11.h b/src/vdagent/x11.h
> similarity index 95%
> rename from src/vdagent/vdagent-x11.h
> rename to src/vdagent/x11.h
> index e67701e..4fd0380 100644
> --- a/src/vdagent/vdagent-x11.h
> +++ b/src/vdagent/x11.h
> @@ -1,6 +1,6 @@
> -/*  vdagent-x11.h vdagent x11 code header file
> +/*  x11.h vdagent x11 code header file
>  
> -    Copyright 2010 Red Hat, Inc.
> +    Copyright 2010 - 2016 Red Hat, Inc.
>  
>      Red Hat Authors:
>      Hans de Goede <hdegoede at redhat.com>
> diff --git a/src/vdagentd/vdagentd-uinput.c b/src/vdagentd/uinput.c
> similarity index 99%
> rename from src/vdagentd/vdagentd-uinput.c
> rename to src/vdagentd/uinput.c
> index 5a70530..e2966c4 100644
> --- a/src/vdagentd/vdagentd-uinput.c
> +++ b/src/vdagentd/uinput.c
> @@ -1,6 +1,6 @@
>  /*  vdagentd-uinput.c vdagentd uinput handling code
>  
> -    Copyright 2010-2012 Red Hat, Inc.
> +    Copyright 2010-2016 Red Hat, Inc.
>  
>      Red Hat Authors:
>      Hans de Goede <hdegoede at redhat.com>
> @@ -31,7 +31,7 @@
>  #include <linux/input.h>
>  #include <linux/uinput.h>
>  #include <spice/vd_agent.h>
> -#include "vdagentd-uinput.h"
> +#include "uinput.h"
>  
>  struct vdagentd_uinput {
>      const char *devname;
> diff --git a/src/vdagentd/vdagentd-uinput.h b/src/vdagentd/uinput.h
> similarity index 100%
> rename from src/vdagentd/vdagentd-uinput.h
> rename to src/vdagentd/uinput.h
> diff --git a/src/vdagentd/vdagentd.c b/src/vdagentd/vdagentd.c
> index a699681..8dee414 100644
> --- a/src/vdagentd/vdagentd.c
> +++ b/src/vdagentd/vdagentd.c
> @@ -39,9 +39,9 @@
>  #include "udscs.h"
>  #include "vdagentd-proto.h"
>  #include "vdagentd-proto-strings.h"
> -#include "vdagentd-uinput.h"
> -#include "vdagentd-xorg-conf.h"
> -#include "vdagent-virtio-port.h"
> +#include "uinput.h"
> +#include "xorg-conf.h"
> +#include "virtio-port.h"
>  #include "session-info.h"
>  
>  struct agent_data {
> diff --git a/src/vdagentd/vdagent-virtio-port.c b/src/vdagentd/virtio-port.c
> similarity index 99%
> rename from src/vdagentd/vdagent-virtio-port.c
> rename to src/vdagentd/virtio-port.c
> index 6267c74..cedda4d 100644
> --- a/src/vdagentd/vdagent-virtio-port.c
> +++ b/src/vdagentd/virtio-port.c
> @@ -29,7 +29,7 @@
>  #include <sys/socket.h>
>  #include <sys/un.h>
>  
> -#include "vdagent-virtio-port.h"
> +#include "virtio-port.h"
>  
>  
>  struct vdagent_virtio_port_buf {
> diff --git a/src/vdagentd/vdagent-virtio-port.h b/src/vdagentd/virtio-port.h
> similarity index 97%
> rename from src/vdagentd/vdagent-virtio-port.h
> rename to src/vdagentd/virtio-port.h
> index ac766bd..810ea8a 100644
> --- a/src/vdagentd/vdagent-virtio-port.h
> +++ b/src/vdagentd/virtio-port.h
> @@ -1,6 +1,6 @@
> -/*  vdagent-virtio-port.h virtio port communication header
> +/*  virtio-port.h virtio port communication header
>  
> -    Copyright 2010 Red Hat, Inc.
> +    Copyright 2010 - 2016 Red Hat, Inc.
>  
>      Red Hat Authors:
>      Hans de Goede <hdegoede at redhat.com>
> diff --git a/src/vdagentd/vdagentd-xorg-conf.c b/src/vdagentd/xorg-conf.c
> similarity index 99%
> rename from src/vdagentd/vdagentd-xorg-conf.c
> rename to src/vdagentd/xorg-conf.c
> index 5992897..9f3dac5 100644
> --- a/src/vdagentd/vdagentd-xorg-conf.c
> +++ b/src/vdagentd/xorg-conf.c
> @@ -30,7 +30,7 @@
>  #include <errno.h>
>  #include <limits.h>
>  #include <syslog.h>
> -#include "vdagentd-xorg-conf.h"
> +#include "xorg-conf.h"
>  
>  #define FPRINTF(...) \
>      do { \
> diff --git a/src/vdagentd/vdagentd-xorg-conf.h b/src/vdagentd/xorg-conf.h
> similarity index 100%
> rename from src/vdagentd/vdagentd-xorg-conf.h
> rename to src/vdagentd/xorg-conf.h

I'm not sure if is better to have 2 patches, one for file move and
another for file rename. I was thinking specifically how easy is to
follow file renames in git but surely there is a magic option I miss.

That said acked both way.

Frediano


More information about the Spice-devel mailing list