summaryrefslogtreecommitdiff
path: root/sysutils/hal
diff options
context:
space:
mode:
authorreinoud <reinoud>2008-12-11 15:05:01 +0000
committerreinoud <reinoud>2008-12-11 15:05:01 +0000
commitb4d64a3b457cca9f689c841809187d74a7c8794b (patch)
treee1f43a087b61c0f73bfa17f3e08db6edfc6d576e /sysutils/hal
parentc02247ec70af57402100de4701a5facc0ce8502a (diff)
downloadpkgsrc-b4d64a3b457cca9f689c841809187d74a7c8794b.tar.gz
Add rudementary cdrom HAL info. Probing and volume management needs to be
implemented still.
Diffstat (limited to 'sysutils/hal')
-rw-r--r--sysutils/hal/Makefile4
-rw-r--r--sysutils/hal/files/hald-netbsd/Makefile.am7
-rw-r--r--sysutils/hal/files/hald-netbsd/addons/addon-storage.c8
-rw-r--r--sysutils/hal/files/hald-netbsd/devinfo.c4
-rw-r--r--sysutils/hal/files/hald-netbsd/osspec_netbsd.h2
5 files changed, 16 insertions, 9 deletions
diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile
index efdde8af97e..ad4dff5fef6 100644
--- a/sysutils/hal/Makefile
+++ b/sysutils/hal/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.18 2008/12/08 20:26:13 ahoka Exp $
+# $NetBSD: Makefile,v 1.19 2008/12/11 15:05:01 reinoud Exp $
#
DISTNAME= hal-0.5.11
-PKGREVISION= 13
+PKGREVISION= 14
CATEGORIES= sysutils
MASTER_SITES= http://hal.freedesktop.org/releases/
EXTRACT_SUFX= .tar.bz2
diff --git a/sysutils/hal/files/hald-netbsd/Makefile.am b/sysutils/hal/files/hald-netbsd/Makefile.am
index 6f278ee4e8c..c5ba9a9163c 100644
--- a/sysutils/hal/files/hald-netbsd/Makefile.am
+++ b/sysutils/hal/files/hald-netbsd/Makefile.am
@@ -18,7 +18,10 @@ libhald_netbsd_la_SOURCES = \
osspec.c drvctl.c envsys.c vfsstat.c \
devinfo.c devinfo_misc.c devinfo_audio.c devinfo_video.c \
devinfo_mass.c \
- hotplug.c hal-file-monitor.c
-# devinfo_pci.c devinfo_storage.c devinfo_usb.c
+ hotplug.c hal-file-monitor.c \
+ devinfo_optical.c
+# devinfo_scsipi.c
+# devinfo_usb.c \
+# devinfo_pci.c
libhald_netbsd_la_LDFLAGS = -lprop @VOLUME_ID_LIBS@
diff --git a/sysutils/hal/files/hald-netbsd/addons/addon-storage.c b/sysutils/hal/files/hald-netbsd/addons/addon-storage.c
index 493430c086c..4a24551a033 100644
--- a/sysutils/hal/files/hald-netbsd/addons/addon-storage.c
+++ b/sysutils/hal/files/hald-netbsd/addons/addon-storage.c
@@ -18,6 +18,7 @@
#include <strings.h>
#include <stdlib.h>
#include <stdio.h>
+#include <syslog.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -60,7 +61,7 @@ scsi_test_unit_ready (int fd)
req.databuf = NULL;
req.datalen = 0;
req.timeout = 10000;
- req.flags = 0;
+ req.flags = SCCMD_READ;
req.senselen = SENSEBUFLEN;
if (ioctl(fd, SCIOCCOMMAND, &req) == -1)
@@ -224,7 +225,7 @@ main (int argc, char *argv[])
goto out;
if ((device_file = getenv ("HAL_PROP_BLOCK_DEVICE")) == NULL)
goto out;
- if ((raw_device_file = getenv ("HAL_PROP_BLOCK_SOLARIS_RAW_DEVICE")) == NULL)
+ if ((raw_device_file = getenv ("HAL_PROP_BLOCK_NETBSD_RAW_DEVICE")) == NULL)
goto out;
if ((bus = getenv ("HAL_PROP_STORAGE_BUS")) == NULL)
goto out;
@@ -263,12 +264,11 @@ main (int argc, char *argv[])
* keeps media constantly spun up. All this needs more thought.
*/
for (;;) {
+ sleep (SLEEP_PERIOD);
if (is_mounted (device_file)) {
close_device (&fd);
- sleep (SLEEP_PERIOD);
} else if ((fd < 0) && ((fd = open (raw_device_file, O_RDONLY | O_NONBLOCK)) < 0)) {
HAL_DEBUG (("open failed for %s: %s", raw_device_file, strerror (errno)));
- sleep (SLEEP_PERIOD);
} else {
/* Check if a disc is in the drive */
state = scsi_test_unit_ready (fd);
diff --git a/sysutils/hal/files/hald-netbsd/devinfo.c b/sysutils/hal/files/hald-netbsd/devinfo.c
index a92f4929fa2..7e473836756 100644
--- a/sysutils/hal/files/hald-netbsd/devinfo.c
+++ b/sysutils/hal/files/hald-netbsd/devinfo.c
@@ -36,6 +36,8 @@
#include "devinfo_usb.h"
#include "devinfo_misc.h"
#include "devinfo_cpu.h"
+#include "devinfo_optical.h"
+/* #include "devinfo_scsipi.h" */
#include "drvctl.h"
void devinfo_add_subtree(HalDevice *parent, const char *devnode, gboolean is_root);
@@ -142,7 +144,9 @@ devinfo_set_default_properties (HalDevice *d, HalDevice *parent, const char *dev
static DevinfoDevHandler *devinfo_handlers[] = {
&devinfo_computer_handler,
&devinfo_cpu_handler,
+ &devinfo_optical_handler,
#if notyet
+ &devinfo_scsipi_handler,
&devinfo_ide_handler,
&devinfo_scsi_handler,
&devinfo_floppy_handler,
diff --git a/sysutils/hal/files/hald-netbsd/osspec_netbsd.h b/sysutils/hal/files/hald-netbsd/osspec_netbsd.h
index 5a1bed810f3..13ba3277118 100644
--- a/sysutils/hal/files/hald-netbsd/osspec_netbsd.h
+++ b/sysutils/hal/files/hald-netbsd/osspec_netbsd.h
@@ -18,4 +18,4 @@ void hotplug_queue_now_empty (void);
HalDevice *hal_util_find_closest_ancestor (const gchar *devfs_path, gchar **ancestor_devfs_path, gchar **hotplug_devfs_path);
char *dsk_to_rdsk(char *);
-#endif /* OSSPEC_SOLARIS_H */
+#endif /* OSSPEC_NETBSD_H */