Re: [PATCH 1/3] record: Use proper type for timestamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

On Wed, Jun 08, 2016 at 10:20:40AM +0100, Frediano Ziglio wrote:
> Use red_time_t to make sure timestamp has the right precision even
> on 32 bit systems.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/red-record-qxl.c | 6 +++---
>  server/red-record-qxl.h | 5 +++--
>  2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/server/red-record-qxl.c b/server/red-record-qxl.c
> index 9b7d2af..d92b5e7 100644
> --- a/server/red-record-qxl.c
> +++ b/server/red-record-qxl.c
> @@ -804,18 +804,18 @@ void red_record_primary_surface_create(RedRecord *record,
>          line_0);
>  }
>  
> -void red_record_event(RedRecord *record, int what, uint32_t type, unsigned long ts)
> +void red_record_event(RedRecord *record, int what, uint32_t type, red_time_t ts)
>  {
>      // TODO: record the size of the packet in the header. This would make
>      // navigating it much faster (well, I can add an index while I'm at it..)
>      // and make it trivial to get a histogram from a file.
>      // But to implement that I would need some temporary buffer for each event.
>      // (that can be up to VGA_FRAMEBUFFER large)
> -    fprintf(record->fd, "event %u %d %u %lu\n", record->counter++, what, type, ts);
> +    fprintf(record->fd, "event %u %d %u %"PRIu64"\n", record->counter++, what, type, ts);
>  }
>  
>  void red_record_qxl_command(RedRecord *record, RedMemSlotInfo *slots,
> -                            QXLCommandExt ext_cmd, unsigned long ts)
> +                            QXLCommandExt ext_cmd, red_time_t ts)
>  {
>      FILE *fd = record->fd;
>  
> diff --git a/server/red-record-qxl.h b/server/red-record-qxl.h
> index ae22de2..7332afe 100644
> --- a/server/red-record-qxl.h
> +++ b/server/red-record-qxl.h
> @@ -23,6 +23,7 @@
>  
>  #include "red-common.h"
>  #include "memslot.h"
> +#include "utils.h"
>  
>  typedef struct RedRecord RedRecord;
>  
> @@ -38,9 +39,9 @@ void red_record_primary_surface_create(RedRecord *record,
>                                         QXLDevSurfaceCreate *surface,
>                                         uint8_t *line_0);
>  
> -void red_record_event(RedRecord *record, int what, uint32_t type, unsigned long ts);
> +void red_record_event(RedRecord *record, int what, uint32_t type, red_time_t ts);
>  
>  void red_record_qxl_command(RedRecord *record, RedMemSlotInfo *slots,
> -                            QXLCommandExt ext_cmd, unsigned long ts);
> +                            QXLCommandExt ext_cmd, red_time_t ts);
>  
>  #endif
> -- 
> 2.7.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]