amit pansuria | 30 Aug 2012 13:10
Picon

urgent help required

I m using hal utilinity on my linux (RHEL 5.5) to find the number of USB
devices connected to system

my problem is that when I connect two usb pen drive it shows correctly

now at run time when I unplug one of pen drive and re- run my script it
still shows two pen drive

ideally it shoud show only one after unplug.

I have write following script

for udi in $(/usr/bin/hal-find-by-capability --capability storage)
 do
        device=$(hal-get-property --udi $udi --key block.device)
        vendor=$(hal-get-property --udi $udi --key storage.vendor)
        model=$(hal-get-property --udi $udi --key storage.model)
        echo "udi=$udi ** device=$device ** vendor=$vendor ** model=$model"
        if [[ $(hal-get-property --udi $udi --key storage.bus) = "usb" ]]
        then
          parent_udi=$(hal-find-by-property --key block.storage_device
--string $udi)
          mount=$(hal-get-property --udi $parent_udi --key
volume.mount_point)
          echo "mount = $mount"
          label=$(hal-get-property --udi $parent_udi --key volume.label)
          media_size=$(hal-get-property --udi $udi --key
storage.removable.media_size)
          size=$(( ceil(media_size/(1024*1024*1024)) ))
          line="$vendor  $model  $device $label "${size}GB""
(Continue reading)

DarkKnight BrightWarrior | 24 Jul 2012 14:07
Picon

hal daemon not running properly

Hi,

I am using,
HAL package version: 0.5.11
D-Bus Message Bus Daemon 1.4.1
udevd version 141

Hald daemon is not able to run properly or not getting ready. Please see
the output of following commands run in order.
**
*#hald --daemon=no --verbose=yes*
01:41:53.787 [I] hald.c:669: hal 0.5.11
01:41:53.791 [I] hald.c:734: Will not daemonize
01:41:53.793 [I] hald_dbus.c:5381: local server is listening at
unix:abstract=/var/run/hald/dbus-fdOgWxBCbV,guid=07be019bfc1f2a4f7d1c1c3a000017e3
01:41:53.819 [I] ck-tracker.c:387: got seat
'/org/freedesktop/ConsoleKit/Seat1'
01:41:53.822 [I] ck-tracker.c:338: Got all sessions on seat
'/org/freedesktop/ConsoleKit/Seat1'
01:41:53.822 [I] ck-tracker.c:414: Got seats
01:41:53.822 [I] ck-tracker.c:796: Got seats and sessions
01:41:53.859 [I] hald_runner.c:301: Runner has pid 19023
Runner started - allowed paths are
'/usr/libexec:/usr/lib/hal/scripts:/usr/bin'
01:41:53.873 [I] hald_runner.c:182: runner connection is 0x59fa8
01:41:53.949 [W] osspec.c:373: Unable to open /proc/mdstat: No such file or
directory

*#lshal*
Could not initialise connection to hald.
(Continue reading)

Thomas Jarosch | 5 Oct 2011 22:14
Favicon

[PATCH 1/2] Don't close file descriptor twice

Detected by "cppcheck"

Please CC: comments.

Signed-off-by: Thomas Jarosch <thomas.jarosch <at> intra2net.com>
---
 hald/linux/probing/probe-video4linux.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hald/linux/probing/probe-video4linux.c b/hald/linux/probing/probe-video4linux.c
index b055720..9faf009 100644
--- a/hald/linux/probing/probe-video4linux.c
+++ b/hald/linux/probing/probe-video4linux.c
 <at>  <at>  -147,6 +147,7  <at>  <at>  main (int argc, char *argv[])
 	libhal_device_free_changeset (cset);

 	close (fd);
+	fd = 0;

 	ret = 0;

--

-- 
1.7.4.4

Thomas Jarosch | 5 Oct 2011 22:15
Favicon

[PATCH 2/2] Fix mismatching allocation/deallocation

Detected by "cppcheck"

Please CC: comments.

Signed-off-by: Thomas Jarosch <thomas.jarosch <at> intra2net.com>
---
 hald/freebsd/probing/freebsd_dvd_rw_utils.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/hald/freebsd/probing/freebsd_dvd_rw_utils.c b/hald/freebsd/probing/freebsd_dvd_rw_utils.c
