« Previous | Next » 

Revision bcbdc4d3

IDbcbdc4d3542bf390ec6ab9463c160a65bb3bcfdb

Added by Gerd Hoffmann over 14 years ago

ide: add IDEBus struct, cleanups

The current IDE code uses an array of two IDEState structs to maintain
the IDE bus. This patch adds a IDEBus to be used instead and does a
bunch of cleanups:

  • move ide bus state from IDEState to IDEBus.
  • drop a bunch of ugly pointer arithmetics to figure the active
    interface, explicitly save the interface number instead.
  • add helper functions to save/restore idebus state.

It also fixes a save/restore bug: loadvm allways stores the command in
the master's IDEState, even when it was saved from the slave.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences