Changeset 62

Show
Ignore:
Timestamp:
02/06/07 03:15:09 (2 years ago)
Author:
mike
Message:

[new] hd aio LED support
[fix] hd/cdrom synchronous LED support

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/changelog.txt

    r61 r62  
     1Q-0.9.0d62 
     2[new] hd aio LED support 
     3[fix] hd/cdrom synchronous LED support 
     4 
    15Q-0.9.0d61 
    26[new] support for VM snapshots 
  • trunk/host-cocoa/cocoaCpuView.m

    r35 r62  
    22 * QEMU Cocoa CpuView 
    33 *  
    4  * Copyright (c) 2005, 2006 Mike Kronenberg 
     4 * Copyright (c) 2005 - 2007 Mike Kronenberg 
    55 *  
    66 * Permission is hereby granted, free of charge, to any person obtaining a copy 
     
    2424 
    2525#import "cocoaCpuView.h" 
    26 #import "vl.h" 
     26#import "../vl.h" 
     27#import "../block_int.h" 
    2728 
    2829#include <mach/mach.h> 
     
    3435#include <mach/mach_init.h> 
    3536 
    36 struct BlockDriverState { 
    37     int64_t total_sectors; 
    38     int read_only; /* if true, the media is read only */ 
    39     int inserted; /* if true, the media is present */ 
    40     int removable; /* if true, the media can be removed */ 
    41     int locked;    /* if true, the media cannot temporarily be ejected */ 
    42     int encrypted; /* if true, the media is encrypted */ 
    43     int activityLED; /* if true, the media is accessed atm */ 
    44     /* event callback when inserting/removing */ 
    45     void (*change_cb)(void *opaque); 
    46     void *change_opaque; 
    47  
    48     BlockDriver *drv; 
    49     void *opaque; 
    50  
    51     int boot_sector_enabled; 
    52     uint8_t boot_sector_data[512]; 
    53  
    54     char filename[1024]; 
    55     char backing_file[1024]; /* if non zero, the image is a diff of 
    56                                 this file image */ 
    57     int is_temporary; 
    58      
    59     BlockDriverState *backing_hd; 
    60      
    61     /* NOTE: the following infos are only hints for real hardware 
    62        drivers. They are not used by the block driver */ 
    63     int cyls, heads, secs, translation; 
    64     int type; 
    65     char device_name[32]; 
    66     BlockDriverState *next; 
    67 }; 
     37 
    6838 
    6939@implementation cocoaCpuView 
  • trunk/patches/q_block.c_hdled_1.diff

    r61 r62  
    1 --- block.c     2006-06-21 18:46:53.000000000 +0200 
    2 +++ block2.c    2006-07-04 01:43:59.000000000 +0200 
    3 @@ -420,6 +420,8 @@ 
     1--- block.c     2007-02-06 02:15:39.000000000 +0100 
     2+++ block2.c    2007-02-06 02:24:10.000000000 +0100 
     3@@ -497,6 +497,7 @@ 
     4 int bdrv_read(BlockDriverState *bs, int64_t sector_num,  
     5               uint8_t *buf, int nb_sectors) 
     6 { 
     7+    bs->activityLED = 1; 
     8     BlockDriver *drv = bs->drv; 
    49  
    510     if (!drv) 
    6          return -ENOMEDIUM; 
    7 +         
    8 +    bs->activityLED = 1; 
    9   
    10      if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { 
    11              memcpy(buf, bs->boot_sector_data, 512); 
    12 @@ -454,6 +456,7 @@ 
     11@@ -534,6 +535,7 @@ 
    1312 int bdrv_write(BlockDriverState *bs, int64_t sector_num,  
    1413                const uint8_t *buf, int nb_sectors) 
     
    1817     if (!bs->drv) 
    1918         return -ENOMEDIUM; 
     19@@ -1058,6 +1060,7 @@ 
     20                                 uint8_t *buf, int nb_sectors, 
     21                                 BlockDriverCompletionFunc *cb, void *opaque) 
     22 { 
     23+    bs->activityLED = 1; 
     24     BlockDriver *drv = bs->drv; 
     25  
     26     if (!drv) 
     27@@ -1078,6 +1081,7 @@ 
     28                                  const uint8_t *buf, int nb_sectors, 
     29                                  BlockDriverCompletionFunc *cb, void *opaque) 
     30 { 
     31+    bs->activityLED = 1; 
     32     BlockDriver *drv = bs->drv; 
     33  
     34     if (!drv)