direct-io.hg

changeset 15208:6c636bd3f874

xentrace: Bit-field boolean must be unsigned.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Mon Jun 04 14:24:46 2007 +0100 (2007-06-04)
parents c388a2ff1b8e
children 20ccb03e738d
files tools/xentrace/xentrace.c
line diff
     1.1 --- a/tools/xentrace/xentrace.c	Mon Jun 04 14:05:10 2007 +0100
     1.2 +++ b/tools/xentrace/xentrace.c	Mon Jun 04 14:24:46 2007 +0100
     1.3 @@ -56,7 +56,7 @@ typedef struct settings_st {
     1.4      uint32_t evt_mask;
     1.5      uint32_t cpu_mask;
     1.6      unsigned long tbuf_size;
     1.7 -    int discard:1;
     1.8 +    uint8_t discard:1;
     1.9  } settings_t;
    1.10  
    1.11  settings_t opts;
    1.12 @@ -308,12 +308,9 @@ int monitor_tbufs(FILE *logfile)
    1.13      meta  = init_bufs_ptrs(tbufs_mapped, num, size);
    1.14      data  = init_rec_ptrs(meta, num);
    1.15  
    1.16 -    if(opts.discard) {
    1.17 -        for ( i = 0; (i < num) ; i++ )
    1.18 -        {
    1.19 -	    meta[i]->cons = meta[i]->prod;
    1.20 -        }
    1.21 -    }
    1.22 +    if ( opts.discard )
    1.23 +        for ( i = 0; i < num; i++ )
    1.24 +            meta[i]->cons = meta[i]->prod;
    1.25  
    1.26      /* now, scan buffers for events */
    1.27      while ( !interrupted )
    1.28 @@ -423,7 +420,7 @@ error_t cmd_parser(int key, char *arg, s
    1.29  
    1.30      case 'D': /* Discard traces currently in the buffer before beginning */
    1.31      {
    1.32 -        opts.discard=1;
    1.33 +        opts.discard = 1;
    1.34      }
    1.35      break;
    1.36