hal: Branch 'master' - 4 commits

Martin Pitt martin at kemper.freedesktop.org
Tue May 12 05:28:38 PDT 2009


 hald/freebsd/hf-pci.c             |    2 -
 hald/freebsd/hf-storage.c         |    1 
 hald/freebsd/libprobe/hfp-cdrom.h |   42 +++++++++++++++++++-------------------
 tools/hal-system-power-pmu.c      |    6 ++---
 tools/hal-system-sonypic.c        |    6 ++---
 5 files changed, 28 insertions(+), 29 deletions(-)

New commits:
commit 4213118c5769620b51f396125a1f459cc71f0d37
Author: Aurelien Jarno <aurelien at aurel32.net>
Date:   Tue May 12 14:28:02 2009 +0200

    hald/freebsd/libprobe/hfp-cdrom.h: use C99 types
    
    Use C99 types from <stdint.h> instead of non standard types from
    <sys/types.h>.

diff --git a/hald/freebsd/libprobe/hfp-cdrom.h b/hald/freebsd/libprobe/hfp-cdrom.h
index 5ad7595..329d58f 100644
--- a/hald/freebsd/libprobe/hfp-cdrom.h
+++ b/hald/freebsd/libprobe/hfp-cdrom.h
@@ -28,7 +28,7 @@
 #  include <config.h>
 #endif
 
-#include <sys/types.h>
+#include <stdint.h>
 
 #include "hfp.h"
 
@@ -53,8 +53,8 @@ enum
 typedef struct
 {
   /* mode page data header */
-  u_int16_t   data_length;
-  u_int8_t    medium_type;
+  uint16_t   data_length;
+  uint8_t    medium_type;
 #define HFP_CDROM_MST_TYPE_MASK_LOW	0x0f
 #define HFP_CDROM_MST_FMT_NONE		0x00
 #define HFP_CDROM_MST_DATA_120		0x01
@@ -75,17 +75,17 @@ typedef struct
 #define HFP_CDROM_MST_DOOR_OPEN		0x71
 #define HFP_CDROM_MST_FMT_ERROR		0x72
 
-  u_int8_t    dev_spec;
-  u_int16_t   unused;
-  u_int16_t   blk_desc_len;
+  uint8_t    dev_spec;
+  uint16_t   unused;
+  uint16_t   blk_desc_len;
 
   /* capabilities page */
-  u_int8_t    page_code;
+  uint8_t    page_code;
 #define HFP_CDROM_CAP_PAGE		0x2a
 
-  u_int8_t    param_len;
+  uint8_t    param_len;
 
-  u_int16_t   media;
+  uint16_t   media;
 #define HFP_CDROM_MST_READ_CDR		0x0001
 #define HFP_CDROM_MST_READ_CDRW		0x0002
 #define HFP_CDROM_MST_READ_PACKET	0x0004
@@ -98,7 +98,7 @@ typedef struct
 #define HFP_CDROM_MST_WRITE_DVDR	0x1000
 #define HFP_CDROM_MST_WRITE_DVDRAM	0x2000
 
-  u_int16_t   capabilities;
+  uint16_t   capabilities;
 #define HFP_CDROM_MSTAUDIO_PLAY		0x0001
 #define HFP_CDROM_MST_COMPOSITE		0x0002
 #define HFP_CDROM_MST_AUDIO_P1		0x0004
@@ -115,7 +115,7 @@ typedef struct
 #define HFP_CDROM_MST_ISRC		0x2000
 #define HFP_CDROM_MST_UPC		0x4000
 
-  u_int8_t    mechanism;
+  uint8_t    mechanism;
 #define HFP_CDROM_MST_LOCKABLE		0x01
 #define HFP_CDROM_MST_LOCKED		0x02
 #define HFP_CDROM_MST_PREVENT		0x04
@@ -131,18 +131,18 @@ typedef struct
 #define HFP_CDROM_MST_SEP_VOL		0x01
 #define HFP_CDROM_MST_SEP_MUTE		0x02
 
-  u_int16_t   max_read_speed;		/* max raw data rate in bytes/1000 */
-  u_int16_t   max_vol_levels;		/* number of discrete volume levels */
-  u_int16_t   buf_size;			/* internal buffer size in bytes/1024 */
-  u_int16_t   cur_read_speed;		/* current data rate in bytes/1000  */
+  uint16_t   max_read_speed;		/* max raw data rate in bytes/1000 */
+  uint16_t   max_vol_levels;		/* number of discrete volume levels */
+  uint16_t   buf_size;			/* internal buffer size in bytes/1024 */
+  uint16_t   cur_read_speed;		/* current data rate in bytes/1000  */
 
-  u_int8_t    reserved3;
-  u_int8_t    misc;
+  uint8_t    reserved3;
+  uint8_t    misc;
 
-  u_int16_t   max_write_speed;		/* max raw data rate in bytes/1000 */
-  u_int16_t   cur_write_speed;		/* current data rate in bytes/1000  */
-  u_int16_t   copy_protect_rev;
-  u_int16_t   reserved4;
+  uint16_t   max_write_speed;		/* max raw data rate in bytes/1000 */
+  uint16_t   cur_write_speed;		/* current data rate in bytes/1000  */
+  uint16_t   copy_protect_rev;
+  uint16_t   reserved4;
 } HFPCDROMCapabilities;
 
 HFPCDROM *hfp_cdrom_new (const char *path, const char *parent);
