Correct and standardize header guards in all header files
PATCH 1/1 Correct and standardize header guards in all header files
As per ISO/IEC 9899, Section 7.1.3 on reserved identifiers, identifiers starting with an underscore are reserved.
Therefore:
1) Rename all incorrect header guards
While I'm at it:
2) Standardize header guards to "#ifndef SOMETHING_H"
3) Repeat the header guard identifier after the closing "#endif"
--- a.out.h | 6 +++--- acl.h | 6 +++--- aes.h | 2 +- arch_init.h | 2 +- audio/audio.h | 2 +- audio/audio_int.h | 2 +- audio/audio_pt_int.h | 2 +- audio/mixeng.h | 2 +- balloon.h | 6 +++--- bitops.h | 2 +- block.h | 2 +- block/qcow2.h | 2 +- block/rbd_types.h | 2 +- blockdev.h | 2 +- bsd-user/qemu-types.h | 4 +++- bt-host.h | 2 +- buffered_file.h | 2 +- cmd.h | 6 +++--- compatfd.h | 2 +- console.h | 2 +- cpu-common.h | 4 ++-- cpu-defs.h | 2 +- cpus.h | 2 +- darwin-user/qemu.h | 2 +- def-helper.h | 4 ++-- device_tree.h | 6 +++--- disas.h | 6 +++--- dma.h | 2 +- dyngen-exec.h | 6 +++--- elf.h | 6 +++--- exec-all.h | 6 +++--- fsdev/file-op-9p.h | 6 +++--- fsdev/qemu-fsdev.h | 4 +++- gdbstub.h | 2 +- hpet.h | 6 +++--- hw/9p.h | 2 +- hw/9pfs/virtio-9p-debug.h | 6 +++--- hw/9pfs/virtio-9p-xattr.h | 6 +++--- hw/9pfs/virtio-9p.h | 6 +++--- hw/apb_pci.h | 2 +- hw/apic.h | 2 +- hw/bitbang_i2c.h | 2 +- hw/boards.h | 2 +- hw/dec_pci.h | 2 +- hw/devices.h | 2 +- hw/e1000_hw.h | 6 +++--- hw/esp.h | 2 +- hw/event_notifier.h | 2 +- hw/fdc.h | 2 +- hw/fmopl.h | 6 +++--- hw/framebuffer.h | 2 +- hw/fw_cfg.h | 2 +- hw/grlib.h | 6 +++--- hw/gusemu.h | 2 +- hw/gustate.h | 2 +- hw/hpet_emul.h | 3 ++- hw/hw.h | 3 ++- hw/i2c.h | 2 +- hw/ide/pci.h | 3 ++- hw/intel-hda-defs.h | 2 +- hw/intel-hda.h | 2 +- hw/irq.h | 2 +- hw/isa.h | 2 +- hw/loader.h | 2 +- hw/mcf.h | 2 +- hw/mips.h | 2 +- hw/mips_cpudevs.h | 2 +- hw/msix.h | 2 +- hw/multiboot.h | 2 +- hw/omap.h | 6 +++--- hw/openpic.h | 6 +++--- hw/pc.h | 2 +- hw/pci.h | 2 +- hw/ppc-viosrp.h | 2 +- hw/ppc440.h | 2 +- hw/ppc_mac.h | 6 +++--- hw/prep_pci.h | 2 +- hw/primecell.h | 2 +- hw/qdev.h | 2 +- hw/scsi.h | 2 +- hw/sd.h | 6 +++--- hw/sh.h | 2 +- hw/sh7750_regnames.h | 6 +++--- hw/sh7750_regs.h | 6 +++--- hw/sh_intc.h | 6 +++--- hw/sharpsl.h | 2 +- hw/spapr.h | 6 +++--- hw/spapr_vio.h | 6 +++--- hw/sparc32_dma.h | 2 +- hw/ssi.h | 2 +- hw/strongarm.h | 6 +++--- hw/sun4m.h | 2 +- hw/syborg.h | 6 +++--- hw/usb-ohci.h | 3 +-- hw/usb-uhci.h | 2 +- hw/vhost.h | 2 +- hw/vhost_net.h | 2 +- hw/virtio-balloon.h | 6 +++--- hw/virtio-blk.h | 6 +++--- hw/virtio-net.h | 6 +++--- hw/virtio-serial.h | 6 +++--- hw/virtio.h | 6 +++--- hw/vmware_vga.h | 2 +- hw/vt82c686.h | 2 +- hw/xen_blkif.h | 6 +++--- hw/xics.h | 6 +++--- iorange.h | 2 +- json-lexer.h | 2 +- json-parser.h | 2 +- json-streamer.h | 2 +- kvm.h | 3 ++- libcacard/cac.h | 6 ++++-- libcacard/card_7816.h | 4 ++-- libcacard/card_7816t.h | 4 ++-- libcacard/eventt.h | 5 ++--- libcacard/vcard.h | 4 ++-- libcacard/vcard_emul.h | 5 +++-- libcacard/vcard_emul_type.h | 4 ++-- libcacard/vcardt.h | 4 ++-- libcacard/vevent.h | 6 +++--- libcacard/vreader.h | 4 ++-- libcacard/vreadert.h | 5 ++--- libfdt_env.h | 6 +++--- linux-user/arm/nwfpe/fpa11.h | 6 +++--- linux-user/arm/nwfpe/fpopcode.h | 6 +++--- linux-user/arm/nwfpe/fpsr.h | 6 +++--- linux-user/linux_loop.h | 6 +++--- linux-user/qemu-types.h | 4 +++- linux-user/unicore32/syscall.h | 6 +++--- migration.h | 2 +- module.h | 2 +- nbd.h | 2 +- net.h | 2 +- notify.h | 2 +- osdep.h | 2 +- pflib.h | 6 +++--- poison.h | 3 ++- qemu-aio.h | 2 +- qemu-barrier.h | 6 +++--- qemu-char.h | 3 ++- qemu-common.h | 2 +- qemu-error.h | 2 +- qemu-log.h | 2 +- qemu-option.h | 2 +- qemu-options.h | 6 +++--- qemu-os-posix.h | 3 ++- qemu-os-win32.h | 2 +- qemu-thread-posix.h | 6 +++--- qemu-thread-win32.h | 6 +++--- qemu-thread.h | 6 +++--- qemu-timer.h | 2 +- range.h | 2 +- rwhandler.h | 2 +- slirp/if.h | 6 +++--- slirp/ip.h | 6 +++--- slirp/ip_icmp.h | 6 +++--- slirp/libslirp.h | 6 +++--- slirp/mbuf.h | 6 +++--- slirp/misc.h | 6 +++--- slirp/sbuf.h | 6 +++--- slirp/slirp.h | 6 +++--- slirp/socket.h | 6 +++--- slirp/tcp.h | 6 +++--- slirp/tcp_timer.h | 6 +++--- slirp/tcp_var.h | 6 +++--- slirp/tcpip.h | 6 +++--- slirp/udp.h | 6 +++--- softmmu_defs.h | 2 +- sysemu.h | 3 ++- target-alpha/cpu.h | 6 +++--- target-alpha/exec.h | 6 +++--- target-arm/cpu.h | 2 +- target-cris/cpu.h | 2 +- target-cris/opcode-cris.h | 6 +++--- target-i386/svm.h | 6 +++--- target-lm32/cpu.h | 3 ++- target-m68k/cpu.h | 2 +- target-microblaze/cpu.h | 3 ++- target-mips/cpu.h | 6 +++--- target-mips/exec.h | 6 +++--- target-mips/mips-defs.h | 6 +++--- target-ppc/cpu.h | 6 +++--- target-ppc/exec.h | 6 +++--- target-ppc/helper_regs.h | 6 +++--- target-ppc/kvm_ppc.h | 6 +++--- target-s390x/cpu.h | 2 +- target-sh4/cpu.h | 6 +++--- target-sh4/exec.h | 6 +++--- target-sparc/cpu.h | 2 +- target-sparc/exec.h | 5 +++-- target-unicore32/cpu.h | 6 +++--- target-unicore32/exec.h | 6 +++--- targphys.h | 2 +- tcg/tcg-runtime.h | 2 +- thunk.h | 2 +- uboot_image.h | 6 +++--- ui/keymaps.h | 6 +++--- ui/vnc-auth-sasl.h | 7 +++---- ui/vnc-auth-vencrypt.h | 6 +++--- ui/vnc-enc-zrle.h | 2 +- ui/vnc-enc-zywrle.h | 2 +- ui/vnc-tls.h | 7 +++---- ui/vnc.h | 6 +++--- ui/x_keymap.h | 2 +- 204 files changed, 403 insertions(+), 388 deletions(-)
a.out.h +3 -3
@@ -8,8 +8,8 @@ This software is a copyrighted work licensed under the terms of theCygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ -#ifndef _A_OUT_H_ -#define _A_OUT_H_ +#ifndef A_OUT_H +#define A_OUT_H #ifdef __cplusplus extern "C" {
@@ -427,4 +427,4 @@ typedef struct }#endif -#endif /* _A_OUT_H_ */ +#endif /* A_OUT_H */
acl.h +3 -3
@@ -22,8 +22,8 @@* THE SOFTWARE. */ -#ifndef __QEMU_ACL_H__ -#define __QEMU_ACL_H__ +#ifndef QEMU_ACL_H +#define QEMU_ACL_H #include "qemu-queue.h"
@@ -63,7 +63,7 @@ int qemu_acl_insert(qemu_acl *acl,int qemu_acl_remove (qemu_acl *acl,const char *match); -#endif /* __QEMU_ACL_H__ */ +#endif /* QEMU_ACL_H */ /* * Local variables:
aes.h +1 -1
@@ -23,4 +23,4 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, const unsigned long length, const AES_KEY *key, unsigned char *ivec, const int enc); -#endif +#endif /* QEMU_AES_H */
arch_init.h +1 -1
@@ -31,4 +31,4 @@ int tcg_available(void);int kvm_available (void );int xen_available (void ); -#endif +#endif /* QEMU_ARCH_INIT_H */
audio/audio.h +1 -1
@@ -163,4 +163,4 @@ static inline void *advance (void *p, int incr)int wav_start_capture (CaptureState *s,const char *path,int freq,int bits,int nchannels); -#endif /* audio.h */ +#endif /* QEMU_AUDIO_H */
audio/audio_int.h +1 -1
@@ -279,4 +279,4 @@ static void GCC_ATTR ldebug (const char *fmt, ...)#define AUDIO_FUNC __FILE__ ":" AUDIO_STRINGIFY (__LINE__)#endif -#endif /* audio_int.h */ +#endif /* QEMU_AUDIO_INT_H */
audio/audio_pt_int.h +1 -1
@@ -19,4 +19,4 @@ int audio_pt_wait (struct audio_pt *, const char *);int audio_pt_unlock_and_signal (struct audio_pt *,const char *);int audio_pt_join (struct audio_pt *,void **,const char *); -#endif /* audio_pt_int.h */ +#endif /* QEMU_AUDIO_PT_INT_H */
audio/mixeng.h +1 -1
@@ -48,4 +48,4 @@ void st_rate_stop (void *opaque);void mixeng_clear (struct st_sample *buf,int len);void mixeng_volume (struct st_sample *buf,int len,struct mixeng_volume *vol); -#endif /* mixeng.h */ +#endif /* QEMU_MIXENG_H */
balloon.h +3 -3
@@ -11,8 +11,8 @@* */ -#ifndef _QEMU_BALLOON_H -#define _QEMU_BALLOON_H +#ifndef QEMU_BALLOON_H +#define QEMU_BALLOON_H #include "monitor.h"
@@ -30,4 +30,4 @@ int do_info_balloon(Monitor *mon, MonitorCompletion cb, void *opaque);int do_balloon (Monitor *mon,const QDict *params,MonitorCompletion cb,void *opaque); -#endif +#endif /* QEMU_BALOON_H */
bitops.h +1 -1
@@ -269,4 +269,4 @@ static inline unsigned long hweight_long(unsigned long w) return count; } -#endif +#endif /* BITOPS_H */
block.h +1 -1
@@ -301,4 +301,4 @@ typedef enum {#define BLKDBG_EVENT (bs, evt) bdrv_debug_event(bs, evt)void bdrv_debug_event (BlockDriverState *bs,BlkDebugEvent event); -#endif +#endif /* BLOCK_H */
block/qcow2.h +1 -1
@@ -239,4 +239,4 @@ int qcow2_cache_get_empty(BlockDriverState *bs, Qcow2Cache *c, uint64_t offset, void **table);int qcow2_cache_put (BlockDriverState *bs,Qcow2Cache *c,void **table); -#endif +#endif /* BLOCK_QCOW2_H */
block/rbd_types.h +1 -1
@@ -68,4 +68,4 @@ struct rbd_obj_header_ondisk { } __attribute__((packed)); -#endif +#endif /* CEPH_RBD_TYPES_H */
blockdev.h +1 -1
@@ -66,4 +66,4 @@ int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data);int do_snapshot_blkdev (Monitor *mon,const QDict *qdict,QObject **ret_data);int do_block_resize (Monitor *mon,const QDict *qdict,QObject **ret_data); -#endif +#endif /* BLOCKDEV_H */
bsd-user/qemu-types.h +3 -1
@@ -1,5 +1,6 @@#ifndef QEMU_TYPES_H #define QEMU_TYPES_H +#include "cpu.h" #ifdef TARGET_ABI32
@@ -21,4 +22,5 @@ typedef target_long abi_long;#define TARGET_ABI32 1#endif #endif -#endif + +#endif /* QEMU_TYPES_H */
bt-host.h +1 -1
@@ -6,4 +6,4 @@ struct HCIInfo;/* bt-host.c */ struct HCIInfo *bt_host_hci (const char *id); -#endif +#endif /* BT_HOST_H */
buffered_file.h +1 -1
@@ -27,4 +27,4 @@ QEMUFile *qemu_fopen_ops_buffered(void *opaque, size_t xfer_limit, BufferedWaitForUnfreezeFunc *wait_for_unfreeze, BufferedCloseFunc *close); -#endif +#endif /* QEMU_BUFFERED_FILE_H */
cmd.h +3 -3
@@ -14,8 +14,8 @@* You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef __COMMAND_H__ -#define __COMMAND_H__ +#ifndef COMMAND_H +#define COMMAND_H #define CMD_FLAG_GLOBAL ((int)0x80000000)/* don't iterate "args" */
@@ -76,4 +76,4 @@ void timestr(struct timeval *tv, char *str, size_t sz, int flags);extern char *progname; -#endif /* __COMMAND_H__ */ +#endif /* COMMAND_H */
compatfd.h +1 -1
@@ -40,4 +40,4 @@ struct qemu_signalfd_siginfo {int qemu_signalfd (const sigset_t *mask); -#endif +#endif /* QEMU_COMPATFD_H */
console.h +1 -1
@@ -402,4 +402,4 @@ static inline void do_info_vnc_print(Monitor *mon, const QObject *data)/* curses.c */ void curses_display_init (DisplayState *ds,int full_screen); -#endif +#endif /* CONSOLE_H */
cpu-common.h +2 -2
@@ -1,5 +1,5 @@#ifndef CPU_COMMON_H -#define CPU_COMMON_H 1 +#define CPU_COMMON_H /* CPU interfaces that are target indpendent. */
@@ -159,4 +159,4 @@ void cpu_physical_memory_write_rom(target_phys_addr_t addr,#endif -#endif /* !CPU_COMMON_H */ +#endif /* CPU_COMMON_H */
cpu-defs.h +1 -1
@@ -220,4 +220,4 @@ typedef struct CPUWatchpoint {int kvm_fd; \int kvm_vcpu_dirty; -#endif +#endif /* CPU_DEFS_H */
cpus.h +1 -1
@@ -21,4 +21,4 @@ void set_numa_modes(void);void set_cpu_log (const char *optarg);void list_cpus (FILE *f,fprintf_function cpu_fprintf,const char *optarg); -#endif +#endif /* QEMU_CPUS_H */
darwin-user/qemu.h +1 -1
@@ -175,4 +175,4 @@ static inline uint64_t get_int64_arg(int *i, CPUPPCState *cpu_env) }#endif -#endif +#endif /* GEMU_H */
def-helper.h +2 -2
@@ -16,7 +16,7 @@*/ #ifndef DEF_HELPER_H -#define DEF_HELPER_H 1 +#define DEF_HELPER_H #define HELPER (name) glue(helper_, name)
@@ -237,4 +237,4 @@ DEF_HELPER_FLAGS_0(name, flags, ret)#undef DEF_HELPER_FLAGS_4#undef GEN_HELPER -#endif +#endif /* DEF_HELPER_H */
device_tree.h +3 -3
@@ -11,8 +11,8 @@* */ -#ifndef __DEVICE_TREE_H__ -#define __DEVICE_TREE_H__ +#ifndef DEVICE_TREE_H +#define DEVICE_TREE_H void *load_device_tree (const char *filename_path,int *sizep);
@@ -23,4 +23,4 @@ int qemu_devtree_setprop_cell(void *fdt, const char *node_path,int qemu_devtree_setprop_string (void *fdt,const char *node_path,const char *property,const char *string); -#endif /* __DEVICE_TREE_H__ */ +#endif /* DEVICE_TREE_H */
disas.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _QEMU_DISAS_H -#define _QEMU_DISAS_H +#ifndef QEMU_DISAS_H +#define QEMU_DISAS_H #include "qemu-common.h"
@@ -39,4 +39,4 @@ struct syminfo {/* Filled in by elfload.c. Simplistic, but will do for now. */ extern struct syminfo *syminfos; -#endif /* _QEMU_DISAS_H */ +#endif /* QEMU_DISAS_H */
dma.h +1 -1
@@ -38,4 +38,4 @@ BlockDriverAIOCB *dma_bdrv_read(BlockDriverState *bs,BlockDriverAIOCB *dma_bdrv_write (BlockDriverState *bs,QEMUSGList *sg,uint64_t sector,BlockDriverCompletionFunc *cb,void *opaque); -#endif +#endif /* DMA_H */
dyngen-exec.h +3 -3
@@ -16,8 +16,8 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#if !defined(__DYNGEN_EXEC_H__) -#define __DYNGEN_EXEC_H__ +#ifndef DYNGEN_EXEC_H +#define DYNGEN_EXEC_H #include "qemu-common.h"
@@ -81,4 +81,4 @@ typedef void * host_reg_t;# define GETPC () ((void *)((unsigned long)__builtin_return_address(0) - 1))#endif -#endif /* !defined(__DYNGEN_EXEC_H__) */ +#endif /* DYNGEN_EXEC_H */
elf.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _QEMU_ELF_H -#define _QEMU_ELF_H +#ifndef QEMU_ELF_H +#define QEMU_ELF_H #include <inttypes.h>
@@ -1259,4 +1259,4 @@ struct elf32_fdpic_loadmap {#endif /* ELF_CLASS */ -#endif /* _QEMU_ELF_H */ +#endif /* QEMU_ELF_H */
exec-all.h +3 -3
@@ -17,8 +17,8 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _EXEC_ALL_H_ -#define _EXEC_ALL_H_ +#ifndef EXEC_ALL_H +#define EXEC_ALL_H #include "qemu-common.h"
@@ -347,4 +347,4 @@ extern int singlestep;/* cpu-exec.c */ extern volatile sig_atomic_t exit_request; -#endif +#endif /* EXEC_ALL_H */
fsdev/file-op-9p.h +3 -3
@@ -10,8 +10,8 @@* the COPYING file in the top-level directory. * */ -#ifndef _FILEOP_H -#define _FILEOP_H +#ifndef FILEOP_H +#define FILEOP_H #include <sys/types.h> #include <dirent.h> #include <sys/time.h>
@@ -104,4 +104,4 @@ static inline const char *rpath(FsContext *ctx, const char *path)snprintf (buffer,sizeof (buffer),"%s/%s" , ctx->fs_root, path); return buffer; } -#endif +#endif /* FILEOP_H */
fsdev/qemu-fsdev.h +3 -1
@@ -12,6 +12,7 @@*/ #ifndef QEMU_FSDEV_H #define QEMU_FSDEV_H +#include "qemu-option.h" #include "file-op-9p.h"
@@ -52,4 +53,5 @@ typedef struct FsTypeListEntry {int qemu_fsdev_add (QemuOpts *opts);FsTypeEntry *get_fsdev_fsentry (char *id);extern FileOperations local_ops; -#endif + +#endif /* QEMU_FSDEV_H */
gdbstub.h +1 -1
@@ -41,4 +41,4 @@ int gdbserver_start(const char *port);/* in gdbstub-xml.c, generated by scripts/feature_to_c.sh */ extern const char *const xml_builtin[][2 ]; -#endif +#endif /* GDBSTUB_H */
hpet.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __HPET__ -#define __HPET__ 1 +#ifndef HPET_H +#define HPET_H
@@ -19,4 +19,4 @@ struct hpet_info {#define HPET_DPI _IO('h', 0x05)/* disable periodic */ #define HPET_IRQFREQ _IOW('h', 0x6, unsigned long)/* IRQFREQ usec */ -#endif /* !__HPET__ */ +#endif /* HPET_H */
hw/9p.h +1 -1
@@ -21,4 +21,4 @@ typedef struct V9fsConf char *fsdev_id; } V9fsConf; -#endif +#endif /* QEMU_9P_H */
hw/9pfs/virtio-9p-debug.h +3 -3
@@ -1,6 +1,6 @@ -#ifndef _QEMU_VIRTIO_9P_DEBUG_H -#define _QEMU_VIRTIO_9P_DEBUG_H +#ifndef QEMU_VIRTIO_9P_DEBUG_H +#define QEMU_VIRTIO_9P_DEBUG_H void pprint_pdu (V9fsPDU *pdu); -#endif +#endif /* QEMU_VIRTIO_9P_DEBUG_H */
hw/9pfs/virtio-9p-xattr.h +3 -3
@@ -10,8 +10,8 @@* the COPYING file in the top-level directory. * */ -#ifndef _QEMU_VIRTIO_9P_XATTR_H -#define _QEMU_VIRTIO_9P_XATTR_H +#ifndef QEMU_VIRTIO_9P_XATTR_H +#define QEMU_VIRTIO_9P_XATTR_H #include <attr/xattr.h>
@@ -99,4 +99,4 @@ static inline int notsup_removexattr(FsContext *ctx, return -1; } -#endif +#endif /* QEMU_VIRTIO_9P_XATTR_H */
hw/9pfs/virtio-9p.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _QEMU_VIRTIO_9P_H -#define _QEMU_VIRTIO_9P_H +#ifndef QEMU_VIRTIO_9P_H +#define QEMU_VIRTIO_9P_H #include <sys/types.h> #include <dirent.h>
@@ -504,4 +504,4 @@ static inline size_t do_pdu_unpack(void *dst, struct iovec *sg, int sg_count, return pdu_packunpack(dst, sg, sg_count, offset, size, 0); } -#endif +#endif /* QEMU_VIRTIO_9P_H */
hw/apb_pci.h +1 -1
@@ -6,4 +6,4 @@PCIBus *pci_apb_init (target_phys_addr_t special_base,target_phys_addr_t mem_base,qemu_irq *pic,PCIBus **bus2,PCIBus **bus3); -#endif +#endif /* APB_PCI_H */
hw/apic.h +1 -1
@@ -24,4 +24,4 @@ void apic_sipi(DeviceState *s);int cpu_is_bsp (CPUState *env);DeviceState *cpu_get_current_apic (void ); -#endif +#endif /* APIC_H */
hw/bitbang_i2c.h +1 -1
@@ -11,4 +11,4 @@ typedef struct bitbang_i2c_interface bitbang_i2c_interface;bitbang_i2c_interface *bitbang_i2c_init (i2c_bus *bus);int bitbang_i2c_set (bitbang_i2c_interface *i2c,int line,int level); -#endif +#endif /* BITBANG_I2C_H */
hw/boards.h +1 -1
@@ -36,4 +36,4 @@ int qemu_register_machine(QEMUMachine *m);extern QEMUMachine *current_machine; -#endif +#endif /* HW_BOARDS_H */
hw/dec_pci.h +1 -1
@@ -5,4 +5,4 @@PCIBus *pci_dec_21154_init (PCIBus *parent_bus,int devfn); -#endif +#endif /* DEC_PCI_H */
hw/devices.h +1 -1
@@ -67,4 +67,4 @@ qemu_irq tc6393xb_l3v_get(TC6393xbState *s);void sm501_init (uint32_t base,uint32_t local_mem_bytes,qemu_irq irq,CharDriverState *chr); -#endif +#endif /* QEMU_DEVICES_H */
hw/e1000_hw.h +3 -3
@@ -29,8 +29,8 @@* Structures, enums, and macros for the MAC */ -#ifndef _E1000_HW_H_ -#define _E1000_HW_H_ +#ifndef E1000_HW_H +#define E1000_HW_H /* PCI Device IDs */
@@ -861,4 +861,4 @@ struct e1000_data_desc {/* For checksumming, the sum of all words in the EEPROM should equal 0xBABA. */ #define EEPROM_SUM 0xBABA -#endif /* _E1000_HW_H_ */ +#endif /* E1000_HW_H */
hw/esp.h +1 -1
@@ -10,4 +10,4 @@ void esp_init(target_phys_addr_t espaddr, int it_shift, void *dma_opaque, qemu_irq irq, qemu_irq *reset, qemu_irq *dma_enable); -#endif +#endif /* QEMU_HW_ESP_H */
hw/event_notifier.h +1 -1
@@ -13,4 +13,4 @@ int event_notifier_get_fd(EventNotifier *);int event_notifier_test_and_clear (EventNotifier *);int event_notifier_test (EventNotifier *); -#endif +#endif /* QEMU_EVENT_NOTIFIER_H */
hw/fdc.h +1 -1
@@ -28,4 +28,4 @@ void fdctrl_init_sysbus(qemu_irq irq, int dma_chann, target_phys_addr_t mmio_base, DriveInfo **fds);void sun4m_fdctrl_init (qemu_irq irq,target_phys_addr_t io_base,DriveInfo **fds,qemu_irq *fdc_tc); -#endif +#endif /* HW_FDC_H */
hw/fmopl.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __FMOPL_H_ -#define __FMOPL_H_ +#ifndef FMOPL_H +#define FMOPL_H /* --- select emulation chips --- */ #define BUILD_YM3812 (HAS_YM3812)
@@ -171,4 +171,4 @@ void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int length);void Y8950UpdateOne (FM_OPL *OPL ,INT16 *buffer,int length); -#endif +#endif /* FMOPL_H */
hw/framebuffer.h +1 -1
@@ -19,4 +19,4 @@ void framebuffer_update_display(int *first_row, int *last_row); -#endif +#endif /* QEMU_FRAMEBUFFER_H */
hw/fw_cfg.h +1 -1
@@ -67,4 +67,4 @@ FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,#endif /* NO_QEMU_PROTOS */ -#endif +#endif /* FW_CFG_H */
hw/grlib.h +3 -3
@@ -22,8 +22,8 @@* THE SOFTWARE. */ -#ifndef _GRLIB_H_ -#define _GRLIB_H_ +#ifndef GRLIB_H +#define GRLIB_H #include "qdev.h" #include "sysbus.h"
@@ -123,4 +123,4 @@ DeviceState *grlib_apbuart_create(target_phys_addr_t base, return dev; } -#endif /* ! _GRLIB_H_ */ +#endif /* GRLIB_H */
hw/gusemu.h +1 -1
@@ -102,4 +102,4 @@ void gus_irqgen(GUSEmuState *state, unsigned int elapsed_time);/* lower values won´t provide any benefit at all, higher values can cause audible timing delays */ /* note: masked timers are also calculated by this function, thus it might be needed even without any IRQs in use! */ -#endif /* gusemu.h */ +#endif /* GUSEMU_H */
hw/gustate.h +1 -1
@@ -129,4 +129,4 @@#define gusdataend (VSRegsEnd+4) -#endif /* gustate.h */ +#endif /* GUSTATE_H */
hw/hpet_emul.h +2 -1
@@ -68,4 +68,5 @@ struct hpet_fw_config } __attribute__ ((packed));extern struct hpet_fw_config hpet_cfg; -#endif + +#endif /* QEMU_HPET_EMUL_H */
hw/hw.h +2 -1
@@ -919,4 +919,5 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id, int required_for_version);void vmstate_unregister (DeviceState *dev,const VMStateDescription *vmsd,void *opaque); -#endif + +#endif /* QEMU_HW_H */
hw/i2c.h +1 -1
@@ -74,4 +74,4 @@ void tmp105_set(i2c_slave *i2c, int temp);/* lm832x.c */ void lm832x_key_event (i2c_slave *i2c,int key,int state); -#endif +#endif /* QEMU_I2C_H */
hw/ide/pci.h +2 -1
@@ -45,4 +45,5 @@ extern const IORangeOps bmdma_addr_ioport_ops;void pci_ide_create_devs (PCIDevice *dev,DriveInfo **hd_table);extern const VMStateDescription vmstate_ide_pci; -#endif + +#endif /* HW_IDE_PCI_H */
hw/intel-hda-defs.h +1 -1
@@ -714,4 +714,4 @@ enum {/* --------------------------------------------------------------------- */ -#endif +#endif /* HW_INTEL_HDA_DEFS_H */
hw/intel-hda.h +1 -1
@@ -59,4 +59,4 @@ bool hda_codec_xfer(HDACodecDevice *dev, uint32_t stnr, bool output,/* --------------------------------------------------------------------- */ -#endif +#endif /* HW_INTEL_HDA_H */
hw/irq.h +1 -1
@@ -33,4 +33,4 @@ qemu_irq qemu_irq_invert(qemu_irq irq);/* Returns a new IRQ which feeds into both the passed IRQs */ qemu_irq qemu_irq_split (qemu_irq irq1,qemu_irq irq2); -#endif +#endif /* QEMU_IRQ_H */
hw/isa.h +1 -1
@@ -50,4 +50,4 @@ void DMA_init(int high_page_enable, qemu_irq *cpu_request_exit);void DMA_register_channel (int nchan,DMA_transfer_handler transfer_handler,void *opaque); -#endif +#endif /* HW_ISA_H */
hw/loader.h +1 -1
@@ -45,4 +45,4 @@ void do_info_roms(Monitor *mon);int rom_add_vga (const char *file);int rom_add_option (const char *file,int32_t bootindex); -#endif +#endif /* LOADER_H */
hw/mcf.h +1 -1
@@ -18,4 +18,4 @@ void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq);/* mcf5206.c */ qemu_irq *mcf5206_init (uint32_t base,CPUState *env); -#endif +#endif /* HW_MCF_H */
hw/mips.h +1 -1
@@ -37,4 +37,4 @@ void dp83932_init(NICInfo *nd, target_phys_addr_t base, int it_shift, qemu_irq irq, void* mem_opaque, void (*memory_rw)(void *opaque, target_phys_addr_t addr, uint8_t *buf, int len, int is_write)); -#endif +#endif /* HW_MIPS_H */
hw/mips_cpudevs.h +1 -1
@@ -12,4 +12,4 @@ void cpu_mips_irq_init_cpu(CPUState *env);/* mips_timer.c */ void cpu_mips_clock_init (CPUState *); -#endif +#endif /* HW_MIPS_CPUDEVS_H */
hw/msix.h +1 -1
@@ -33,4 +33,4 @@ void msix_reset(PCIDevice *dev);extern int msix_supported; -#endif +#endif /* QEMU_MSIX_H */
hw/multiboot.h +1 -1
@@ -9,4 +9,4 @@ int load_multiboot(void *fw_cfg,int kernel_file_size, uint8_t *header); -#endif +#endif /* QEMU_MULTIBOOT_H */
hw/omap.h +3 -3
@@ -16,8 +16,8 @@* You should have received a copy of the GNU General Public License along * with this program; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef hw_omap_h -# define hw_omap_h "omap.h" +#ifndef HW_OMAP_H +#define HW_OMAP_H # define OMAP_EMIFS_BASE 0x00000000# define OMAP2_Q0_BASE 0x00000000
@@ -1138,4 +1138,4 @@ inline static int debug_register_io_memory(CPUReadMemoryFunc * const *mem_read,/* Define when we want to reduce the number of IO regions registered. */ /*# define L4_MUX_HACK*/ -#endif /* hw_omap_h */ +#endif /* HW_OMAP_H */
hw/openpic.h +3 -3
@@ -1,5 +1,5 @@ -#if !defined(__OPENPIC_H__) -#define __OPENPIC_H__ +#ifndef OPENPIC_H +#define OPENPIC_H /* OpenPIC have 5 outputs per CPU connected and one IRQ out single output */ enum {
@@ -15,4 +15,4 @@ qemu_irq *openpic_init (PCIBus *bus, int *pmem_index, int nb_cpus, qemu_irq **irqs, qemu_irq irq_out);qemu_irq *mpic_init (target_phys_addr_t base,int nb_cpus,qemu_irq **irqs,qemu_irq irq_out); -#endif /* __OPENPIC_H__ */ +#endif /* OPENPIC_H */
hw/pc.h +1 -1
@@ -239,4 +239,4 @@ static inline bool isa_ne2000_init(int base, int irq, NICInfo *nd)int e820_add_entry (uint64_t ,uint64_t ,uint32_t ); -#endif +#endif /* HW_PC_H */
hw/pci.h +1 -1
@@ -475,4 +475,4 @@ static inline uint32_t pci_config_size(const PCIDevice *d) return pci_is_express(d) ? PCIE_CONFIG_SPACE_SIZE : PCI_CONFIG_SPACE_SIZE; } -#endif +#endif /* QEMU_PCI_H */
hw/ppc-viosrp.h +1 -1
@@ -213,4 +213,4 @@ struct mad_adapter_info_data { uint32_t port_max_txu[8]; /* per-port maximum transfer */ }; -#endif +#endif /* PPC_VIOSRP_H */
hw/ppc440.h +1 -1
@@ -18,4 +18,4 @@ CPUState *ppc440ep_init(ram_addr_t *ram_size, PCIBus **pcip, const unsigned int pci_irq_nrs[4], int do_init, const char *cpu_model); -#endif +#endif /* QEMU_PPC440_H */
hw/ppc_mac.h +3 -3
@@ -22,8 +22,8 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#if !defined(__PPC_MAC_H__) -#define __PPC_MAC_H__ +#ifndef PPC_MAC_H +#define PPC_MAC_H /* SMP is not enabled, for now */ #define MAX_CPUS 1
@@ -110,4 +110,4 @@ void adb_mouse_init(ADBBusState *bus);extern ADBBusState adb_bus; -#endif /* !defined(__PPC_MAC_H__) */ +#endif /* PPC_MAC_H */
hw/prep_pci.h +1 -1
@@ -5,4 +5,4 @@PCIBus *pci_prep_init (qemu_irq *pic); -#endif +#endif /* QEMU_PREP_PCI_H */
hw/primecell.h +1 -1
@@ -15,4 +15,4 @@ void arm_sysctl_init(uint32_t base, uint32_t sys_id, uint32_t proc_id);#define ARM_SYSCTL_GPIO_MMC_WPROT 0#define ARM_SYSCTL_GPIO_MMC_CARDIN 1 -#endif +#endif /* PRIMECELL_H */
hw/qdev.h +1 -1
@@ -326,4 +326,4 @@ char *qdev_get_fw_dev_path(DeviceState *dev);/* This is a nasty hack to allow passing a NULL bus to qdev_create. */ extern struct BusInfo system_bus_info; -#endif +#endif /* QDEV_H */
hw/scsi.h +1 -1
@@ -156,4 +156,4 @@ void scsi_req_abort(SCSIRequest *req, int status);void scsi_req_cancel (SCSIRequest *req);void scsi_device_purge_requests (SCSIDevice *sdev); -#endif +#endif /* QEMU_HW_SCSI_H */
hw/sd.h +3 -3
@@ -26,8 +26,8 @@* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __hw_sd_h -#define __hw_sd_h 1 +#ifndef HW_SD_H +#define HW_SD_H #define OUT_OF_RANGE (1 << 31)#define ADDRESS_ERROR (1 << 30)
@@ -76,4 +76,4 @@ void sd_set_cb(SDState *sd, qemu_irq readonly, qemu_irq insert);int sd_data_ready (SDState *sd);void sd_enable (SDState *sd,int enable); -#endif /* __hw_sd_h */ +#endif /* HW_SD_H */
hw/sh.h +1 -1
@@ -51,4 +51,4 @@ qemu_irq sh7750_irl(struct SH7750State *s);/* tc58128.c */ int tc58128_init (struct SH7750State *s,const char *zone1,const char *zone2); -#endif +#endif /* QEMU_SH_H */
hw/sh7750_regnames.h +3 -3
@@ -1,6 +1,6 @@ -#ifndef _SH7750_REGNAMES_H -#define _SH7750_REGNAMES_H +#ifndef SH7750_REGNAMES_H +#define SH7750_REGNAMES_H const char *regname (uint32_t addr); -#endif /* _SH7750_REGNAMES_H */ +#endif /* SH7750_REGNAMES_H */
hw/sh7750_regs.h +3 -3
@@ -16,8 +16,8 @@* @(#) sh7750_regs.h,v 1.2.4.1 2003/09/04 18:46:00 joel Exp */ -#ifndef __SH7750_REGS_H__ -#define __SH7750_REGS_H__ +#ifndef SH7750_REGS_H +#define SH7750_REGS_H /* * All register has 2 addresses: in 0xff000000 - 0xffffffff (P4 address) and
@@ -1274,4 +1274,4 @@#define SH7750_BCR3_A7 0x1f800050#define SH7750_BCR4_A7 0x1e0a00f0 -#endif +#endif /* SH7750_REGS_H */
hw/sh_intc.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __SH_INTC_H__ -#define __SH_INTC_H__ +#ifndef SH_INTC_H +#define SH_INTC_H #include "qemu-common.h" #include "irq.h"
@@ -77,4 +77,4 @@ int sh_intc_init(struct intc_desc *desc,void sh_intc_set_irl (void *opaque,int n,int level); -#endif /* __SH_INTC_H__ */ +#endif /* SH_INTC_H */
hw/sharpsl.h +1 -1
@@ -14,4 +14,4 @@#define SL_PXA_PARAM_BASE 0xa0000a00void sl_bootparam_write (target_phys_addr_t ptr); -#endif +#endif /* QEMU_SHARPSL_H */
hw/spapr.h +3 -3
@@ -1,5 +1,5 @@ -#if !defined(__HW_SPAPR_H__) -#define __HW_SPAPR_H__ +#ifndef HW_SPAPR_H +#define HW_SPAPR_H struct VIOsPAPRBus ;struct icp_state ;
@@ -298,4 +298,4 @@ target_ulong spapr_rtas_call(sPAPREnvironment *spapr,int spapr_rtas_device_tree_setup (void *fdt,target_phys_addr_t rtas_addr,target_phys_addr_t rtas_size); -#endif /* !defined (__HW_SPAPR_H__) */ +#endif /* HW_SPAPR_H */
hw/spapr_vio.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _HW_SPAPR_VIO_H -#define _HW_SPAPR_VIO_H +#ifndef HW_SPAPR_VIO_H +#define HW_SPAPR_VIO_H /* * QEMU sPAPR VIO bus definitions *
@@ -111,4 +111,4 @@ void spapr_vscsi_create(VIOsPAPRBus *bus, uint32_t reg,int spapr_tce_set_bypass (uint32_t unit,uint32_t enable);void spapr_vio_quiesce (void ); -#endif /* _HW_SPAPR_VIO_H */ +#endif /* HW_SPAPR_VIO_H */
hw/sparc32_dma.h +1 -1
@@ -9,4 +9,4 @@ void ledma_memory_write(void *opaque, target_phys_addr_t addr,void espdma_memory_read (void *opaque,uint8_t *buf,int len);void espdma_memory_write (void *opaque,uint8_t *buf,int len); -#endif +#endif /* SPARC32_DMA_H */
hw/ssi.h +1 -1
@@ -42,4 +42,4 @@ uint32_t ssi_transfer(SSIBus *bus, uint32_t val);/* max111x.c */ void max111x_set_input (DeviceState *dev,int line,uint8_t value); -#endif +#endif /* QEMU_SSI_H */
hw/strongarm.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _STRONGARM_H -#define _STRONGARM_H +#ifndef STRONGARM_H +#define STRONGARM_H #define SA_CS0 0x00000000#define SA_CS1 0x08000000
@@ -61,4 +61,4 @@ typedef struct {StrongARMState *sa1110_init (unsigned int sdram_size,const char *rev); -#endif +#endif /* STRONGARM_H */
hw/sun4m.h +1 -1
@@ -33,4 +33,4 @@ void sun4c_irq_info(Monitor *mon, void *opaque);/* sparc32_dma.c */ #include "sparc32_dma.h" -#endif +#endif /* SUN4M_H */
hw/syborg.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _SYBORG_H -#define _SYBORG_H +#ifndef SYBORG_H +#define SYBORG_H #define SYBORG_ID_PLATFORM 0xc51d1000#define SYBORG_ID_INT 0xc51d0000
@@ -15,4 +15,4 @@#define SYBORG_ID_VIRTIO 0xc51d000a#define SYBORG_ID_NAND 0xc51d000b -#endif +#endif /* SYBORG_H */
hw/usb-ohci.h +1 -2
@@ -5,5 +5,4 @@void usb_ohci_init_pci (struct PCIBus *bus,int devfn); -#endif - +#endif /* QEMU_USB_OHCI_H */
hw/usb-uhci.h +1 -1
@@ -7,4 +7,4 @@ void usb_uhci_piix3_init(PCIBus *bus, int devfn);void usb_uhci_piix4_init (PCIBus *bus,int devfn);void usb_uhci_vt82c686b_init (PCIBus *bus,int devfn); -#endif +#endif /* QEMU_USB_UHCI_H */
hw/vhost.h +1 -1
@@ -47,4 +47,4 @@ bool vhost_dev_query(struct vhost_dev *hdev, VirtIODevice *vdev);int vhost_dev_start (struct vhost_dev *hdev,VirtIODevice *vdev);void vhost_dev_stop (struct vhost_dev *hdev,VirtIODevice *vdev); -#endif +#endif /* VHOST_H */
hw/vhost_net.h +1 -1
@@ -17,4 +17,4 @@ void vhost_net_cleanup(VHostNetState *net);unsigned vhost_net_get_features (VHostNetState *net,unsigned features);void vhost_net_ack_features (VHostNetState *net,unsigned features); -#endif +#endif /* VHOST_NET_H */
hw/virtio-balloon.h +3 -3
@@ -12,8 +12,8 @@* */ -#ifndef _QEMU_VIRTIO_BALLOON_H -#define _QEMU_VIRTIO_BALLOON_H +#ifndef QEMU_VIRTIO_BALLOON_H +#define QEMU_VIRTIO_BALLOON_H #include "virtio.h" #include "pci.h"
@@ -52,4 +52,4 @@ typedef struct VirtIOBalloonStat {uint64_t val; } __attribute__((packed)) VirtIOBalloonStat; -#endif +#endif /* QEMU_VIRTIO_BALLOON_H */
hw/virtio-blk.h +3 -3
@@ -11,8 +11,8 @@* */ -#ifndef _QEMU_VIRTIO_BLK_H -#define _QEMU_VIRTIO_BLK_H +#ifndef QEMU_VIRTIO_BLK_H +#define QEMU_VIRTIO_BLK_H #include "virtio.h" #include "block.h"
@@ -103,4 +103,4 @@ struct virtio_scsi_inhdr#define DEFINE_VIRTIO_BLK_FEATURES (_state, _field) \ DEFINE_VIRTIO_COMMON_FEATURES(_state, _field)#endif -#endif +#endif /* QEMU_VIRTIO_BLK_H */
hw/virtio-net.h +3 -3
@@ -11,8 +11,8 @@* */ -#ifndef _QEMU_VIRTIO_NET_H -#define _QEMU_VIRTIO_NET_H +#ifndef QEMU_VIRTIO_NET_H +#define QEMU_VIRTIO_NET_H #include "virtio.h" #include "net.h"
@@ -186,4 +186,4 @@ struct virtio_net_ctrl_mac {DEFINE_PROP_BIT ("ctrl_rx" , _state, _field,VIRTIO_NET_F_CTRL_RX , true), \DEFINE_PROP_BIT ("ctrl_vlan" , _state, _field,VIRTIO_NET_F_CTRL_VLAN , true), \ DEFINE_PROP_BIT("ctrl_rx_extra", _state, _field, VIRTIO_NET_F_CTRL_RX_EXTRA, true) -#endif +#endif /* QEMU_VIRTIO_NET_H */
hw/virtio-serial.h +3 -3
@@ -12,8 +12,8 @@* the COPYING file in the top-level directory. * */ -#ifndef _QEMU_VIRTIO_SERIAL_H -#define _QEMU_VIRTIO_SERIAL_H +#ifndef QEMU_VIRTIO_SERIAL_H +#define QEMU_VIRTIO_SERIAL_H #include "qdev.h" #include "virtio.h"
@@ -204,4 +204,4 @@ size_t virtio_serial_guest_ready(VirtIOSerialPort *port);*/ void virtio_serial_throttle_port (VirtIOSerialPort *port,bool throttle); -#endif +#endif /* QEMU_VIRTIO_SERIAL_H */
hw/virtio.h +3 -3
@@ -11,8 +11,8 @@* */ -#ifndef _QEMU_VIRTIO_H -#define _QEMU_VIRTIO_H +#ifndef QEMU_VIRTIO_H +#define QEMU_VIRTIO_H #include "hw.h" #include "net.h"
@@ -227,4 +227,4 @@ EventNotifier *virtio_queue_get_guest_notifier(VirtQueue *vq);EventNotifier *virtio_queue_get_host_notifier (VirtQueue *vq);void virtio_queue_notify_vq (VirtQueue *vq);void virtio_irq (VirtQueue *vq); -#endif +#endif /* QEMU_VIRTIO_H */
hw/vmware_vga.h +1 -1
@@ -16,4 +16,4 @@ static inline bool pci_vmsvga_init(PCIBus *bus) } } -#endif +#endif /* QEMU_VMWARE_VGA_H */
hw/vt82c686.h +1 -1
@@ -8,4 +8,4 @@ void vt82c686b_mc97_init(PCIBus *bus, int devfn);i2c_bus *vt82c686b_pm_init (PCIBus *bus,int devfn,uint32_t smb_io_base,qemu_irq sci_irq); -#endif +#endif /* HW_VT82C686_H */
hw/xen_blkif.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __XEN_BLKIF_H__ -#define __XEN_BLKIF_H__ +#ifndef XEN_BLKIF_H +#define XEN_BLKIF_H #include <xen/io/ring.h> #include <xen/io/blkif.h>
@@ -100,4 +100,4 @@ static inline void blkif_get_x86_64_req(blkif_request_t *dst, blkif_x86_64_reque dst->seg[i] = src->seg[i]; } -#endif /* __XEN_BLKIF_H__ */ +#endif /* XEN_BLKIF_H */
hw/xics.h +3 -3
@@ -24,8 +24,8 @@* THE SOFTWARE. * */ -#if !defined(__XICS_H__) -#define __XICS_H__ +#ifndef XICS_H +#define XICS_H #define XICS_IPI 0x2
@@ -35,4 +35,4 @@ qemu_irq xics_find_qirq(struct icp_state *icp, int irq);struct icp_state *xics_system_init (int nr_irqs); -#endif /* __XICS_H__ */ +#endif /* XICS_H */
iorange.h +1 -1
@@ -27,4 +27,4 @@ static inline void iorange_init(IORange *iorange, const IORangeOps *ops, iorange->len = len; } -#endif +#endif /* IORANGE_H */
json-lexer.h +1 -1
@@ -47,4 +47,4 @@ int json_lexer_flush(JSONLexer *lexer);void json_lexer_destroy (JSONLexer *lexer); -#endif +#endif /* QEMU_JSON_LEXER_H */
json-parser.h +1 -1
@@ -19,4 +19,4 @@QObject *json_parser_parse (QList *tokens,va_list *ap); -#endif +#endif /* QEMU_JSON_PARSER_H */
json-streamer.h +1 -1
@@ -36,4 +36,4 @@ int json_message_parser_flush(JSONMessageParser *parser);void json_message_parser_destroy (JSONMessageParser *parser); -#endif +#endif /* QEMU_JSON_STREAMER_H */
kvm.h +2 -1
@@ -196,4 +196,5 @@ int kvm_physical_memory_addr_from_ram(KVMState *s, ram_addr_t ram_addr,int kvm_set_ioeventfd_mmio_long (int fd,uint32_t adr,uint32_t val,bool assign);int kvm_set_ioeventfd_pio_word (int fd,uint16_t adr,uint16_t val,bool assign); -#endif + +#endif /* QEMU_KVM_H */
libcacard/cac.h +4 -2
@@ -6,7 +6,8 @@* See the COPYING.LIB file in the top-level directory. */ #ifndef CAC_H -#define CAC_H 1 +#define CAC_H +#include "vcard.h" #include "vreader.h" /*
@@ -20,4 +21,5 @@ VCardStatus cac_card_init(VReader *reader, VCard *card, const char *params,/* not yet implemented */ VCardStatus cac_is_cac_card (VReader *reader); -#endif + +#endif /* CAC_H */
libcacard/card_7816.h +2 -2
@@ -5,7 +5,7 @@* See the COPYING.LIB file in the top-level directory. */ #ifndef CARD_7816_H -#define CARD_7816_H 1 +#define CARD_7816_H #include "card_7816t.h" #include "vcardt.h"
@@ -59,4 +59,4 @@ void vcard_apdu_delete(VCardAPDU *apdu);VCardStatus vcard_process_apdu (VCard *card,VCardAPDU *apdu,VCardResponse **response); -#endif +#endif /* CARD_7816_H */
libcacard/card_7816t.h +2 -2
@@ -5,7 +5,7 @@* See the COPYING.LIB file in the top-level directory. */ #ifndef CARD_7816T_H -#define CARD_7816T_H 1 +#define CARD_7816T_H typedef unsigned short vcard_7816_status_t ;
@@ -162,4 +162,4 @@ struct VCardAPDUStruct {#define VCARD7816_INS_VERIFY 0x20#define VCARD7816_INS_GET_RESPONSE 0xc0 -#endif +#endif /* CARD_7816T_H */
libcacard/eventt.h +2 -3
@@ -4,7 +4,7 @@*/ #ifndef EVENTT_H -#define EVENTT_H 1 +#define EVENTT_H #include "vreadert.h" #include "vcardt.h"
@@ -24,6 +24,5 @@ struct VEventStruct {VReader *reader; VCard *card; }; -#endif - +#endif /* EVENTT_H */
libcacard/vcard.h +2 -2
@@ -3,7 +3,7 @@* See the COPYING.LIB file in the top-level directory. */ #ifndef VCARD_H -#define VCARD_H 1 +#define VCARD_H #include "vcardt.h"
@@ -83,4 +83,4 @@ VCardType vcard_get_type(VCard *card);/* get the private data */ VCardEmul *vcard_get_private (VCard *card); -#endif +#endif /* VCARD_H */
libcacard/vcard_emul.h +3 -2
@@ -11,7 +11,7 @@*/ #ifndef VCARD_EMUL_H -#define VCARD_EMUL_H 1 +#define VCARD_EMUL_H #include "card_7816t.h" #include "vcard.h"
@@ -62,4 +62,5 @@ VCardEmulOptions *vcard_emul_options(const char *args);VCardEmulError vcard_emul_init (const VCardEmulOptions *options);void vcard_emul_replay_insertion_events (void );void vcard_emul_usage (void ); -#endif + +#endif /* VCARD_EMUL_H */
libcacard/vcard_emul_type.h +2 -2
@@ -9,7 +9,7 @@*/ #ifndef VCARD_EMUL_TYPE_H -#define VCARD_EMUL_TYPE_H 1 +#define VCARD_EMUL_TYPE_H #include "vcardt.h" #include "vreadert.h"
@@ -29,4 +29,4 @@ VCardStatus vcard_init(VReader *vreader, VCard *vcard, VCardEmulType type,VCardEmulType vcard_emul_type_select (VReader *vreader);VCardEmulType vcard_emul_type_from_string (const char *type_string); -#endif +#endif /* VCARD_EMUL_TYPE_H */
libcacard/vcardt.h +2 -2
@@ -3,7 +3,7 @@* See the COPYING.LIB file in the top-level directory. */ #ifndef VCARDT_H -#define VCARDT_H 1 +#define VCARDT_H /* * these should come from some common spice header file
@@ -61,4 +61,4 @@ struct VCardBufferResponseStruct { int len; }; -#endif +#endif /* VCARDT_H */
libcacard/vevent.h +3 -3
@@ -3,7 +3,8 @@* See the COPYING.LIB file in the top-level directory. */ #ifndef EVENT_H -#define EVENT_H 1 +#define EVENT_H +#include "eventt.h" #include "vreadert.h" #include "vcardt.h"
@@ -23,5 +24,4 @@ void vevent_queue_init(void);VEvent *vevent_wait_next_vevent (void );VEvent *vevent_get_next_vevent (void ); - -#endif +#endif /* EVENT_H */
libcacard/vreader.h +2 -2
@@ -4,7 +4,7 @@*/ #ifndef VREADER_H -#define VREADER_H 1 +#define VREADER_H #include "eventt.h" #include "vreadert.h"
@@ -52,4 +52,4 @@ VReaderStatus vreader_add_reader(VReader *reader);VReaderStatus vreader_remove_reader (VReader *reader);VReaderStatus vreader_insert_card (VReader *reader,VCard *card); -#endif +#endif /* VREADER_H */
libcacard/vreadert.h +2 -3
@@ -4,7 +4,7 @@*/ #ifndef VREADERT_H -#define VREADERT_H 1 +#define VREADERT_H typedef enum { VREADER_OK = 0,
@@ -20,5 +20,4 @@ typedef struct VReaderListEntryStruct VReaderListEntry;typedef struct VReaderEmulStruct VReaderEmul ;typedef void (*VReaderEmulFree )(VReaderEmul *); -#endif - +#endif /* VREADERT_H */
libfdt_env.h +3 -3
@@ -16,8 +16,8 @@* */ -#ifndef _LIBFDT_ENV_H -#define _LIBFDT_ENV_H +#ifndef LIBFDT_ENV_H +#define LIBFDT_ENV_H #include <stddef.h> #include <stdint.h>
@@ -37,4 +37,4 @@#define cpu_to_fdt64 (x) (bswap_64((x)))#endif -#endif /* _LIBFDT_ENV_H */ +#endif /* LIBFDT_ENV_H */
linux-user/arm/nwfpe/fpa11.h +3 -3
@@ -18,8 +18,8 @@along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef __FPA11_H__ -#define __FPA11_H__ +#ifndef FPA11_H +#define FPA11_H #include <stdlib.h> #include <stdio.h>
@@ -127,4 +127,4 @@ unsigned int ExtendedCPDO(const unsigned int opcode);/* included only for get_user/put_user macros */ #include "qemu.h" -#endif +#endif /* FPA11_H */
linux-user/arm/nwfpe/fpopcode.h +3 -3
@@ -18,8 +18,8 @@along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef __FPOPCODE_H__ -#define __FPOPCODE_H__ +#ifndef FPOPCODE_H +#define FPOPCODE_H /* ARM Floating Point Instruction Classes
@@ -387,4 +387,4 @@ static inline float32 getSingleConstant(const unsigned int nIndex)unsigned int getRegisterCount (const unsigned int opcode);unsigned int getDestinationSize (const unsigned int opcode); -#endif +#endif /* FPOPCODE_H */
linux-user/arm/nwfpe/fpsr.h +3 -3
@@ -18,8 +18,8 @@along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef __FPSR_H__ -#define __FPSR_H__ +#ifndef FPSR_H +#define FPSR_H /* The FPSR is a 32 bit register consisting of 4 parts, each exactly
@@ -104,4 +104,4 @@ typedef unsigned int FPCR; /* type for floating point control register */#define MASK_WFC MASK_RESET#define MASK_RFC ~MASK_RESET -#endif +#endif /* FPSR_H */
linux-user/linux_loop.h +3 -3
@@ -1,6 +1,6 @@/* Copied from 2.6.25 kernel headers to avoid problems on older hosts. */ -#ifndef _LINUX_LOOP_H -#define _LINUX_LOOP_H +#ifndef LINUX_LOOP_H +#define LINUX_LOOP_H /* * include/linux/loop.h
@@ -92,4 +92,4 @@ struct loop_info64 {#define LOOP_GET_STATUS64 0x4C05#define LOOP_CHANGE_FD 0x4C06 -#endif +#endif /* LINUX_LOOP_H */
linux-user/qemu-types.h +3 -1
@@ -1,5 +1,6 @@#ifndef QEMU_TYPES_H #define QEMU_TYPES_H +#include "cpu.h" #ifdef TARGET_ABI32
@@ -21,4 +22,5 @@ typedef target_long abi_long;#define TARGET_ABI32 1#endif #endif -#endif + +#endif /* QEMU_TYPES_H */
linux-user/unicore32/syscall.h +3 -3
@@ -5,8 +5,8 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#ifndef __UC32_SYSCALL_H__ -#define __UC32_SYSCALL_H__ +#ifndef UC32_SYSCALL_H +#define UC32_SYSCALL_H struct target_pt_regs {abi_ulong uregs[34 ]; };
@@ -52,4 +52,4 @@ struct target_pt_regs {#define UNAME_MACHINE "UniCore-II" -#endif /* __UC32_SYSCALL_H__ */ +#endif /* UC32_SYSCALL_H */
migration.h +1 -1
@@ -148,4 +148,4 @@ int ram_load(QEMUFile *f, void *opaque, int version_id);extern int incoming_expected; -#endif +#endif /* QEMU_MIGRATION_H */
module.h +1 -1
@@ -35,4 +35,4 @@ void register_module_init(void (*fn)(void), module_init_type type);void module_call_init (module_init_type type); -#endif +#endif /* QEMU_MODULE_H */
nbd.h +1 -1
@@ -66,4 +66,4 @@ int nbd_trip(BlockDriverState *bs, int csock, off_t size, uint64_t dev_offset,int nbd_client (int fd);int nbd_disconnect (int fd); -#endif +#endif /* NBD_H */
net.h +1 -1
@@ -181,4 +181,4 @@ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd);int net_handle_fd_param (Monitor *mon,const char *param); -#endif +#endif /* QEMU_NET_H */
notify.h +1 -1
@@ -40,4 +40,4 @@ void notifier_list_remove(NotifierList *list, Notifier *notifier);void notifier_list_notify (NotifierList *list); -#endif +#endif /* QEMU_NOTIFY_H */
osdep.h +1 -1
@@ -147,4 +147,4 @@ static inline void qemu_timersub(const struct timeval *val1,#define qemu_timersub timersub#endif -#endif +#endif /* QEMU_OSDEP_H */
pflib.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __QEMU_PFLIB_H -#define __QEMU_PFLIB_H +#ifndef QEMU_PFLIB_H +#define QEMU_PFLIB_H /* * PixelFormat conversion library.
@@ -17,4 +17,4 @@ QemuPfConv *qemu_pf_conv_get(PixelFormat *dst, PixelFormat *src);void qemu_pf_conv_run (QemuPfConv *conv,void *dst,void *src,uint32_t cnt);void qemu_pf_conv_put (QemuPfConv *conv); -#endif +#endif /* QEMU_PFLIB_H */
poison.h +2 -1
@@ -51,4 +51,5 @@#pragma GCC poison CPU_INTERRUPT_TGT_INT_2#endif -#endif + +#endif /* HW_POISON_H */
qemu-aio.h +1 -1
@@ -56,4 +56,4 @@ int qemu_aio_set_fd_handler(int fd, AioProcessQueue *io_process_queue, void *opaque); -#endif +#endif /* QEMU_AIO_H */
qemu-barrier.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __QEMU_BARRIER_H -#define __QEMU_BARRIER_H 1 +#ifndef QEMU_BARRIER_H +#define QEMU_BARRIER_H /* FIXME: arch dependant, x86 version */ #define smp_wmb () asm volatile("" ::: "memory")
@@ -7,4 +7,4 @@/* Compiler barrier */ #define barrier () asm volatile("" ::: "memory") -#endif +#endif /* QEMU_BARRIER_H */
qemu-char.h +2 -1
@@ -125,4 +125,5 @@ int qemu_set_fd_handler(int fd, IOHandler *fd_read, IOHandler *fd_write, void *opaque); -#endif + +#endif /* QEMU_CHAR_H */
qemu-common.h +1 -1
@@ -390,4 +390,4 @@ static inline uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)#include "module.h" -#endif +#endif /* QEMU_COMMON_H */
qemu-error.h +1 -1
@@ -37,4 +37,4 @@ void error_print_loc(void);void error_set_progname (const char *argv0); void error_report(const char *fmt, ...) GCC_FMT_ATTR(1, 2); -#endif +#endif /* QEMU_ERROR_H */
qemu-log.h +1 -1
@@ -90,4 +90,4 @@ extern int loglevel; } while (0) -#endif +#endif /* QEMU_LOG_H */
qemu-option.h +1 -1
@@ -132,4 +132,4 @@ int qemu_opts_print(QemuOpts *opts, void *dummy);int qemu_opts_foreach (QemuOptsList *list,qemu_opts_loopfunc func,void *opaque,int abort_on_failure); -#endif +#endif /* QEMU_OPTIONS_H */
qemu-options.h +3 -3
@@ -25,8 +25,8 @@* THE SOFTWARE. */ -#ifndef _QEMU_OPTIONS_H_ -#define _QEMU_OPTIONS_H_ +#ifndef QEMU_OPTIONS_H_ +#define QEMU_OPTIONS_H_ enum {#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \
@@ -38,4 +38,4 @@ enum {#undef GEN_DOCS }; -#endif +#endif /* QEMU_OPTIONS_H_ */
qemu-os-posix.h +2 -1
@@ -51,4 +51,5 @@ typedef struct timespec qemu_timespec;int qemu_utimensat (int dirfd,const char *path,const qemu_timespec *times,int flags); -#endif + +#endif /* QEMU_OS_POSIX_H */
qemu-os-win32.h +1 -1
@@ -66,4 +66,4 @@ typedef struct { } qemu_timeval;int qemu_gettimeofday (qemu_timeval *tp); -#endif +#endif /* QEMU_OS_WIN32_H */
qemu-thread-posix.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __QEMU_THREAD_POSIX_H -#define __QEMU_THREAD_POSIX_H 1 +#ifndef QEMU_THREAD_POSIX_H +#define QEMU_THREAD_POSIX_H #include "pthread.h" struct QemuMutex {
@@ -14,4 +14,4 @@ struct QemuThread { pthread_t thread; }; -#endif +#endif /* QEMU_THREAD_POSIX_H */
qemu-thread-win32.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __QEMU_THREAD_WIN32_H -#define __QEMU_THREAD_WIN32_H 1 +#ifndef QEMU_THREAD_WIN32_H +#define QEMU_THREAD_WIN32_H #include "windows.h" struct QemuMutex {
@@ -18,4 +18,4 @@ struct QemuThread { void *ret; }; -#endif +#endif /* QEMU_THREAD_WIN32_H */
qemu-thread.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __QEMU_THREAD_H -#define __QEMU_THREAD_H 1 +#ifndef QEMU_THREAD_H +#define QEMU_THREAD_H #include <inttypes.h>
@@ -38,4 +38,4 @@ void qemu_thread_get_self(QemuThread *thread);int qemu_thread_is_self (QemuThread *thread);void qemu_thread_exit (void *retval); -#endif +#endif /* QEMU_THREAD_H */
qemu-timer.h +1 -1
@@ -333,4 +333,4 @@ extern int64_t tlb_flush_time;extern int64_t dev_time;#endif -#endif +#endif /* QEMU_TIMER_H */
range.h +1 -1
@@ -26,4 +26,4 @@ static inline int ranges_overlap(uint64_t first1, uint64_t len1, return !(last2 < first1 || last1 < first2); } -#endif +#endif /* QEMU_RANGE_H */
rwhandler.h +1 -1
@@ -24,4 +24,4 @@ int cpu_register_io_memory_simple(ReadWriteHandler *, int endian);int register_ioport_simple (ReadWriteHandler *,pio_addr_t start,int length,int size); -#endif +#endif /* READ_WRITE_HANDLER_H */
slirp/if.h +3 -3
@@ -5,8 +5,8 @@* terms and conditions of the copyright. */ -#ifndef _IF_H_ -#define _IF_H_ +#ifndef IF_H +#define IF_H #define IF_COMPRESS 0x01/* We want compression */ #define IF_NOCOMPRESS 0x02/* Do not do compression */
@@ -22,4 +22,4 @@#define ifs_init (ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm)) -#endif +#endif /* IF_H */
slirp/ip.h +3 -3
@@ -30,8 +30,8 @@* ip.h,v 1.3 1994/08/21 05:27:30 paul Exp */ -#ifndef _IP_H_ -#define _IP_H_ +#ifndef IP_H +#define IP_H #ifdef HOST_WORDS_BIGENDIAN # ifndef NTOHL
@@ -250,4 +250,4 @@ struct ipoption {int8_t ipopt_list[MAX_IPOPTLEN ];/* options proper */ } __attribute__((packed)); -#endif +#endif /* IP_H */
slirp/ip_icmp.h +3 -3
@@ -30,8 +30,8 @@* ip_icmp.h,v 1.4 1995/05/30 08:09:43 rgrimes Exp */ -#ifndef _NETINET_IP_ICMP_H_ -#define _NETINET_IP_ICMP_H_ +#ifndef NETINET_IP_ICMP_H +#define NETINET_IP_ICMP_H /* * Interface Control Message Protocol Definitions.
@@ -158,4 +158,4 @@ void icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, const char *message);void icmp_reflect (struct mbuf *); -#endif +#endif /* NETINET_IP_ICMP_H */
slirp/libslirp.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _LIBSLIRP_H -#define _LIBSLIRP_H +#ifndef LIBSLIRP_H +#define LIBSLIRP_H #include <qemu-common.h>
@@ -53,4 +53,4 @@ static inline void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds, int select_error) { }#endif /* !CONFIG_SLIRP */ -#endif +#endif /* LIBSLIRP_H */
slirp/mbuf.h +3 -3
@@ -30,8 +30,8 @@* mbuf.h,v 1.9 1994/11/14 13:54:20 bde Exp */ -#ifndef _MBUF_H_ -#define _MBUF_H_ +#ifndef MBUF_H +#define MBUF_H #define m_freem m_free
@@ -124,4 +124,4 @@ void m_adj(struct mbuf *, int);int m_copy (struct mbuf *,struct mbuf *,int ,int );struct mbuf *dtom (Slirp *,void *); -#endif +#endif /* MBUF_H */
slirp/misc.h +3 -3
@@ -5,8 +5,8 @@* terms and conditions of the copyright. */ -#ifndef _MISC_H_ -#define _MISC_H_ +#ifndef MISC_H +#define MISC_H struct ex_list { int ex_pty; /* Do we want a pty? */
@@ -69,4 +69,4 @@ void fd_nonblock(int);void fd_block (int );int rsh_exec (struct socket *,struct socket *,char *,char *,char *); -#endif +#endif /* MISC_H */
slirp/sbuf.h +3 -3
@@ -5,8 +5,8 @@* terms and conditions of the copyright. */ -#ifndef _SBUF_H_ -#define _SBUF_H_ +#ifndef SBUF_H +#define SBUF_H #define sbflush (sb) sbdrop((sb),(sb)->sb_cc)#define sbspace (sb) ((sb)->sb_datalen - (sb)->sb_cc)
@@ -27,4 +27,4 @@ void sbreserve(struct sbuf *, int);void sbappend (struct socket *,struct mbuf *);void sbcopy (struct sbuf *,int ,int ,char *); -#endif +#endif /* SBUF_H */
slirp/slirp.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __COMMON_H__ -#define __COMMON_H__ +#ifndef COMMON_H +#define COMMON_H #include "config-host.h" #include "slirp_config.h"
@@ -317,4 +317,4 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err);#define errno (WSAGetLastError())#endif -#endif +#endif /* COMMON_H */
slirp/socket.h +3 -3
@@ -5,8 +5,8 @@* terms and conditions of the copyright. */ -#ifndef _SLIRP_SOCKET_H_ -#define _SLIRP_SOCKET_H_ +#ifndef SLIRP_SOCKET_H +#define SLIRP_SOCKET_H #define SO_EXPIRE 240000#define SO_EXPIREFAST 10000
@@ -92,4 +92,4 @@ struct iovec; /* For win32 */size_t sopreprbuf (struct socket *so,struct iovec *iov,int *np);int soreadbuf (struct socket *so,const char *buf,int size); -#endif /* _SOCKET_H_ */ +#endif /* SOCKET_H */
slirp/tcp.h +3 -3
@@ -30,8 +30,8 @@* tcp.h,v 1.3 1994/08/21 05:27:34 paul Exp */ -#ifndef _TCP_H_ -#define _TCP_H_ +#ifndef TCP_H +#define TCP_H typedef uint32_t tcp_seq ;
@@ -161,4 +161,4 @@ struct tcphdr {#define TCP_ISSINCR (125*1024)/* increment for tcp_iss each second */ -#endif +#endif /* TCP_H */
slirp/tcp_timer.h +3 -3
@@ -30,8 +30,8 @@* tcp_timer.h,v 1.4 1994/08/21 05:27:38 paul Exp */ -#ifndef _TCP_TIMER_H_ -#define _TCP_TIMER_H_ +#ifndef TCP_TIMER_H +#define TCP_TIMER_H /* * Definitions of the TCP timers. These timers are counted
@@ -124,4 +124,4 @@ void tcp_fasttimo(Slirp *);void tcp_slowtimo (Slirp *);void tcp_canceltimers (struct tcpcb *); -#endif +#endif /* TCP_TIMER_H */
slirp/tcp_var.h +3 -3
@@ -30,8 +30,8 @@* tcp_var.h,v 1.3 1994/08/21 05:27:39 paul Exp */ -#ifndef _TCP_VAR_H_ -#define _TCP_VAR_H_ +#ifndef TCP_VAR_H +#define TCP_VAR_H #include "tcpip.h" #include "tcp_timer.h"
@@ -158,4 +158,4 @@ struct tcpcb {#define TCP_REXMTVAL (tp) \ (((tp)->t_srtt >> TCP_RTT_SHIFT) + (tp)->t_rttvar) -#endif +#endif /* TCP_VAR_H */
slirp/tcpip.h +3 -3
@@ -30,8 +30,8 @@* tcpip.h,v 1.3 1994/08/21 05:27:40 paul Exp */ -#ifndef _TCPIP_H_ -#define _TCPIP_H_ +#ifndef TCPIP_H +#define TCPIP_H /* * Tcp+ip header, after ip options removed.
@@ -74,4 +74,4 @@ struct tcpiphdr_2 { char first_char; }; -#endif +#endif /* TCPIP_H */
slirp/udp.h +3 -3
@@ -30,8 +30,8 @@* udp.h,v 1.3 1994/08/21 05:27:41 paul Exp */ -#ifndef _UDP_H_ -#define _UDP_H_ +#ifndef UDP_H +#define UDP_H #define UDP_TTL 0x60#define UDP_UDPDATALEN 16192
@@ -83,4 +83,4 @@ struct socket * udp_listen(Slirp *, uint32_t, u_int, uint32_t, u_int,int udp_output2 (struct socket *so,struct mbuf *m,struct sockaddr_in *saddr,struct sockaddr_in *daddr,int iptos); -#endif +#endif /* UDP_H */
softmmu_defs.h +1 -1
@@ -19,4 +19,4 @@ void REGPARM __stl_cmmu(target_ulong addr, uint32_t val, int mmu_idx); uint64_t REGPARM __ldq_cmmu(target_ulong addr, int mmu_idx); void REGPARM __stq_cmmu(target_ulong addr, uint64_t val, int mmu_idx); -#endif +#endif /* SOFTMMU_DEFS_H */
sysemu.h +2 -1
@@ -172,4 +172,5 @@ void register_devices(void);void add_boot_device_path (int32_t bootindex,DeviceState *dev,const char *suffix);char *get_boot_devices_list (uint32_t *size); -#endif + +#endif /* SYSEMU_H */
target-alpha/cpu.h +3 -3
@@ -17,8 +17,8 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#if !defined (__CPU_ALPHA_H__) -#define __CPU_ALPHA_H__ +#ifndef CPU_ALPHA_H +#define CPU_ALPHA_H #include "config.h"
@@ -535,4 +535,4 @@ static inline void cpu_set_tls(CPUState *env, target_ulong newtls) }#endif -#endif /* !defined (__CPU_ALPHA_H__) */ +#endif /* CPU_ALPHA_H */
target-alpha/exec.h +3 -3
@@ -17,8 +17,8 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#if !defined (__ALPHA_EXEC_H__) -#define __ALPHA_EXEC_H__ +#ifndef ALPHA_EXEC_H +#define ALPHA_EXEC_H #include "config.h"
@@ -47,4 +47,4 @@ static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb) env->pc = tb->pc; } -#endif /* !defined (__ALPHA_EXEC_H__) */ +#endif /* ALPHA_EXEC_H */
target-arm/cpu.h +1 -1
@@ -512,4 +512,4 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, } } -#endif +#endif /* CPU_ARM_H */
target-cris/cpu.h +1 -1
@@ -268,4 +268,4 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,#define cpu_list cris_cpu_listvoid cris_cpu_list (FILE *f,fprintf_function cpu_fprintf); -#endif +#endif /* CPU_CRIS_H */
target-cris/opcode-cris.h +3 -3
@@ -19,8 +19,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef __CRIS_H_INCLUDED_ -#define __CRIS_H_INCLUDED_ +#ifndef CRIS_H +#define CRIS_H #if !defined(__STDC__) && !defined(const)#define const
@@ -355,7 +355,7 @@ extern const struct cris_opcode cris_opcodes[];sign-extended before adding to "target". */ #define CRIS_DIS_FLAG_MEM_TARGET2_MEM_WORD (1 << 7) -#endif /* __CRIS_H_INCLUDED_ */ +#endif /* CRIS_H */ /* * Local variables:
target-i386/svm.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __SVM_H -#define __SVM_H +#ifndef SVM_H +#define SVM_H #define TLB_CONTROL_DO_NOTHING 0#define TLB_CONTROL_FLUSH_ALL_ASID 1
@@ -219,4 +219,4 @@ struct __attribute__ ((__packed__)) vmcb { struct vmcb_save_area save; }; -#endif +#endif /* SVM_H */
target-lm32/cpu.h +2 -1
@@ -241,4 +241,5 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, *cs_base =0 ; *flags = 0; } -#endif + +#endif /* CPU_LM32_H */
target-m68k/cpu.h +1 -1
@@ -254,4 +254,4 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, | ((env->macsr >> 4) & 0xf); /* Bits 0-3 */ } -#endif +#endif /* CPU_M68K_H */
target-microblaze/cpu.h +2 -1
@@ -350,4 +350,5 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,void do_unassigned_access (target_phys_addr_t addr,int is_write,int is_exec,int is_asi,int size);#endif -#endif + +#endif /* CPU_MICROBLAZE_H */
target-mips/cpu.h +3 -3
@@ -1,5 +1,5 @@ -#if !defined (__MIPS_CPU_H__) -#define __MIPS_CPU_H__ +#ifndef MIPS_CPU_H +#define MIPS_CPU_H #define TARGET_HAS_ICE 1
@@ -656,4 +656,4 @@ static inline void cpu_set_tls(CPUState *env, target_ulong newtls) env->tls_value = newtls; } -#endif /* !defined (__MIPS_CPU_H__) */ +#endif /* MIPS_CPU_H */
target-mips/exec.h +3 -3
@@ -1,5 +1,5 @@ -#if !defined(__QEMU_MIPS_EXEC_H__) -#define __QEMU_MIPS_EXEC_H__ +#ifndef QEMU_MIPS_EXEC_H +#define QEMU_MIPS_EXEC_H //#define DEBUG_OP
@@ -80,4 +80,4 @@ static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb) env->hflags |= tb->flags & MIPS_HFLAG_BMASK; } -#endif /* !defined(__QEMU_MIPS_EXEC_H__) */ +#endif /* QEMU_MIPS_EXEC_H */
target-mips/mips-defs.h +3 -3
@@ -1,5 +1,5 @@ -#if !defined (__QEMU_MIPS_DEFS_H__) -#define __QEMU_MIPS_DEFS_H__ +#ifndef QEMU_MIPS_DEFS_H +#define QEMU_MIPS_DEFS_H /* If we want to use host float regs... */ //#define USE_HOST_FLOAT_REGS
@@ -69,4 +69,4 @@Note that we still maintain Count/Compare to match the host clock. */ //#define MIPS_STRICT_STANDARD 1 -#endif /* !defined (__QEMU_MIPS_DEFS_H__) */ +#endif /* QEMU_MIPS_DEFS_H */
target-ppc/cpu.h +3 -3
@@ -16,8 +16,8 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#if !defined (__CPU_PPC_H__) -#define __CPU_PPC_H__ +#ifndef CPU_PPC_H +#define CPU_PPC_H #include "config.h" #include "qemu-common.h"
@@ -1999,4 +1999,4 @@ static inline ppcemb_tlb_t *booke206_get_tlbe(CPUState *env, const int tlbn,extern void (*cpu_ppc_hypercall)(CPUState *); -#endif /* !defined (__CPU_PPC_H__) */ +#endif /* CPU_PPC_H */
target-ppc/exec.h +3 -3
@@ -16,8 +16,8 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#if !defined (__PPC_H__) -#define __PPC_H__ +#ifndef PPC_H +#define PPC_H #include "config.h"
@@ -43,4 +43,4 @@ static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb) env->nip = tb->pc; } -#endif /* !defined (__PPC_H__) */ +#endif /* PPC_H */
target-ppc/helper_regs.h +3 -3
@@ -17,8 +17,8 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#if !defined(__HELPER_REGS_H__) -#define __HELPER_REGS_H__ +#ifndef HELPER_REGS_H +#define HELPER_REGS_H /* Swap temporary saved registers with GPRs */ static inline void hreg_swap_gpr_tgpr (CPUPPCState *env)
@@ -108,4 +108,4 @@ static inline int hreg_store_msr(CPUPPCState *env, target_ulong value, return excp; } -#endif /* !defined(__HELPER_REGS_H__) */ +#endif /* HELPER_REGS_H */
target-ppc/kvm_ppc.h +3 -3
@@ -6,8 +6,8 @@* */ -#ifndef __KVM_PPC_H__ -#define __KVM_PPC_H__ +#ifndef KVM_PPC_H +#define KVM_PPC_H void kvmppc_init (void );void kvmppc_fdt_update (void *fdt);
@@ -50,4 +50,4 @@ int kvmppc_set_interrupt(CPUState *env, int irq, int level);#define KVM_INTERRUPT_SET_LEVEL -3#endif -#endif /* __KVM_PPC_H__ */ +#endif /* KVM_PPC_H */
target-s390x/cpu.h +1 -1
@@ -972,4 +972,4 @@ static inline void cpu_inject_ext(CPUState *env, uint32_t code, uint32_t param, cpu_interrupt(env, CPU_INTERRUPT_HARD); } -#endif +#endif /* CPU_S390X_H */
target-sh4/cpu.h +3 -3
@@ -16,8 +16,8 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _CPU_SH4_H -#define _CPU_SH4_H +#ifndef CPU_SH4_H +#define CPU_SH4_H #include "config.h" #include "qemu-common.h"
@@ -361,4 +361,4 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, | (env->movcal_backup ? TB_FLAG_PENDING_MOVCA : 0); /* Bit 4 */ } -#endif /* _CPU_SH4_H */ +#endif /* CPU_SH4_H */
target-sh4/exec.h +3 -3
@@ -16,8 +16,8 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _EXEC_SH4_H -#define _EXEC_SH4_H +#ifndef EXEC_SH4_H +#define EXEC_SH4_H #include "config.h" #include "dyngen-exec.h"
@@ -42,4 +42,4 @@ static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb) env->flags = tb->flags; } -#endif /* _EXEC_SH4_H */ +#endif /* EXEC_SH4_H */
target-sparc/cpu.h +1 -1
@@ -656,4 +656,4 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, #endif } -#endif +#endif /* CPU_SPARC_H */
target-sparc/exec.h +3 -2
@@ -1,5 +1,6 @@#ifndef EXEC_SPARC_H -#define EXEC_SPARC_H 1 +#define EXEC_SPARC_H +#include "config.h" #include "dyngen-exec.h"
@@ -28,4 +29,4 @@ static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb) env->npc = tb->cs_base; } -#endif +#endif /* EXEC_SPARC_H */
target-unicore32/cpu.h +3 -3
@@ -7,8 +7,8 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#ifndef __CPU_UC32_H__ -#define __CPU_UC32_H__ +#ifndef CPU_UC32_H +#define CPU_UC32_H #define TARGET_LONG_BITS 32#define TARGET_PAGE_BITS 12
@@ -179,4 +179,4 @@ void uc32_translate_init(void);void do_interrupt (CPUState *);void switch_mode (CPUState_UniCore32 *,int ); -#endif /* __CPU_UC32_H__ */ +#endif /* CPU_UC32_H */
target-unicore32/exec.h +3 -3
@@ -7,8 +7,8 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#ifndef __UC32_EXEC_H__ -#define __UC32_EXEC_H__ +#ifndef UC32_EXEC_H +#define UC32_EXEC_H #include "config.h" #include "dyngen-exec.h"
@@ -47,4 +47,4 @@ static inline int cpu_halted(CPUState *env) return EXCP_HALTED; } -#endif /* __UC32_EXEC_H__ */ +#endif /* UC32_EXEC_H */
targphys.h +1 -1
@@ -18,4 +18,4 @@ typedef uint64_t target_phys_addr_t;#endif #endif -#endif +#endif /* TARGPHYS_H */
tcg/tcg-runtime.h +1 -1
@@ -15,4 +15,4 @@ int64_t tcg_helper_rem_i64(int64_t arg1, int64_t arg2);uint64_t tcg_helper_divu_i64 (uint64_t arg1,uint64_t arg2);uint64_t tcg_helper_remu_i64 (uint64_t arg1,uint64_t arg2); -#endif +#endif /* TCG_RUNTIME_H */
thunk.h +1 -1
@@ -158,4 +158,4 @@ unsigned int target_to_host_bitmask(unsigned int x86_mask,unsigned int host_to_target_bitmask (unsigned int alpha_mask,const bitmask_transtbl * trans_tbl); -#endif +#endif /* THUNK_H */
uboot_image.h +3 -3
@@ -26,8 +26,8 @@******************************************************************** */ -#ifndef __UBOOT_IMAGE_H__ -#define __UBOOT_IMAGE_H__ +#ifndef UBOOT_IMAGE_H +#define UBOOT_IMAGE_H /* * Operating System Codes
@@ -155,4 +155,4 @@ typedef struct uboot_image_header { } uboot_image_header_t; -#endif /* __IMAGE_H__ */ +#endif /* UBOOT_IMAGE_H */
ui/keymaps.h +3 -3
@@ -22,8 +22,8 @@* THE SOFTWARE. */ -#ifndef __QEMU_KEYMAPS_H__ -#define __QEMU_KEYMAPS_H__ +#ifndef QEMU_KEYMAPS_H +#define QEMU_KEYMAPS_H #include "qemu-common.h"
@@ -74,4 +74,4 @@ int keysym2scancode(void *kbd_layout, int keysym);int keycode_is_keypad (void *kbd_layout,int keycode);int keysym_is_numlock (void *kbd_layout,int keysym); -#endif /* __QEMU_KEYMAPS_H__ */ +#endif /* QEMU_KEYMAPS_H */
ui/vnc-auth-sasl.h +3 -4
@@ -23,8 +23,8 @@*/ -#ifndef __QEMU_VNC_AUTH_SASL_H__ -#define __QEMU_VNC_AUTH_SASL_H__ +#ifndef QEMU_VNC_AUTH_SASL_H +#define QEMU_VNC_AUTH_SASL_H #include <sasl/sasl.h>
@@ -70,5 +70,4 @@ long vnc_client_write_sasl(VncState *vs);void start_auth_sasl (VncState *vs); -#endif /* __QEMU_VNC_AUTH_SASL_H__ */ - +#endif /* QEMU_VNC_AUTH_SASL_H */
ui/vnc-auth-vencrypt.h +3 -3
@@ -25,9 +25,9 @@*/ -#ifndef __QEMU_VNC_AUTH_VENCRYPT_H__ -#define __QEMU_VNC_AUTH_VENCRYPT_H__ +#ifndef QEMU_VNC_AUTH_VENCRYPT_H +#define QEMU_VNC_AUTH_VENCRYPT_H void start_auth_vencrypt (VncState *vs); -#endif /* __QEMU_VNC_AUTH_VENCRYPT_H__ */ +#endif /* QEMU_VNC_AUTH_VENCRYPT_H */
ui/vnc-enc-zrle.h +1 -1
@@ -37,4 +37,4 @@#define VNC_ZRLE_TILE_WIDTH 64#define VNC_ZRLE_TILE_HEIGHT 64 -#endif +#endif /* VNC_ENCODING_ZRLE_H */
ui/vnc-enc-zywrle.h +1 -1
@@ -656,4 +656,4 @@ static inline void zywrle_calc_size(int *w, int *h, int level) *h &= ~((1 << level) - 1); } -#endif +#endif /* VNC_ENCODING_ZYWRLE_H */
ui/vnc-tls.h +3 -4
@@ -25,8 +25,8 @@*/ -#ifndef __QEMU_VNC_TLS_H__ -#define __QEMU_VNC_TLS_H__ +#ifndef QEMU_VNC_TLS_H +#define QEMU_VNC_TLS_H #include <gnutls/gnutls.h> #include <gnutls/x509.h>
@@ -72,5 +72,4 @@ int vnc_tls_set_x509_creds_dir(VncDisplay *vd, const char *path); -#endif /* __QEMU_VNC_TLS_H__ */ - +#endif /* QEMU_VNC_TLS_H */
ui/vnc.h +3 -3
@@ -24,8 +24,8 @@* THE SOFTWARE. */ -#ifndef __QEMU_VNC_H -#define __QEMU_VNC_H +#ifndef QEMU_VNC_H +#define QEMU_VNC_H #include "qemu-common.h" #include "qemu-queue.h"
@@ -551,4 +551,4 @@ int vnc_zrle_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);int vnc_zywrle_send_framebuffer_update (VncState *vs,int x,int y,int w,int h);void vnc_zrle_clear (VncState *vs); -#endif /* __QEMU_VNC_H */ +#endif /* QEMU_VNC_H */
ui/x_keymap.h +1 -1
@@ -29,4 +29,4 @@ uint8_t translate_xfree86_keycode(const int key);uint8_t translate_evdev_keycode (const int key); -#endif +#endif /* QEMU_X_KEYMAP_H */
Signature · 1 line
1.7.5
Quoted 9 lines · Alexandre Raymond
As per ISO/IEC 9899, Section 7.1.3 on reserved identifiers, identifiers starting with an underscore are reserved.
Therefore:
1) Rename all incorrect header guardsWhile I'm at it:
2) Standardize header guards to "#ifndefSOMETHING_H"
3) Repeat the header guard identifier after the closing "#endif"
Nice. Could you also standardize the path component, for example hw/xyz.h -> HW_XYZ_H, or maybe rather QEMU_HW_XYZ_H?
Quoted 8 lines · Alexandre Raymond
As per ISO/IEC 9899, Section 7.1.3 on reserved identifiers, identifiers starting with an underscore are reserved.
Therefore:
1) Rename all incorrect header guardsWhile I'm at it:
2) Standardize header guards to "#ifndefSOMETHING_H"
Consistency is good.
Quoted 1 line
3) Repeat the header guard identifier after the closing "#endif"
Such comments can help readers to navigate #if mazes. Not the case for header guards. Just noise.
Quoted 16 lines · Alexandre Raymond
balloon.h +2
-2@@ -11,8 +11,8 @@* */ -#ifndef _QEMU_BALLOON_H -#define _QEMU_BALLOON_H +#ifndef QEMU_BALLOON_H +#define QEMU_BALLOON_H #include "monitor.h"
balloon.h int do_info_balloon(Monitor *mon, MonitorCompletion cb, void *opaque); · line 33
Quoted 5 lines
balloon.h +1
-1@@ -30,4 +30,4 @@ int do_info_balloon(Monitor *mon, MonitorCompletion cb, void *opaque); int do_balloon(Monitor *mon, const QDict *params, MonitorCompletion cb, void *opaque); -#endif +#endif /* QEMU_BALOON_H */
BALOON?
darwin-user/qemu.h static inline uint64_t get_int64_arg(int *i, CPUPPCState *cpu_env) · line 178
Quoted 10 lines
darwin-user/qemu.h +1
-1@@ -175,4 +175,4 @@ static inline uint64_t get_int64_arg(int *i, CPUPPCState *cpu_env) } #endif -#endif +#endif /* GEMU_H */
GEMU, looks like darwin-user/qemu.h typoed "QEMU"?
If you really want to do this, please use a script to convert the code consistently without errors. I don't have time to review long error-prone patches that have no external benefit for QEMU, sorry.
Stefan