qtest: Fix tv_usec != long
Sparc Debian 5.0.8 does not define __suseconds_t as long, but FMT_timeval expects %ld. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Cc: Anthony Liguori <aliguori@us.ibm.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
		
							parent
							
								
									e3c56761b4
								
							
						
					
					
						commit
						7f3bf92fad
					
				
							
								
								
									
										8
									
								
								qtest.c
								
								
								
								
							
							
						
						
									
										8
									
								
								qtest.c
								
								
								
								
							| 
						 | 
				
			
			@ -153,7 +153,7 @@ static void qtest_send_prefix(CharDriverState *chr)
 | 
			
		|||
 | 
			
		||||
    qtest_get_time(&tv);
 | 
			
		||||
    fprintf(qtest_log_fp, "[S +" FMT_timeval "] ",
 | 
			
		||||
            tv.tv_sec, tv.tv_usec);
 | 
			
		||||
            tv.tv_sec, (long) tv.tv_usec);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void GCC_FMT_ATTR(2, 3) qtest_send(CharDriverState *chr,
 | 
			
		||||
| 
						 | 
				
			
			@ -201,7 +201,7 @@ static void qtest_process_command(CharDriverState *chr, gchar **words)
 | 
			
		|||
 | 
			
		||||
        qtest_get_time(&tv);
 | 
			
		||||
        fprintf(qtest_log_fp, "[R +" FMT_timeval "]",
 | 
			
		||||
                tv.tv_sec, tv.tv_usec);
 | 
			
		||||
                tv.tv_sec, (long) tv.tv_usec);
 | 
			
		||||
        for (i = 0; words[i]; i++) {
 | 
			
		||||
            fprintf(qtest_log_fp, " %s", words[i]);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -399,7 +399,7 @@ static void qtest_event(void *opaque, int event)
 | 
			
		|||
        qtest_opened = true;
 | 
			
		||||
        if (qtest_log_fp) {
 | 
			
		||||
            fprintf(qtest_log_fp, "[I " FMT_timeval "] OPENED\n",
 | 
			
		||||
                    start_time.tv_sec, start_time.tv_usec);
 | 
			
		||||
                    start_time.tv_sec, (long) start_time.tv_usec);
 | 
			
		||||
        }
 | 
			
		||||
        break;
 | 
			
		||||
    case CHR_EVENT_CLOSED:
 | 
			
		||||
| 
						 | 
				
			
			@ -408,7 +408,7 @@ static void qtest_event(void *opaque, int event)
 | 
			
		|||
            qemu_timeval tv;
 | 
			
		||||
            qtest_get_time(&tv);
 | 
			
		||||
            fprintf(qtest_log_fp, "[I +" FMT_timeval "] CLOSED\n",
 | 
			
		||||
                    tv.tv_sec, tv.tv_usec);
 | 
			
		||||
                    tv.tv_sec, (long) tv.tv_usec);
 | 
			
		||||
        }
 | 
			
		||||
        break;
 | 
			
		||||
    default:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue