summaryrefslogtreecommitdiffstats
path: root/sysutils/hal/files
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2006-07-02 13:22:54 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2006-07-02 13:22:54 +0800
commit2aceec11569c26e3fa1621dec6d13ca1c9b3042c (patch)
tree03fccb38014d7ca3b7c03693ef7ca380d6945fa7 /sysutils/hal/files
parentbfd75e3b00ee6017da057d9be9d49d67e91a02c6 (diff)
downloadmarcuscom-ports-2aceec11569c26e3fa1621dec6d13ca1c9b3042c.tar
marcuscom-ports-2aceec11569c26e3fa1621dec6d13ca1c9b3042c.tar.gz
marcuscom-ports-2aceec11569c26e3fa1621dec6d13ca1c9b3042c.tar.bz2
marcuscom-ports-2aceec11569c26e3fa1621dec6d13ca1c9b3042c.tar.lz
marcuscom-ports-2aceec11569c26e3fa1621dec6d13ca1c9b3042c.tar.xz
marcuscom-ports-2aceec11569c26e3fa1621dec6d13ca1c9b3042c.tar.zst
marcuscom-ports-2aceec11569c26e3fa1621dec6d13ca1c9b3042c.zip
Fix the build on 5.X.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@6504 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/hal/files')
-rw-r--r--sysutils/hal/files/patch-hald_freebsd_hf-acpi.c24
-rw-r--r--sysutils/hal/files/patch-hald_freebsd_hf-ata.c94
-rw-r--r--sysutils/hal/files/patch-hald_freebsd_libprobe_hfp-cdrom.c6
3 files changed, 122 insertions, 2 deletions
diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c b/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c
new file mode 100644
index 000000000..546402294
--- /dev/null
+++ b/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c
@@ -0,0 +1,24 @@
+--- hald/freebsd/hf-acpi.c 4 May 2006 23:14:44 -0000 1.50
++++ hald/freebsd/hf-acpi.c 2 Jul 2006 04:38:34 -0000
+@@ -114,13 +114,21 @@
+ return;
+ }
+
++#ifdef ACPIIO_BATT_GET_BIF
+ if (ioctl(fd, ACPIIO_BATT_GET_BIF, &battif) == -1)
++#else
++ if (ioctl(fd, ACPIIO_CMBAT_GET_BIF, &battif) == -1)
++#endif
+ {
+ HAL_WARNING(("ioctl ACPIIO_BATT_GET_BIF failed for battery %d: %s",
+ battif.unit, g_strerror(errno)));
+ goto end;
+ }
++#ifdef ACPIIO_BATT_GET_BST
+ if (ioctl(fd, ACPIIO_BATT_GET_BST, &battst) == -1)
++#else
++ if (ioctl(fd, ACPIIO_CMBAT_GET_BST, &battst) == -1)
++#endif
+ {
+ HAL_WARNING(("ioctl ACPIIO_BATT_GET_BST failed for battery %d: %s",
+ battst.unit, g_strerror(errno)));
diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-ata.c b/sysutils/hal/files/patch-hald_freebsd_hf-ata.c
new file mode 100644
index 000000000..eabb4f1b0
--- /dev/null
+++ b/sysutils/hal/files/patch-hald_freebsd_hf-ata.c
@@ -0,0 +1,94 @@
+--- hald/freebsd/hf-ata.c 7 May 2006 00:27:55 -0000 1.35
++++ hald/freebsd/hf-ata.c 2 Jul 2006 05:15:18 -0000
+@@ -87,7 +87,11 @@
+ static HalDevice *
+ hf_ata_block_device_new (HalDevice *parent,
+ int ms,
++#ifdef IOCATADEVICES
+ const struct ata_ioc_devices *devices)
++#else
++ const struct ata_cmd *devices)
++#endif
+ {
+ HalDevice *device;
+ const struct ata_params *params;
+@@ -96,14 +100,26 @@
+ g_return_val_if_fail(HAL_IS_DEVICE(parent), NULL);
+ g_return_val_if_fail(devices != NULL, NULL);
+
++#ifdef IOCATADEVICES
+ params = &devices->params[ms];
++#else
++ params = &devices->u.param.params[ms];
++#endif
+ vendor = hf_ata_get_vendor(params->model);
+
+ device = hf_device_new(parent);
+
++#ifdef IOCATADEVICES
+ hf_devtree_device_set_name(device, devices->name[ms]);
++#else
++ hf_devtree_device_set_name(device, devices->u.param.name[ms]);
++#endif
+
++#ifdef IOCATADEVICES
+ hf_block_device_enable(device, devices->name[ms]);
++#else
++ hf_block_device_enable(device, devices->u.param.name[ms]);
++#endif
+ hf_storage_device_enable(device);
+
+ hal_device_property_set_string(device, "info.product", params->model);
+@@ -148,20 +164,40 @@
+ static void
+ hf_ata_probe_devices (HalDevice *ide_host)
+ {
++#ifdef IOCATADEVICES
+ struct ata_ioc_devices devices;
++#else
++ struct ata_cmd devices;
++#endif
+ int i;
+
+ g_return_if_fail(HAL_IS_DEVICE(ide_host));
+
++#ifdef IOCATADEVICES
+ devices.channel = hal_device_property_get_int(ide_host, "ide_host.number");
+ if (ioctl(hf_ata_fd, IOCATADEVICES, &devices) < 0)
+ {
+ HAL_WARNING(("unable to probe devices of ATA channel %i: %s", devices.channel, g_strerror(errno)));
+ return;
+ }
++#else
++ memset(&devices, 0, sizeof(devices));
++ devices.cmd = ATAGPARM;
++ devices.device = -1;
++ devices.channel = hal_device_property_get_int(ide_host, "ide_host.number");
++ if (ioctl(hf_ata_fd, IOCATA, &devices) < 0)
++ {
++ HAL_WARNING(("unable to probe devices of ATA channel %i: %s", devices.channel, g_strerror(errno)));
++ return;
++ }
++#endif
+
+ for (i = 0; i < 2; i++)
++#ifdef IOCATADEVICES
+ if (*devices.name[i])
++#else
++ if (*devices.u.param.name[i])
++#endif
+ {
+ HalDevice *ide_device;
+
+@@ -176,7 +212,11 @@
+ }
+
+ if (! hal_device_property_get_bool(ide_device, "info.ignore")
++#ifdef IOCATADEVICES
+ && ! hf_devtree_find_from_name(hald_get_gdl(), devices.name[i]))
++#else
++ && ! hf_devtree_find_from_name(hald_get_gdl(), devices.u.param.name[i]))
++#endif
+ {
+ HalDevice *block_device;
+
diff --git a/sysutils/hal/files/patch-hald_freebsd_libprobe_hfp-cdrom.c b/sysutils/hal/files/patch-hald_freebsd_libprobe_hfp-cdrom.c
index f2d3786e6..5fad5f5b4 100644
--- a/sysutils/hal/files/patch-hald_freebsd_libprobe_hfp-cdrom.c
+++ b/sysutils/hal/files/patch-hald_freebsd_libprobe_hfp-cdrom.c
@@ -1,5 +1,5 @@
--- hald/freebsd/libprobe/hfp-cdrom.c 7 May 2006 00:27:55 -0000 1.4
-+++ hald/freebsd/libprobe/hfp-cdrom.c 2 Jul 2006 04:20:47 -0000 1.5
++++ hald/freebsd/libprobe/hfp-cdrom.c 2 Jul 2006 05:08:24 -0000 1.6
@@ -112,6 +112,7 @@
if (cdrom->fd >= 0) /* ATAPI transport */
@@ -8,7 +8,7 @@
struct ata_ioc_request req;
memset(&req, 0, sizeof(req));
-@@ -140,6 +141,36 @@
+@@ -140,6 +141,38 @@
*err = hfp_strdup_printf("ATAPI error %i", req.error);
return FALSE;
}
@@ -18,6 +18,8 @@
+ memset(&iocmd, 0, sizeof(iocmd));
+ iocmd.u.request.flags = ATA_CMD_ATAPI;
+ iocmd.u.request.timeout = timeout;
++ iocmd.cmd = ATAREQUEST;
++ iocmd.device = -1;
+ memcpy(iocmd.u.request.u.atapi.ccb, ccb, 16);
+
+ if (data)