From 24bccc8efb3783ca5a8898918023616f5e78c5c9 Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Fri, 19 Feb 2021 13:13:42 +0000 Subject: [PATCH] Changed parameter handler argument "set" type to bool. --- bochs/config.cc | 10 +++++----- bochs/gui/paramtree.h | 4 ++-- bochs/iodev/devices.cc | 2 +- bochs/iodev/display/vgacore.cc | 2 +- bochs/iodev/display/vgacore.h | 2 +- bochs/iodev/floppy.cc | 6 +++--- bochs/iodev/floppy.h | 13 +++++++------ bochs/iodev/harddrv.cc | 4 ++-- bochs/iodev/harddrv.h | 6 +++--- bochs/iodev/iodev.h | 2 +- bochs/iodev/parallel.cc | 2 +- bochs/iodev/parallel.h | 2 +- bochs/iodev/serial.cc | 2 +- bochs/iodev/serial.h | 2 +- bochs/iodev/sound/es1370.cc | 4 ++-- bochs/iodev/sound/es1370.h | 4 ++-- bochs/iodev/sound/sb16.cc | 4 ++-- bochs/iodev/sound/sb16.h | 4 ++-- bochs/iodev/usb/usb_ehci.cc | 2 +- bochs/iodev/usb/usb_ehci.h | 2 +- bochs/iodev/usb/usb_floppy.cc | 4 ++-- bochs/iodev/usb/usb_floppy.h | 4 ++-- bochs/iodev/usb/usb_hub.cc | 2 +- bochs/iodev/usb/usb_hub.h | 2 +- bochs/iodev/usb/usb_msd.cc | 4 ++-- bochs/iodev/usb/usb_msd.h | 6 +++--- bochs/iodev/usb/usb_ohci.cc | 2 +- bochs/iodev/usb/usb_ohci.h | 2 +- bochs/iodev/usb/usb_printer.cc | 2 +- bochs/iodev/usb/usb_printer.h | 2 +- bochs/iodev/usb/usb_uhci.cc | 2 +- bochs/iodev/usb/usb_uhci.h | 2 +- bochs/iodev/usb/usb_xhci.cc | 2 +- bochs/iodev/usb/usb_xhci.h | 2 +- 34 files changed, 59 insertions(+), 58 deletions(-) diff --git a/bochs/config.cc b/bochs/config.cc index f35ae9f23..970aa9123 100644 --- a/bochs/config.cc +++ b/bochs/config.cc @@ -58,7 +58,7 @@ static int parse_line_formatted(const char *context, int num_params, char *param static int parse_bochsrc(const char *rcfile); static int get_floppy_type_from_image(const char *filename); -static Bit64s bx_param_handler(bx_param_c *param, int set, Bit64s val) +static Bit64s bx_param_handler(bx_param_c *param, bool set, Bit64s val) { char pname[BX_PATHNAME_LEN]; Bit8u device; @@ -119,24 +119,24 @@ static Bit64s bx_param_handler(bx_param_c *param, int set, Bit64s val) return val; } -const char *bx_param_string_handler(bx_param_string_c *param, int set, +const char *bx_param_string_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen) { char pname[BX_PATHNAME_LEN]; param->get_param_path(pname, BX_PATHNAME_LEN); if (!strcmp(pname, BXPN_SCREENMODE)) { - if (set == 1) { + if (set) { BX_INFO(("Screen mode changed to %s", val)); } } else if (!strcmp(pname, BXPN_USER_SHORTCUT)) { - if ((set == 1) && (SIM->get_init_done())) { + if (set && (SIM->get_init_done())) { if (!bx_gui->parse_user_shortcut(val)) { val = oldval; } } } else if (!strcmp(pname, BXPN_VGA_EXTENSION)) { - if (set == 1) { + if (set) { if ((strlen(oldval) > 0) && (strcmp(oldval, "none") && strcmp(oldval, "vbe") && strcmp(oldval, "cirrus"))) { PLUG_unload_opt_plugin(oldval); diff --git a/bochs/gui/paramtree.h b/bochs/gui/paramtree.h index acb234610..bec9b8e2d 100644 --- a/bochs/gui/paramtree.h +++ b/bochs/gui/paramtree.h @@ -177,7 +177,7 @@ public: virtual int dump_param(char *buf, int buflen, bool dquotes = false) { return 0; } }; -typedef Bit64s (*param_event_handler)(class bx_param_c *, int set, Bit64s val); +typedef Bit64s (*param_event_handler)(class bx_param_c *, bool set, Bit64s val); typedef Bit64s (*param_save_handler)(void *devptr, class bx_param_c *); typedef void (*param_restore_handler)(void *devptr, class bx_param_c *, Bit64s val); typedef int (*param_enable_handler)(class bx_param_c *, int en); @@ -378,7 +378,7 @@ public: }; typedef const char* (*param_string_event_handler)(class bx_param_string_c *, - int set, const char *oldval, const char *newval, int maxlen); + bool set, const char *oldval, const char *newval, int maxlen); class BOCHSAPI bx_param_string_c : public bx_param_c { protected: diff --git a/bochs/iodev/devices.cc b/bochs/iodev/devices.cc index d59bc3594..4a8c1b73c 100644 --- a/bochs/iodev/devices.cc +++ b/bochs/iodev/devices.cc @@ -1287,7 +1287,7 @@ void bx_devices_c::paste_bytes(Bit8u *data, Bit32s length) service_paste_buf(); } -Bit64s bx_devices_c::param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s bx_devices_c::param_handler(bx_param_c *param, bool set, Bit64s val) { if (set) { char pname[BX_PATHNAME_LEN]; diff --git a/bochs/iodev/display/vgacore.cc b/bochs/iodev/display/vgacore.cc index 65fb1b80d..6d26a33a8 100644 --- a/bochs/iodev/display/vgacore.cc +++ b/bochs/iodev/display/vgacore.cc @@ -2402,7 +2402,7 @@ void bx_vgacore_c::vga_timer_handler(void *this_ptr) #undef LOG_THIS #define LOG_THIS vgadev-> -Bit64s bx_vgacore_c::vga_param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s bx_vgacore_c::vga_param_handler(bx_param_c *param, bool set, Bit64s val) { // handler for runtime parameter 'vga: update_freq' if (set) { diff --git a/bochs/iodev/display/vgacore.h b/bochs/iodev/display/vgacore.h index d8ca91488..52222bdc2 100644 --- a/bochs/iodev/display/vgacore.h +++ b/bochs/iodev/display/vgacore.h @@ -104,7 +104,7 @@ public: virtual void get_crtc_params(bx_crtc_params_t *crtcp); static void vga_timer_handler(void *); - static Bit64s vga_param_handler(bx_param_c *param, int set, Bit64s val); + static Bit64s vga_param_handler(bx_param_c *param, bool set, Bit64s val); protected: void init_standard_vga(void); diff --git a/bochs/iodev/floppy.cc b/bochs/iodev/floppy.cc index 6580aaf2c..69fe63b05 100644 --- a/bochs/iodev/floppy.cc +++ b/bochs/iodev/floppy.cc @@ -1956,7 +1956,7 @@ bool bx_floppy_ctrl_c::get_tc(void) // floppy runtime parameter handling -Bit64s bx_floppy_ctrl_c::floppy_param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s bx_floppy_ctrl_c::floppy_param_handler(bx_param_c *param, bool set, Bit64s val) { bx_list_c *base = (bx_list_c*) param->get_parent(); Bit8u drive; @@ -1974,7 +1974,7 @@ Bit64s bx_floppy_ctrl_c::floppy_param_handler(bx_param_c *param, int set, Bit64s } const char* bx_floppy_ctrl_c::floppy_param_string_handler(bx_param_string_c *param, - int set, const char *oldval, const char *val, int maxlen) + bool set, const char *oldval, const char *val, int maxlen) { char pname[BX_PATHNAME_LEN]; Bit8u drive; @@ -1985,7 +1985,7 @@ const char* bx_floppy_ctrl_c::floppy_param_string_handler(bx_param_string_c *par } param->get_param_path(pname, BX_PATHNAME_LEN); if ((!strncmp(pname, "floppy", 6)) && (!strcmp(param->get_name(), "path"))) { - if (set==1) { + if (set) { drive = atoi(base->get_name()); if (SIM->get_param_enum("devtype", base)->get() == BX_FDD_NONE) { BX_ERROR(("Cannot add a floppy drive at runtime")); diff --git a/bochs/iodev/floppy.h b/bochs/iodev/floppy.h index 0f7e2882a..08c208ad5 100644 --- a/bochs/iodev/floppy.h +++ b/bochs/iodev/floppy.h @@ -136,7 +136,7 @@ private: Bit32u read(Bit32u address, unsigned io_len); void write(Bit32u address, Bit32u value, unsigned io_len); #endif - BX_FD_SMF bool set_media_status(unsigned drive, bool status); + BX_FD_SMF bool set_media_status(unsigned drive, bool status); BX_FD_SMF Bit16u dma_write(Bit8u *buffer, Bit16u maxlen); BX_FD_SMF Bit16u dma_read(Bit8u *buffer, Bit16u maxlen); BX_FD_SMF void floppy_command(void); @@ -147,15 +147,16 @@ private: BX_FD_SMF void enter_result_phase(void); BX_FD_SMF Bit32u calculate_step_delay(Bit8u drive, Bit8u new_cylinder); BX_FD_SMF void reset_changeline(void); - BX_FD_SMF bool get_tc(void); + BX_FD_SMF bool get_tc(void); static void timer_handler(void *); BX_FD_SMF void timer(void); BX_FD_SMF void increment_sector(void); - BX_FD_SMF bool evaluate_media(Bit8u devtype, Bit8u type, char *path, floppy_t *media); - BX_FD_SMF void close_media(floppy_t *media); + BX_FD_SMF bool evaluate_media(Bit8u devtype, Bit8u type, char *path, floppy_t *media); + BX_FD_SMF void close_media(floppy_t *media); // runtime options - static Bit64s floppy_param_handler(bx_param_c *param, int set, Bit64s val); - static const char* floppy_param_string_handler(bx_param_string_c *param, int set, const char *oldval, const char *val, int maxlen); + static Bit64s floppy_param_handler(bx_param_c *param, bool set, Bit64s val); + static const char* floppy_param_string_handler(bx_param_string_c *param, + bool set, const char *oldval, const char *val, int maxlen); static void runtime_config_handler(void *); void runtime_config(void); }; diff --git a/bochs/iodev/harddrv.cc b/bochs/iodev/harddrv.cc index 33e80f8b5..9a5ebefaf 100644 --- a/bochs/iodev/harddrv.cc +++ b/bochs/iodev/harddrv.cc @@ -3637,7 +3637,7 @@ int get_device_handle_from_param(bx_param_c *param) } } -Bit64s bx_hard_drive_c::cdrom_status_handler(bx_param_c *param, int set, Bit64s val) +Bit64s bx_hard_drive_c::cdrom_status_handler(bx_param_c *param, bool set, Bit64s val) { if (set) { int handle = get_device_handle_from_param(param); @@ -3658,7 +3658,7 @@ Bit64s bx_hard_drive_c::cdrom_status_handler(bx_param_c *param, int set, Bit64s return val; } -const char *bx_hard_drive_c::cdrom_path_handler(bx_param_string_c *param, int set, +const char *bx_hard_drive_c::cdrom_path_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen) { if (set) { diff --git a/bochs/iodev/harddrv.h b/bochs/iodev/harddrv.h index 17b040499..d25da81d2 100644 --- a/bochs/iodev/harddrv.h +++ b/bochs/iodev/harddrv.h @@ -222,9 +222,9 @@ private: BX_HD_SMF bool set_cd_media_status(Bit32u handle, bool status); - static Bit64s cdrom_status_handler(bx_param_c *param, int set, Bit64s val); - static const char* cdrom_path_handler(bx_param_string_c *param, int set, - const char *oldval, const char *val, int maxlen); + static Bit64s cdrom_status_handler(bx_param_c *param, bool set, Bit64s val); + static const char* cdrom_path_handler(bx_param_string_c *param, bool set, + const char *oldval, const char *val, int maxlen); // FIXME: // For each ATA channel we should have one controller struct diff --git a/bochs/iodev/iodev.h b/bochs/iodev/iodev.h index 78e4e19fc..79aa88434 100644 --- a/bochs/iodev/iodev.h +++ b/bochs/iodev/iodev.h @@ -533,7 +533,7 @@ private: static void default_write_handler(void *this_ptr, Bit32u address, Bit32u value, unsigned io_len); // runtime options / paste feature - static Bit64s param_handler(bx_param_c *param, int set, Bit64s val); + static Bit64s param_handler(bx_param_c *param, bool set, Bit64s val); void paste_delay_changed(Bit32u value); void service_paste_buf(); diff --git a/bochs/iodev/parallel.cc b/bochs/iodev/parallel.cc index 00b2ce307..a0669045c 100644 --- a/bochs/iodev/parallel.cc +++ b/bochs/iodev/parallel.cc @@ -449,7 +449,7 @@ void bx_parallel_c::write(Bit32u address, Bit32u value, unsigned io_len) } } -const char* bx_parallel_c::parport_file_param_handler(bx_param_string_c *param, int set, +const char* bx_parallel_c::parport_file_param_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen) { diff --git a/bochs/iodev/parallel.h b/bochs/iodev/parallel.h index 6747806fc..c1a45c16a 100644 --- a/bochs/iodev/parallel.h +++ b/bochs/iodev/parallel.h @@ -78,7 +78,7 @@ private: Bit32u read(Bit32u address, unsigned io_len); void write(Bit32u address, Bit32u value, unsigned io_len); #endif - static const char* parport_file_param_handler(bx_param_string_c *param, int set, + static const char* parport_file_param_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen); }; diff --git a/bochs/iodev/serial.cc b/bochs/iodev/serial.cc index 6114fd416..307698a99 100644 --- a/bochs/iodev/serial.cc +++ b/bochs/iodev/serial.cc @@ -1771,7 +1771,7 @@ void bx_serial_c::update_mouse_data() BX_SER_THIS mouse_update = 0; } -const char* bx_serial_c::serial_file_param_handler(bx_param_string_c *param, int set, +const char* bx_serial_c::serial_file_param_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen) { diff --git a/bochs/iodev/serial.h b/bochs/iodev/serial.h index d7ad5cb11..fcec9134f 100644 --- a/bochs/iodev/serial.h +++ b/bochs/iodev/serial.h @@ -250,7 +250,7 @@ private: Bit32u read(Bit32u address, unsigned io_len); void write(Bit32u address, Bit32u value, unsigned io_len); #endif - static const char* serial_file_param_handler(bx_param_string_c *param, int set, + static const char* serial_file_param_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen); }; diff --git a/bochs/iodev/sound/es1370.cc b/bochs/iodev/sound/es1370.cc index 29b99e3ba..d57b2c0ec 100644 --- a/bochs/iodev/sound/es1370.cc +++ b/bochs/iodev/sound/es1370.cc @@ -1117,7 +1117,7 @@ void bx_es1370_c::pci_write_handler(Bit8u address, Bit32u value, unsigned io_len } // runtime parameter handlers -Bit64s bx_es1370_c::es1370_param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s bx_es1370_c::es1370_param_handler(bx_param_c *param, bool set, Bit64s val) { if (set) { const char *pname = param->get_name(); @@ -1136,7 +1136,7 @@ Bit64s bx_es1370_c::es1370_param_handler(bx_param_c *param, int set, Bit64s val) return val; } -const char* bx_es1370_c::es1370_param_string_handler(bx_param_string_c *param, int set, +const char* bx_es1370_c::es1370_param_string_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen) { diff --git a/bochs/iodev/sound/es1370.h b/bochs/iodev/sound/es1370.h index e8a4e3a9e..a07d4d7ea 100644 --- a/bochs/iodev/sound/es1370.h +++ b/bochs/iodev/sound/es1370.h @@ -94,8 +94,8 @@ public: virtual void pci_write_handler(Bit8u address, Bit32u value, unsigned io_len); // runtime options - static Bit64s es1370_param_handler(bx_param_c *param, int set, Bit64s val); - static const char* es1370_param_string_handler(bx_param_string_c *param, int set, + static Bit64s es1370_param_handler(bx_param_c *param, bool set, Bit64s val); + static const char* es1370_param_string_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen); static void runtime_config_handler(void *); diff --git a/bochs/iodev/sound/sb16.cc b/bochs/iodev/sound/sb16.cc index 172a05afe..7334a34e0 100644 --- a/bochs/iodev/sound/sb16.cc +++ b/bochs/iodev/sound/sb16.cc @@ -3158,7 +3158,7 @@ int bx_sb16_buffer::commandbytes(void) } // runtime parameter handlers -Bit64s bx_sb16_c::sb16_param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s bx_sb16_c::sb16_param_handler(bx_param_c *param, bool set, Bit64s val) { if (set) { const char *pname = param->get_name(); @@ -3181,7 +3181,7 @@ Bit64s bx_sb16_c::sb16_param_handler(bx_param_c *param, int set, Bit64s val) return val; } -const char* bx_sb16_c::sb16_param_string_handler(bx_param_string_c *param, int set, +const char* bx_sb16_c::sb16_param_string_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen) { diff --git a/bochs/iodev/sound/sb16.h b/bochs/iodev/sound/sb16.h index 3ea4b4baf..4a1c08c7b 100644 --- a/bochs/iodev/sound/sb16.h +++ b/bochs/iodev/sound/sb16.h @@ -137,8 +137,8 @@ public: /* Make writelog available to output functions */ BX_SB16_SMF void writelog(int loglev, const char *str, ...); // runtime options - static Bit64s sb16_param_handler(bx_param_c *param, int set, Bit64s val); - static const char* sb16_param_string_handler(bx_param_string_c *param, int set, + static Bit64s sb16_param_handler(bx_param_c *param, bool set, Bit64s val); + static const char* sb16_param_string_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen); static void runtime_config_handler(void *); diff --git a/bochs/iodev/usb/usb_ehci.cc b/bochs/iodev/usb/usb_ehci.cc index 0ea6fe6ae..10bbb9f10 100644 --- a/bochs/iodev/usb/usb_ehci.cc +++ b/bochs/iodev/usb/usb_ehci.cc @@ -2273,7 +2273,7 @@ void bx_usb_ehci_c::pci_write_handler(Bit8u address, Bit32u value, unsigned io_l } // USB runtime parameter handler -Bit64s bx_usb_ehci_c::usb_param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s bx_usb_ehci_c::usb_param_handler(bx_param_c *param, bool set, Bit64s val) { int portnum; diff --git a/bochs/iodev/usb/usb_ehci.h b/bochs/iodev/usb/usb_ehci.h index 820e9091b..0582dc89d 100644 --- a/bochs/iodev/usb/usb_ehci.h +++ b/bochs/iodev/usb/usb_ehci.h @@ -334,7 +334,7 @@ public: void event_handler(int event, USBPacket *packet, int port); - static Bit64s usb_param_handler(bx_param_c *param, int set, Bit64s val); + static Bit64s usb_param_handler(bx_param_c *param, bool set, Bit64s val); private: bx_uhci_core_c *uhci[3]; diff --git a/bochs/iodev/usb/usb_floppy.cc b/bochs/iodev/usb/usb_floppy.cc index ad3218919..1253a47d8 100644 --- a/bochs/iodev/usb/usb_floppy.cc +++ b/bochs/iodev/usb/usb_floppy.cc @@ -1254,7 +1254,7 @@ void usb_floppy_device_c::runtime_config(void) #define LOG_THIS floppy-> // USB floppy runtime parameter handlers -const char *usb_floppy_device_c::floppy_path_handler(bx_param_string_c *param, int set, +const char *usb_floppy_device_c::floppy_path_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen) { usb_floppy_device_c *floppy; @@ -1273,7 +1273,7 @@ const char *usb_floppy_device_c::floppy_path_handler(bx_param_string_c *param, i return val; } -Bit64s usb_floppy_device_c::floppy_param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s usb_floppy_device_c::floppy_param_handler(bx_param_c *param, bool set, Bit64s val) { usb_floppy_device_c *floppy; diff --git a/bochs/iodev/usb/usb_floppy.h b/bochs/iodev/usb/usb_floppy.h index fee35ff71..2a5711e2f 100644 --- a/bochs/iodev/usb/usb_floppy.h +++ b/bochs/iodev/usb/usb_floppy.h @@ -107,9 +107,9 @@ private: void copy_data(USBPacket *p); bool set_inserted(bool value); - static const char *floppy_path_handler(bx_param_string_c *param, int set, + static const char *floppy_path_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen); - static Bit64s floppy_param_handler(bx_param_c *param, int set, Bit64s val); + static Bit64s floppy_param_handler(bx_param_c *param, bool set, Bit64s val); static Bit64s param_save_handler(void *devptr, bx_param_c *param); static void param_restore_handler(void *devptr, bx_param_c *param, Bit64s val); diff --git a/bochs/iodev/usb/usb_hub.cc b/bochs/iodev/usb/usb_hub.cc index 668a4c71e..aa2b66caa 100644 --- a/bochs/iodev/usb/usb_hub.cc +++ b/bochs/iodev/usb/usb_hub.cc @@ -695,7 +695,7 @@ void usb_hub_device_c::runtime_config() #define LOG_THIS hub-> // USB hub runtime parameter handler -Bit64s usb_hub_device_c::hub_param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s usb_hub_device_c::hub_param_handler(bx_param_c *param, bool set, Bit64s val) { int portnum; usb_hub_device_c *hub; diff --git a/bochs/iodev/usb/usb_hub.h b/bochs/iodev/usb/usb_hub.h index ad77317da..c586a177e 100644 --- a/bochs/iodev/usb/usb_hub.h +++ b/bochs/iodev/usb/usb_hub.h @@ -75,7 +75,7 @@ private: void remove_device(Bit8u port); bool usb_set_connect_status(Bit8u port, bool connected); - static Bit64s hub_param_handler(bx_param_c *param, int set, Bit64s val); + static Bit64s hub_param_handler(bx_param_c *param, bool set, Bit64s val); }; #endif diff --git a/bochs/iodev/usb/usb_msd.cc b/bochs/iodev/usb/usb_msd.cc index 9882aabd3..ad99fb0ac 100644 --- a/bochs/iodev/usb/usb_msd.cc +++ b/bochs/iodev/usb/usb_msd.cc @@ -986,7 +986,7 @@ void usb_msd_device_c::runtime_config(void) #define LOG_THIS cdrom-> // USB cdrom runtime parameter handlers -const char *usb_msd_device_c::cdrom_path_handler(bx_param_string_c *param, int set, +const char *usb_msd_device_c::cdrom_path_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen) { usb_msd_device_c *cdrom; @@ -1010,7 +1010,7 @@ const char *usb_msd_device_c::cdrom_path_handler(bx_param_string_c *param, int s return val; } -Bit64s usb_msd_device_c::cdrom_status_handler(bx_param_c *param, int set, Bit64s val) +Bit64s usb_msd_device_c::cdrom_status_handler(bx_param_c *param, bool set, Bit64s val) { usb_msd_device_c *cdrom; diff --git a/bochs/iodev/usb/usb_msd.h b/bochs/iodev/usb/usb_msd.h index e0da34b6f..c0c2701b8 100644 --- a/bochs/iodev/usb/usb_msd.h +++ b/bochs/iodev/usb/usb_msd.h @@ -86,9 +86,9 @@ private: USBPacket *packet; } s; - static const char *cdrom_path_handler(bx_param_string_c *param, int set, - const char *oldval, const char *val, int maxlen); - static Bit64s cdrom_status_handler(bx_param_c *param, int set, Bit64s val); + static const char *cdrom_path_handler(bx_param_string_c *param, bool set, + const char *oldval, const char *val, int maxlen); + static Bit64s cdrom_status_handler(bx_param_c *param, bool set, Bit64s val); }; #endif diff --git a/bochs/iodev/usb/usb_ohci.cc b/bochs/iodev/usb/usb_ohci.cc index a059747d2..fb24eb93a 100644 --- a/bochs/iodev/usb/usb_ohci.cc +++ b/bochs/iodev/usb/usb_ohci.cc @@ -1496,7 +1496,7 @@ bool bx_usb_ohci_c::usb_set_connect_status(Bit8u port, bool connected) } // USB runtime parameter handler -Bit64s bx_usb_ohci_c::usb_param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s bx_usb_ohci_c::usb_param_handler(bx_param_c *param, bool set, Bit64s val) { if (set) { int portnum = atoi((param->get_parent())->get_name()+4) - 1; diff --git a/bochs/iodev/usb/usb_ohci.h b/bochs/iodev/usb/usb_ohci.h index 13b9a47e6..75a66ac55 100644 --- a/bochs/iodev/usb/usb_ohci.h +++ b/bochs/iodev/usb/usb_ohci.h @@ -261,7 +261,7 @@ public: void event_handler(int event, USBPacket *packet, int port); - static Bit64s usb_param_handler(bx_param_c *param, int set, Bit64s val); + static Bit64s usb_param_handler(bx_param_c *param, bool set, Bit64s val); private: diff --git a/bochs/iodev/usb/usb_printer.cc b/bochs/iodev/usb/usb_printer.cc index a90073bc5..d1ccb8028 100644 --- a/bochs/iodev/usb/usb_printer.cc +++ b/bochs/iodev/usb/usb_printer.cc @@ -322,7 +322,7 @@ fail: #define LOG_THIS printer-> // USB printer runtime parameter handlers -const char *usb_printer_device_c::printfile_handler(bx_param_string_c *param, int set, +const char *usb_printer_device_c::printfile_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen) { diff --git a/bochs/iodev/usb/usb_printer.h b/bochs/iodev/usb/usb_printer.h index 9c910a8b6..3a12bc7ca 100644 --- a/bochs/iodev/usb/usb_printer.h +++ b/bochs/iodev/usb/usb_printer.h @@ -46,7 +46,7 @@ private: char info_txt[BX_PATHNAME_LEN + 20]; } s; - static const char* printfile_handler(bx_param_string_c *param, int set, + static const char* printfile_handler(bx_param_string_c *param, bool set, const char *oldval, const char *val, int maxlen); }; diff --git a/bochs/iodev/usb/usb_uhci.cc b/bochs/iodev/usb/usb_uhci.cc index 19f7aec9d..dc46d1c4e 100644 --- a/bochs/iodev/usb/usb_uhci.cc +++ b/bochs/iodev/usb/usb_uhci.cc @@ -248,7 +248,7 @@ void bx_usb_uhci_c::runtime_config(void) } // USB runtime parameter handler -Bit64s bx_usb_uhci_c::usb_param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s bx_usb_uhci_c::usb_param_handler(bx_param_c *param, bool set, Bit64s val) { int portnum; diff --git a/bochs/iodev/usb/usb_uhci.h b/bochs/iodev/usb/usb_uhci.h index 18d15be7b..c50a47c56 100644 --- a/bochs/iodev/usb/usb_uhci.h +++ b/bochs/iodev/usb/usb_uhci.h @@ -39,7 +39,7 @@ public: virtual void register_state(void); virtual void after_restore_state(void); - static Bit64s usb_param_handler(bx_param_c *param, int set, Bit64s val); + static Bit64s usb_param_handler(bx_param_c *param, bool set, Bit64s val); private: Bit8u device_change; diff --git a/bochs/iodev/usb/usb_xhci.cc b/bochs/iodev/usb/usb_xhci.cc index 45942ebf5..5f554d229 100644 --- a/bochs/iodev/usb/usb_xhci.cc +++ b/bochs/iodev/usb/usb_xhci.cc @@ -3196,7 +3196,7 @@ bool bx_usb_xhci_c::usb_set_connect_status(Bit8u port, bool connected) } // USB runtime parameter handler -Bit64s bx_usb_xhci_c::usb_param_handler(bx_param_c *param, int set, Bit64s val) +Bit64s bx_usb_xhci_c::usb_param_handler(bx_param_c *param, bool set, Bit64s val) { int portnum; diff --git a/bochs/iodev/usb/usb_xhci.h b/bochs/iodev/usb/usb_xhci.h index 65916a02b..79025e69a 100644 --- a/bochs/iodev/usb/usb_xhci.h +++ b/bochs/iodev/usb/usb_xhci.h @@ -545,7 +545,7 @@ public: void event_handler(int event, USBPacket *packet, int port); - static Bit64s usb_param_handler(bx_param_c *param, int set, Bit64s val); + static Bit64s usb_param_handler(bx_param_c *param, bool set, Bit64s val); private: bx_usb_xhci_t hub;