diff options
author | Danny Kukawka <danny.kukawka@web.de> | 2006-08-16 18:43:39 +0200 |
---|---|---|
committer | Danny Kukawka <danny.kukawka@web.de> | 2006-08-16 18:43:39 +0200 |
commit | fc2d5aa046af0d4de600d48c92dce9017969057a (patch) | |
tree | 84dab0ab90edba0dfecc1886abe6ac9152aad548 | |
parent | fcb6aa0df90b7ee61a58c207896448131d3aa180 (diff) |
cleanup includes in hald/linux2/*
This cleanup the includes in the files under hald/linux/ . I removed not
needed and multiple included headers (-120 includes) and sorted/arranged
the remaining includes alphabetically.
25 files changed, 132 insertions, 258 deletions
diff --git a/hald/linux2/acpi.c b/hald/linux2/acpi.c index 0ce181d5..9f190b74 100644 --- a/hald/linux2/acpi.c +++ b/hald/linux2/acpi.c @@ -28,14 +28,13 @@ #include <string.h> #include "../device_info.h" -#include "../logger.h" #include "../hald_dbus.h" +#include "../logger.h" #include "../util.h" #include "osspec_linux.h" #include "acpi.h" -#include "hotplug.h" enum { ACPI_TYPE_BATTERY, diff --git a/hald/linux2/addons/addon-acpi-buttons-toshiba.c b/hald/linux2/addons/addon-acpi-buttons-toshiba.c index b1002805..908cf4ec 100644 --- a/hald/linux2/addons/addon-acpi-buttons-toshiba.c +++ b/hald/linux2/addons/addon-acpi-buttons-toshiba.c @@ -29,11 +29,12 @@ # include <config.h> #endif +#include <linux/input.h> #include <stdio.h> -#include <unistd.h> #include <stdlib.h> #include <string.h> -#include <linux/input.h> +#include <unistd.h> + #include <glib/gmain.h> #include "libhal/libhal.h" diff --git a/hald/linux2/addons/addon-acpi.c b/hald/linux2/addons/addon-acpi.c index 9025e530..220d71d7 100644 --- a/hald/linux2/addons/addon-acpi.c +++ b/hald/linux2/addons/addon-acpi.c @@ -26,16 +26,14 @@ # include <config.h> #endif +#include <errno.h> #include <stdio.h> #include <stdlib.h> -#include <unistd.h> -#include <errno.h> #include <string.h> -#include <sys/types.h> -#include <sys/stat.h> #include <sys/socket.h> +#include <sys/types.h> #include <sys/un.h> -#include <fcntl.h> +#include <unistd.h> #include "libhal/libhal.h" diff --git a/hald/linux2/addons/addon-hid-ups.c b/hald/linux2/addons/addon-hid-ups.c index ffc4c65b..4a47db22 100644 --- a/hald/linux2/addons/addon-hid-ups.c +++ b/hald/linux2/addons/addon-hid-ups.c @@ -34,19 +34,17 @@ # include <config.h> #endif +/* asm/types.h required for __s32 in linux/hiddev.h */ +#include <asm/types.h> #include <errno.h> -#include <string.h> -#include <stdlib.h> +#include <fcntl.h> +#include <linux/hiddev.h> +#include <stdint.h> #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <sys/ioctl.h> -#include <stdint.h> -#include <sys/stat.h> -#include <stdint.h> -#include <fcntl.h> #include <unistd.h> -/* asm/types.h required for __s32 in linux/hiddev.h */ -#include <asm/types.h> -#include <linux/hiddev.h> #include "libhal/libhal.h" diff --git a/hald/linux2/addons/addon-keyboard.c b/hald/linux2/addons/addon-keyboard.c index 8d235274..29afcb0e 100644 --- a/hald/linux2/addons/addon-keyboard.c +++ b/hald/linux2/addons/addon-keyboard.c @@ -30,13 +30,8 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> -#include <errno.h> #include <string.h> #include <sys/types.h> -#include <sys/stat.h> -#include <sys/socket.h> -#include <sys/un.h> -#include <fcntl.h> #include <linux/input.h> #include "libhal/libhal.h" diff --git a/hald/linux2/addons/addon-macbookpro-backlight.c b/hald/linux2/addons/addon-macbookpro-backlight.c index 974de012..c97211bb 100644 --- a/hald/linux2/addons/addon-macbookpro-backlight.c +++ b/hald/linux2/addons/addon-macbookpro-backlight.c @@ -25,21 +25,19 @@ **************************************************************************/ #include <config.h> +#include <fcntl.h> #include <stdio.h> - -#include <glib/gmain.h> -#include <dbus/dbus-glib.h> -#include <dbus/dbus-glib-lowlevel.h> - -#include <sys/io.h> #include <stdlib.h> #include <string.h> +#include <sys/io.h> #include <sys/mman.h> #include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <unistd.h> #include <pci/pci.h> +#include <unistd.h> + +#include <glib/gmain.h> +#include <dbus/dbus-glib.h> +#include <dbus/dbus-glib-lowlevel.h> #include "libhal/libhal.h" #include "../probing/shared.h" diff --git a/hald/linux2/addons/addon-pmu.c b/hald/linux2/addons/addon-pmu.c index 278e5864..2cbacce6 100644 --- a/hald/linux2/addons/addon-pmu.c +++ b/hald/linux2/addons/addon-pmu.c @@ -25,18 +25,15 @@ # include <config.h> #endif -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> #include <errno.h> -#include <string.h> -#include <stdint.h> -#include <sys/stat.h> -#include <sys/socket.h> -#include <sys/un.h> #include <fcntl.h> #include <linux/adb.h> #include <linux/pmu.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> #include "libhal/libhal.h" diff --git a/hald/linux2/addons/addon-storage.c b/hald/linux2/addons/addon-storage.c index e725cba7..83f44285 100644 --- a/hald/linux2/addons/addon-storage.c +++ b/hald/linux2/addons/addon-storage.c @@ -28,21 +28,17 @@ #endif #include <errno.h> -#include <string.h> -#include <stdlib.h> -#include <stdio.h> -#include <sys/ioctl.h> -#include <stdint.h> -#include <sys/stat.h> -#include <stdint.h> -#include <sys/wait.h> #include <fcntl.h> -#include <unistd.h> -#include <linux/kdev_t.h> #include <linux/cdrom.h> #include <linux/fs.h> #include <mntent.h> #include <scsi/sg.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/ioctl.h> +#include <unistd.h> #include "libhal/libhal.h" diff --git a/hald/linux2/apm.c b/hald/linux2/apm.c index d0254fb4..4d74d86a 100644 --- a/hald/linux2/apm.c +++ b/hald/linux2/apm.c @@ -26,15 +26,14 @@ #include <string.h> +#include "../hald_dbus.h" #include "../device_info.h" #include "../logger.h" -#include "../hald_dbus.h" #include "../util.h" #include "osspec_linux.h" #include "apm.h" -#include "hotplug.h" enum { APM_TYPE_BATTERY, diff --git a/hald/linux2/blockdev.c b/hald/linux2/blockdev.c index 5cbf025a..2eb98990 100644 --- a/hald/linux2/blockdev.c +++ b/hald/linux2/blockdev.c @@ -26,49 +26,33 @@ # include <config.h> #endif -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <mntent.h> -#include <errno.h> -#include <stdint.h> -#include <sys/stat.h> -#include <sys/socket.h> -#include <sys/un.h> -#include <sys/utsname.h> -#include <unistd.h> #include <ctype.h> -#include <unistd.h> -#include <linux/kdev_t.h> - #include <limits.h> -#include <errno.h> +#include <linux/kdev_t.h> +#include <mntent.h> #include <stdint.h> +#include <stdlib.h> +#include <string.h> #include <sys/stat.h> -#include <sys/file.h> -#include <sys/ioctl.h> -#include <fcntl.h> #include <syslog.h> +#include <unistd.h> -#include <glib.h> #include <dbus/dbus.h> #include <dbus/dbus-glib.h> -#include "../osspec.h" -#include "../logger.h" -#include "../hald.h" #include "../device_info.h" +#include "../hald.h" #include "../hald_dbus.h" -#include "../util.h" #include "../hald_runner.h" - -#include "osspec_linux.h" +#include "../logger.h" +#include "../osspec.h" +#include "../util.h" #include "coldplug.h" +#include "hotplug.h" #include "hotplug_helper.h" +#include "osspec_linux.h" -#include "hotplug.h" #include "blockdev.h" /*--------------------------------------------------------------------------------------------------------------*/ diff --git a/hald/linux2/classdev.c b/hald/linux2/classdev.c index 6a896bfa..3e3a6679 100644 --- a/hald/linux2/classdev.c +++ b/hald/linux2/classdev.c @@ -29,50 +29,30 @@ # include <config.h> #endif -#include <stdio.h> +#include <ctype.h> +#include <limits.h> +#include <linux/types.h> +#include <net/if_arp.h> /* for ARPHRD_... */ #include <stdlib.h> -#include <stdarg.h> #include <string.h> -#include <mntent.h> -#include <errno.h> #include <stdint.h> -#include <sys/stat.h> -#include <sys/socket.h> -#include <sys/un.h> -#include <sys/utsname.h> -#include <unistd.h> -#include <ctype.h> #include <unistd.h> -#include <limits.h> -#include <errno.h> -#include <stdint.h> -#include <sys/stat.h> -#include <sys/ioctl.h> -#include <fcntl.h> -#include <net/if_arp.h> /* for ARPHRD_... */ -#include <sys/socket.h> -#include <linux/types.h> -#include <net/if.h> - -#include <glib.h> #include <dbus/dbus.h> #include <dbus/dbus-glib.h> -#include "../osspec.h" -#include "../logger.h" -#include "../hald.h" #include "../device_info.h" #include "../device_store.h" -#include "../util.h" +#include "../hald.h" #include "../hald_runner.h" - -#include "osspec_linux.h" +#include "../logger.h" +#include "../osspec.h" +#include "../util.h" #include "coldplug.h" #include "hotplug_helper.h" +#include "osspec_linux.h" -#include "hotplug.h" #include "classdev.h" /*--------------------------------------------------------------------------------------------------------------*/ diff --git a/hald/linux2/coldplug.c b/hald/linux2/coldplug.c index df757857..e47a90f5 100644 --- a/hald/linux2/coldplug.c +++ b/hald/linux2/coldplug.c @@ -27,28 +27,25 @@ # include <config.h> #endif +#include <stdint.h> #include <stdio.h> #include <string.h> -#include <mntent.h> -#include <errno.h> -#include <stdint.h> #include <sys/stat.h> #include <unistd.h> -#include <glib.h> #include <dbus/dbus.h> #include <dbus/dbus-glib.h> -#include "../osspec.h" -#include "../logger.h" -#include "../hald.h" #include "../device_info.h" +#include "../hald.h" +#include "../logger.h" +#include "../osspec.h" #include "../util.h" #include "osspec_linux.h" +#include "hotplug.h" #include "coldplug.h" -#include "hotplug.h" #define DMPREFIX "dm-" diff --git a/hald/linux2/hotplug.c b/hald/linux2/hotplug.c index 50d7ffa4..4eac8b9e 100644 --- a/hald/linux2/hotplug.c +++ b/hald/linux2/hotplug.c @@ -28,36 +28,28 @@ #endif #include <ctype.h> -#include <stdio.h> -#include <string.h> -#include <mntent.h> -#include <errno.h> #include <stdint.h> -#include <sys/stat.h> -#include <sys/socket.h> -#include <sys/un.h> -#include <sys/utsname.h> +#include <string.h> #include <unistd.h> -#include <glib.h> #include <dbus/dbus.h> #include <dbus/dbus-glib.h> -#include "../osspec.h" -#include "../logger.h" -#include "../hald.h" #include "../device_info.h" +#include "../hald.h" +#include "../logger.h" +#include "../osspec.h" -#include "osspec_linux.h" - -#include "hotplug.h" -#include "physdev.h" -#include "classdev.h" -#include "blockdev.h" #include "acpi.h" #include "apm.h" +#include "blockdev.h" +#include "classdev.h" +#include "osspec_linux.h" +#include "physdev.h" #include "pmu.h" +#include "hotplug.h" + /** Queue of ordered hotplug events */ GQueue *hotplug_event_queue; diff --git a/hald/linux2/ids.c b/hald/linux2/ids.c index cf7638e6..35dcec2a 100644 --- a/hald/linux2/ids.c +++ b/hald/linux2/ids.c @@ -28,18 +28,10 @@ #endif #include <ctype.h> -#include <stdio.h> -#include <string.h> -#include <mntent.h> -#include <errno.h> #include <stdint.h> -#include <sys/stat.h> -#include <sys/socket.h> -#include <sys/un.h> -#include <sys/utsname.h> +#include <string.h> #include <unistd.h> -#include <glib.h> #include <dbus/dbus.h> #include <dbus/dbus-glib.h> diff --git a/hald/linux2/osspec.c b/hald/linux2/osspec.c index 395043b2..9571d250 100644 --- a/hald/linux2/osspec.c +++ b/hald/linux2/osspec.c @@ -32,52 +32,37 @@ #define _GNU_SOURCE 1 #include <ctype.h> -#include <stdio.h> +#include <errno.h> +#include <limits.h> +#include <linux/types.h> +#include <net/if_arp.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> -#include <getopt.h> -#include <assert.h> -#include <unistd.h> -#include <stdarg.h> -#include <limits.h> -#include <errno.h> -#include <mntent.h> -#include <signal.h> +#include <sys/stat.h> #include <sys/un.h> #include <sys/utsname.h> #include <unistd.h> -#include <stdint.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <sys/ioctl.h> -#include <fcntl.h> -#include <net/if_arp.h> -#include <sys/socket.h> -#include <linux/types.h> -#include <sys/ioctl.h> -#include <net/if.h> -#include <sys/ioctl.h> -#include <net/if.h> -#include <glib.h> #include <dbus/dbus.h> #include <dbus/dbus-glib.h> -#include "../osspec.h" -#include "../logger.h" +#include "../device_info.h" #include "../hald.h" #include "../hald_dbus.h" #include "../hald_runner.h" -#include "../device_info.h" +#include "../logger.h" +#include "../osspec.h" #include "../util.h" -#include "hotplug.h" -#include "coldplug.h" -#include "ids.h" #include "acpi.h" #include "apm.h" -#include "pmu.h" #include "blockdev.h" +#include "coldplug.h" +#include "hotplug.h" +#include "ids.h" +#include "pmu.h" + #include "osspec_linux.h" static char *hal_sysfs_path; diff --git a/hald/linux2/physdev.c b/hald/linux2/physdev.c index 4679a9f8..9d5b3668 100644 --- a/hald/linux2/physdev.c +++ b/hald/linux2/physdev.c @@ -27,37 +27,27 @@ # include <config.h> #endif -#include <stdio.h> #include <string.h> -#include <mntent.h> -#include <errno.h> #include <stdint.h> -#include <sys/stat.h> -#include <sys/socket.h> -#include <sys/un.h> -#include <sys/utsname.h> #include <unistd.h> -#include <glib.h> #include <dbus/dbus.h> #include <dbus/dbus-glib.h> -#include "../osspec.h" -#include "../logger.h" -#include "../hald.h" #include "../device_info.h" +#include "../hald.h" +#include "../logger.h" +#include "../osspec.h" #include "../util.h" #include "coldplug.h" -#include "hotplug_helper.h" - #include "hotplug.h" -#include "physdev.h" - +#include "hotplug_helper.h" #include "ids.h" - #include "osspec_linux.h" +#include "physdev.h" + /*--------------------------------------------------------------------------------------------------------------*/ static HalDevice * diff --git a/hald/linux2/pmu.c b/hald/linux2/pmu.c index 9f554acd..901e48eb 100644 --- a/hald/linux2/pmu.c +++ b/hald/linux2/pmu.c @@ -31,14 +31,14 @@ #include <unistd.h> #include "../device_info.h" -#include "../logger.h" #include "../hald_dbus.h" +#include "../logger.h" #include "../util.h" +#include "hotplug.h" #include "osspec_linux.h" #include "pmu.h" -#include "hotplug.h" enum { PMU_TYPE_BATTERY, diff --git a/hald/linux2/probing/probe-hiddev.c b/hald/linux2/probing/probe-hiddev.c index 9e8839b8..fbc1861a 100644 --- a/hald/linux2/probing/probe-hiddev.c +++ b/hald/linux2/probing/probe-hiddev.c @@ -27,19 +27,15 @@ # include <config.h> #endif -#include <errno.h> -#include <string.h> -#include <stdlib.h> -#include <stdio.h> -#include <sys/ioctl.h> -#include <stdint.h> -#include <sys/stat.h> -#include <stdint.h> -#include <fcntl.h> -#include <unistd.h> /* asm/types.h required for __s32 in linux/hiddev.h */ #include <asm/types.h> +#include <fcntl.h> #include <linux/hiddev.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <unistd.h> #include "libhal/libhal.h" diff --git a/hald/linux2/probing/probe-input.c b/hald/linux2/probing/probe-input.c index 9e8191c6..0c921ac3 100644 --- a/hald/linux2/probing/probe-input.c +++ b/hald/linux2/probing/probe-input.c @@ -27,17 +27,15 @@ # include <config.h> #endif +#include <errno.h> +#include <fcntl.h> +#include <linux/input.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <errno.h> -#include <stdint.h> -#include <sys/stat.h> -#include <fcntl.h> #include <unistd.h> -#include <linux/input.h> - #include "libhal/libhal.h" #include "shared.h" diff --git a/hald/linux2/probing/probe-pc-floppy.c b/hald/linux2/probing/probe-pc-floppy.c index 35b5567f..0a48c846 100644 --- a/hald/linux2/probing/probe-pc-floppy.c +++ b/hald/linux2/probing/probe-pc-floppy.c @@ -27,20 +27,15 @@ # include <config.h> #endif -#include <errno.h> -#include <string.h> -#include <stdlib.h> +#include <fcntl.h> +#include <linux/fd.h> +#include <linux/kdev_t.h> +#include <stdint.h> #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <sys/ioctl.h> -#include <stdint.h> -#include <sys/stat.h> -#include <stdint.h> -#include <fcntl.h> #include <unistd.h> -#include <linux/kdev_t.h> -#include <linux/cdrom.h> -#include <linux/fs.h> -#include <linux/fd.h> #include "libhal/libhal.h" diff --git a/hald/linux2/probing/probe-printer.c b/hald/linux2/probing/probe-printer.c index d97dfe78..0da9c603 100644 --- a/hald/linux2/probing/probe-printer.c +++ b/hald/linux2/probing/probe-printer.c @@ -25,15 +25,12 @@ # include <config.h> #endif -#include <errno.h> -#include <string.h> -#include <stdlib.h> +#include <fcntl.h> +#include <stdint.h> #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <sys/ioctl.h> -#include <stdint.h> -#include <sys/stat.h> -#include <stdint.h> -#include <fcntl.h> #include <unistd.h> #include <glib.h> diff --git a/hald/linux2/probing/probe-serial.c b/hald/linux2/probing/probe-serial.c index e0e617e3..3f53ef2c 100644 --- a/hald/linux2/probing/probe-serial.c +++ b/hald/linux2/probing/probe-serial.c @@ -28,17 +28,14 @@ # include <config.h> #endif -#include <errno.h> -#include <string.h> -#include <stdlib.h> +#include <fcntl.h> +#include <linux/serial.h> +#include <stdint.h> #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <sys/ioctl.h> -#include <stdint.h> -#include <sys/stat.h> -#include <stdint.h> -#include <fcntl.h> #include <unistd.h> -#include <linux/serial.h> #include "libhal/libhal.h" diff --git a/hald/linux2/probing/probe-smbios.c b/hald/linux2/probing/probe-smbios.c index d44f09e7..6e20a684 100644 --- a/hald/linux2/probing/probe-smbios.c +++ b/hald/linux2/probing/probe-smbios.c @@ -28,14 +28,12 @@ # include <config.h> #endif +#include <ctype.h> +#include <fcntl.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> -#include <stdint.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <unistd.h> #include <string.h> -#include <ctype.h> #include "libhal/libhal.h" #include "shared.h" diff --git a/hald/linux2/probing/probe-storage.c b/hald/linux2/probing/probe-storage.c index 74f8bab4..fe6da9fc 100644 --- a/hald/linux2/probing/probe-storage.c +++ b/hald/linux2/probing/probe-storage.c @@ -28,21 +28,18 @@ # include <config.h> #endif +#include <ctype.h> #include <errno.h> -#include <string.h> -#include <stdlib.h> -#include <stdio.h> -#include <sys/ioctl.h> -#include <stdint.h> -#include <sys/stat.h> -#include <stdint.h> #include <fcntl.h> -#include <unistd.h> -#include <ctype.h> #include <linux/kdev_t.h> #include <linux/cdrom.h> #include <linux/fs.h> #include <mntent.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/ioctl.h> #include <glib.h> #include <libvolume_id.h> diff --git a/hald/linux2/probing/probe-volume.c b/hald/linux2/probing/probe-volume.c index 4244652e..58817659 100644 --- a/hald/linux2/probing/probe-volume.c +++ b/hald/linux2/probing/probe-volume.c @@ -28,22 +28,17 @@ # include <config.h> #endif +#include <ctype.h> #include <errno.h> -#include <string.h> -#include <stdlib.h> -#include <stdio.h> -#include <sys/ioctl.h> -#include <stdint.h> -#include <sys/stat.h> -#include <stdint.h> #include <fcntl.h> -#include <unistd.h> -#include <ctype.h> -#include <linux/kdev_t.h> #include <linux/cdrom.h> #include <linux/fs.h> -#include <time.h> -#include <sys/time.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/ioctl.h> +#include <unistd.h> #include <glib.h> #include <libvolume_id.h> |