[Spice-devel] [PATCH spice-protocol] Fix SPICE_STAT_SHM_NAME to be portable

Alon Levy alevy at redhat.com
Sun Jan 8 02:48:38 PST 2012


On Fri, Jan 06, 2012 at 08:56:52AM -0500, Nahum Shalman wrote:
> From SHM_OPEN(3):
>   For portable use, a shared memory object should be identified by a name
>   of the  form  /somename; that is, a null-terminated string of up to
>   NAME_MAX (i.e., 255) characters consisting of an initial slash,
>   followed by one or more characters, none of which are slashes.

ACK. I'll commit, thanks for the patch.

> ---
>  spice/stats.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/spice/stats.h b/spice/stats.h
> index eea5478..452d89e 100644
> --- a/spice/stats.h
> +++ b/spice/stats.h
> @@ -33,7 +33,7 @@
> 
>  #include <spice/types.h>
> 
> -#define SPICE_STAT_SHM_NAME "spice.%u"
> +#define SPICE_STAT_SHM_NAME "/spice.%u"
>  #define SPICE_STAT_NODE_NAME_MAX 20
>  #define SPICE_STAT_MAGIC (*(uint32_t*)"STAT")
>  #define SPICE_STAT_VERSION 1
> -- 
> 1.7.7.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list