index c004916..130d8a3 100644
--- a/hald/freebsd/probing/freebsd_dvd_rw_utils.c
+++ b/hald/freebsd/probing/freebsd_dvd_rw_utils.c
 <at>  <at>  -45,7 +45,7  <at>  <at>  scsi_command_new_from_cdrom (HFPCDROM *cdrom)
 static void
 scsi_command_free (ScsiCommand * cmd)
 {
-	free (cmd);
+	g_free (cmd);
 }

 static void
 <at>  <at>  -107,7 +107,7  <at>  <at>  get_dvd_r_rw_profile (HFPCDROM *cdrom)
 	if (scsi_command_transport (cmd, READ, list, len)) {
 		/* GET CONFIGURATION failed */
 		scsi_command_free (cmd);
-		free (list);
+		g_free (list);
 		return -1;
 	}
(Continue reading)

Grzesiek Sójka | 14 Sep 2011 20:25
Picon
Favicon

hal & UPS with serial port

Hi there.

Recently I updated to hal-0.5.14 (I do not remember the previous 
version). The problem is that after starting hald my UPS (connected via 
serial port) immediately switches off.

Please help. I already lost some data.

Regards

Greg
John Larysz | 25 Jul 2011 22:01

Debian

I am trying to get hal to configure on an  armel architecture machine with build 2.6.29-00236-g4f8dbbb-dirty. It’s not going well.

 

How can I tell if hal is even running? I can’t see anything in ps -ef and I can’t find any error messages.

 

 

     John

 

<div><div class="WordSection1">
<p class="MsoNormal">I am trying to get hal to configure on an &nbsp;armel architecture machine with build 2.6.29-00236-g4f8dbbb-dirty. It&rsquo;s not going well.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">How can I tell if hal is even running? I can&rsquo;t see anything in ps -ef and I can&rsquo;t find any error messages.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp; John<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div></div>
潘图 | 26 Jun 2011 16:18
Picon

HAL mount result differs if invoked by HAL

Hi,

in order to have my msdos device being able to use correct charset i am
using a fuse module. Here is what I do:

root> mount_msdosfs -L zh_CN.GBK /dev/msdosfs/device /mnt/tmp
root> fusexmp_fh
-oallow_other,modules=iconv:subdir,from_code=GBK,subdir=/mnt/tmp
/media/CW-P7EOS-X

This allows me to have chinese/japanese Names in the Folder/File Name
even if created on windows.

If I do not use the fusexmp_fh, but only the mount_msdosfs, all
filenames with chin/jap names in it will be displayed as (invalid encoding).

No I have created a wrapper with the name mount_msdosfs and move the
actual binary to another place. This wrapper does the 2 commands above
automatically.

So when I am under my gnome environment and plug in my USB Device with
msdos filesystem, HAL calls the mount_msdosfs (which is now the wrapper)
and this script does the two commands above.

The only problem is, that the result differ, if invoked by HAL or if
invoked manually.

If I call the wrapper script, everything works well, if HAL does the
thing (with the exact same paramter), both locations are mounted as
expected, but in the /media/CW-P7EOS-X mount all Files/Folders with
chin/jap. Name in it do not appear.

I have absolutely no idea why it is like this. I can do it by hand with
the exact same command and parameter and everything goes well, but HAL
give strange results.

So I am looking for a place, where I can see any HAL errors.

Here are my System Details:

> uname -a
FreeBSD host.domain 9.0-CURRENT FreeBSD 9.0-CURRENT #3: Mon May 23
07:20:47 CST 2011
root <at> trinity.the-wire.de:/usr/obj/usr/src/sys/TRINKERNEL  i386

>hald --version
HAL package version: 0.5.14

Any help on this is appreciated, I am trying to write a fully functional
wrapper, that remove the charset Problem of msdos devices between
windows (utf-16 i think) and *bsd systems, so that we can use chin/jap
names in folders and files even if been created under windows.

Best wishes
Patu
probiscus12 | 1 Jun 2011 00:21
Picon

Hey

Hello  I just wanted to share this opportunity with you, I've been making 200-300 dollars a day and I started
only a week ago. Check out this news article and it will show you how to get started, it's definitely easy
enough for you :)! http://news7cnbc.com/money
Cuga | 16 May 2011 02:43