commit b7964ea806af321c086962b4dd7b20051af5d6e1
Author: Martin Pitt <martin.pitt at ubuntu.com>
Date:   Tue May 12 14:27:10 2009 +0200

    [BSD] use <sys/bitstring.h> instead of <bitstring.h>
    
    <bitstring.h> includes <sys/bitstring.h>. Directly use <sys/bitstring.h>
    has the former one is not available on all systems.

diff --git a/hald/freebsd/hf-pci.c b/hald/freebsd/hf-pci.c
index 273118e..05eb03f 100644
--- a/hald/freebsd/hf-pci.c
+++ b/hald/freebsd/hf-pci.c
@@ -27,7 +27,7 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <bitstring.h>
+#include <sys/bitstring.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
commit 44aa48c9001d99a6c6e3087e68a3ecd1eea2faba
Author: Aurelien Jarno <aurelien at aurel32.net>
Date:   Tue May 12 14:26:10 2009 +0200

    disable power-pmu and sonypic if __FreeBSD_kernel__ is defined

diff --git a/tools/hal-system-power-pmu.c b/tools/hal-system-power-pmu.c
index 0169901..51e6ef6 100644
--- a/tools/hal-system-power-pmu.c
+++ b/tools/hal-system-power-pmu.c
@@ -53,7 +53,7 @@
 static int
 pmac_sleep (void)
 {
-#ifdef __FreeBSD__
+#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
 	return FALSE;			/* FIXME implement */
 #elif sun
 	return FALSE;			/* FIXME implement */
@@ -90,7 +90,7 @@ pmac_sleep (void)
 static int
 pmac_get_lcd_brightness (int *val)
 {
-#ifdef __FreeBSD__
+#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
 	return FALSE;			/* FIXME implement */
 #elif sun
 	return FALSE;			/* FIXME implement */
@@ -127,7 +127,7 @@ pmac_get_lcd_brightness (int *val)
 static int
 pmac_set_lcd_brightness (int val)
 {
-#ifdef __FreeBSD__
+#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
 	return FALSE;			/* FIXME implement */
 #elif sun
 	return FALSE;			/* FIXME implement */
diff --git a/tools/hal-system-sonypic.c b/tools/hal-system-sonypic.c
index ed90375..2fa0790 100644
--- a/tools/hal-system-sonypic.c
+++ b/tools/hal-system-sonypic.c
@@ -63,7 +63,7 @@
 static int
 sonypi_get_lcd_brightness (__u8 *val)
 {
-#ifdef __FreeBSD__
+#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
 	return FALSE;			/* FIXME implement */
 #elif sun
 	return FALSE;			/* FIXME implement */
@@ -163,7 +163,7 @@ error_set:
 static int
 sonypi_set_lcd_brightness (__u8 val)
 {
-#ifdef __FreeBSD__
+#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
 	return FALSE;			/* FIXME implement */
 #elif sun
 	return FALSE;			/* FIXME implement */
@@ -195,7 +195,7 @@ sonypi_set_lcd_brightness (__u8 val)
 static int
 sonypi_set_bluetooth_power (int val)
 {
-#ifdef __FreeBSD__
+#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
 	return FALSE;			/* FIXME implement */
 #elif sun
 	return FALSE;			/* FIXME implement */
commit f134407f32e98f3fab55c025780ad6701f4b09f9
Author: Aurelien Jarno <aurelien at aurel32.net>
Date:   Tue May 12 14:25:07 2009 +0200

    fix compilation of hald/freebsd/hf-storage.c
    
    devname is not a variable available int the hf_storage_device_enable()
    context, causing the build failure of this file. Remove the line using
    it, seems g_return_if_fail(HAL_IS_DEVICE(device)) is already doing the
    job.

diff --git a/hald/freebsd/hf-storage.c b/hald/freebsd/hf-storage.c
index 93239e5..b901d9d 100644
--- a/hald/freebsd/hf-storage.c
+++ b/hald/freebsd/hf-storage.c
@@ -644,7 +644,6 @@ void
 hf_storage_device_enable (HalDevice *device)
 {
   g_return_if_fail(HAL_IS_DEVICE(device));
-  g_return_if_fail(devname != NULL);
 
   hal_device_property_set_string(device, "storage.bus", "platform");
   hal_device_property_set_string(device, "storage.drive_type", "disk");


More information about the hal-commit mailing list