need help with hald on MacOS

I need help debugging a problem with hald!

I'm building an X11 window manager under XQuartz/MacOS 10.6.7. I'm not using Fink or Macports. I'm
installing everything in POSIX-compliant locations (/usr/local).

Dbus-1.5.0 and hal-0.5.11 both compile and install fine, but I can't get hald to run. It throws messages and quits.

The X11 wm I'm using requires dbus-session, and optionally uses dbus-system and hal for
hardware-specific modules. Dbus is running properly. The X11 wm is successfully connecting to
dbus-session which is being launched by launchd. 

I can launch dbus-daemon --system, either by hand at the terminal, or with launchd. I get the same results
either way. The pid and socket files are created as expected and the daemon runs in the background without
error. However hald does not start up properly after this. The hald man page suggests starting hald by hand
in verbose mode, which I have tried, with results shown below. hald quits and gives me some messages I don't
understand. I've tried re-compiling both dbus and hald with different config options, but I get the same
results, so I'm stumped.

I noticed the directory /usr/local/etc/hal/ contains the expected directories, but they are all empty.
The build directory had many fdi files that didn't seem to install. Not sure if that's normal or a source of
the problem.

Here are is some system information:

$ ps aux | grep dbus
david   143   0.0  0.0  2447012    760   ??  S     6:56PM   0:00.00 /usr/local/bin/dbus-daemon --nofork --session
messagebus    48   0.0  0.0  2435548    728   ??  Ss    6:55PM   0:00.01 /usr/local/bin/dbus-daemon --nofork --system

$ env | grep DBUS
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/launch-9irO8p/unix_domain_listener

$ ls -al /tmp/launch-9irO8p/unix_domain_listener
srwx------  1 david  wheel  0 May 13 18:56 /tmp/launch-9irO8p/unix_domain_listener

$ ls -al /var/run/dbus*
-rw-r--r--  1 root  daemon  3 May 13 18:56 /var/run/dbus_pid
srwxrwxrwx  1 root  daemon  0 May 13 18:56 /var/run/dbus_system_bus_socket

$ ls -al /var/cache | grep hald
drwxr-xr-x   2 haldaemon  haldaemon   68 May 14 11:05 hald

$ /usr/local/sbin/hald --daemon=no --verbose=yes
16:57:42.030 [I] hald.c:669: hal 0.5.11
16:57:42.031 [I] hald.c:734: Will not daemonize
16:57:42.031 [I] hald_dbus.c:5381: local server is listening at unix:path=/tmp/dbus-QcRvOECZN8,guid=f638aeb56c645e37d6dbc6164dd06876
16:57:42.074 [I] hald_runner.c:301: Runner has pid 404
Runner started - allowed paths are '/usr/local/libexec:/usr/local/lib/hal/scripts:/usr/local/bin'
16:57:42.087 [I] hald_runner.c:182: runner connection is 0x101000670
16:57:42.089 [D] util_helper.c:124: drop_privileges: could not set group id
[ note: then it quits and gives me the shell prompt ]

$ sudo /usr/local/sbin/hald --daemon=no --verbose=yes
19:08:08.339 [I] hald.c:669: hal 0.5.11
19:08:08.339 [I] hald.c:734: Will not daemonize
19:08:08.339 [I] hald_dbus.c:5381: local server is listening at unix:path=/tmp/dbus-h4OzVqCnRk,guid=a2f53e5960b12f13b8a3625b4dcde408
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that
org.freedesktop.dbus-session.plist is loaded!
19:08:08.343 [E] hald_dbus.c:5747: dbus_bus_get(): Not enough memory
[ note: then it quits and gives me the shell prompt ]
[ note: org.freedesktop.dbus-session.plist is indeed loaded and DBUS_LAUNCHD_SESSION_BUS_SOCKET is
set as shown above! ]

dbus configured with:
./configure --disable-static --with-dbus-user=messagebus --enable-console-owner-file
--disable-asserts --disable-tests --enable-checks --enable-kqueue --enable-launchd
--disable-userdb-cache --disable-ansi --with-xml=expat --disable-xml-docs
--disable-doxygen-docs --disable-dependency-tracking --without-x ac_cv_func_poll=no
--with-system-pid-file=/var/run/dbus_pid
--with-system-socket=/var/run/dbus_system_bus_socket --with-session-socket-dir=/tmp
--enable-verbose-mode --localstatedir=/var

hal configured with:
./configure --with-hal-user=haldaemon --with-hal-group=haldaemon --disable-pci-ids
--disable-usb-ids --disable-pnp-ids --disable-pmu --disable-policy-kit --disable-console-kit
--disable-dependency-tracking --disable-static --with-socket-dir=/tmp
--with-localstatedir=/var --with-macbookpro --with-cpufreq

Let me know if any other system info would be useful.

Thanks in advance,
Dave

David Woodfall | 24 Apr 2011 04:07
Picon

Keymapping

Hi, I have a usr9600 phone which acts as an extra keyboard and I'm
trying to map keys 1-0 to keypad 1-0:

         <append key="input.keymap.data" type="strlist">0x02:KP1</append>
         <append key="input.keymap.data" type="strlist">0x03:KP2</append>
         <append key="input.keymap.data" type="strlist">0x04:KP3</append>
         <append key="input.keymap.data" type="strlist">0x05:KP4</append>
         <append key="input.keymap.data" type="strlist">0x06:KP5</append>
         <append key="input.keymap.data" type="strlist">0x07:KP6</append>
         <append key="input.keymap.data" type="strlist">0x08:KP7</append>
         <append key="input.keymap.data" type="strlist">0x09:KP8</append>
         <append key="input.keymap.data" type="strlist">0x0a:KP9</append>
         <append key="input.keymap.data" type="strlist">0x0b:KP0</append>

lshal shows the mappings but they aren't working. I got the codes with 
scankey -s and I've also tried using xev which show different keycodes.

I've also tried <merge> instead of <append>

Any ideas why this isn't working?

Cheers

Dave

-- 
Don't look back, the lemmings are gaining on you.
Hi, I have a usr9600 phone which acts as an extra keyboard and I'm
trying to map keys 1-0 to keypad 1-0:

         <append key="input.keymap.data" type="strlist">0x02:KP1</append>
         <append key="input.keymap.data" type="strlist">0x03:KP2</append>
         <append key="input.keymap.data" type="strlist">0x04:KP3</append>
         <append key="input.keymap.data" type="strlist">0x05:KP4</append>
         <append key="input.keymap.data" type="strlist">0x06:KP5</append>
         <append key="input.keymap.data" type="strlist">0x07:KP6</append>
         <append key="input.keymap.data" type="strlist">0x08:KP7</append>
         <append key="input.keymap.data" type="strlist">0x09:KP8</append>
         <append key="input.keymap.data" type="strlist">0x0a:KP9</append>
         <append key="input.keymap.data" type="strlist">0x0b:KP0</append>

lshal shows the mappings but they aren't working. I got the codes with 
scankey -s and I've also tried using xev which show different keycodes.

I've also tried <merge> instead of <append>

Any ideas why this isn't working?

Cheers

Dave

--

-- 
Don't look back, the lemmings are gaining on you.
Auke Kok | 11 Apr 2011 23:04
Picon
Favicon

[PATCH] ConsoleKit.conf: fix explicit missing destination


The last rule in the dbus system.d conf does not explicitly list the 
destination, which would give problems if a potential other target has 
the same path. Caught by an automated MeeGo build check.

Signed-off-by: Auke Kok <auke-jan.h.kok <at> intel.com>

--- a/data/ConsoleKit.conf	2011-04-11 14:01:34.813582580 -0700
+++ b/data/ConsoleKit.conf	2011-04-11 14:01:53.255582574 -0700
 <at>  <at>  -140,7 +140,8  <at>  <at> 
      <allow send_destination="org.freedesktop.ConsoleKit"
             send_interface="org.freedesktop.ConsoleKit.Session"
             send_member="GetIdleSinceHint"/>
-    <allow send_interface="org.freedesktop.ConsoleKit.Session"
+    <allow send_destination="org.freedesktop.ConsoleKit"
+           send_interface="org.freedesktop.ConsoleKit.Session"
             send_member="SetIdleHint"/>
    </policy>


Gmane