[Utopia] gvm_device_is_writer
- From: Frederic Peters <fpeters entrouvert com>
- To: utopia-list gnome org
- Subject: [Utopia] gvm_device_is_writer
- Date: Thu, 20 May 2004 20:47:39 +0200
Hi all,
I've been following project utopia for a while now and I got engaged
into presenting all that cool stuff at our monthly LUG meeting. This
is in three days so I thought it would be wise to prepare a demo.
Enter a blank CD and no success.
gvm_cdrom_policy calls gvm_device_is_writer to check if "device" is a
writer but "device" is "/dev/hdc" while gvm_device_is_writer expects
the driver udi.
I fixed this with:
drive_udi = hal_device_get_property_string(hal_ctx, udi,
"info.parent");
and calling gvm_device_is_writer(drive_udi);.
This a hal cvs checkout dated 20040515 (debian package) and uptodate
cvs gnome-volume-manager.
Trivial patch attached. Hope it is useful. Keep up the good work.
Regards,
Frederic
Index: manager.c
===================================================================
RCS file: /cvs/gnome/gnome-volume-manager/src/manager.c,v
retrieving revision 1.22
diff -u -r1.22 manager.c
--- manager.c 18 May 2004 21:40:33 -0000 1.22
+++ manager.c 20 May 2004 18:38:26 -0000
@@ -487,6 +487,7 @@
gvm_cdrom_policy (const char *udi)
{
char *device = NULL;
+ char *drive_udi = NULL;
dbus_bool_t has_audio;
dbus_bool_t has_data;
dbus_bool_t is_blank;
@@ -497,6 +498,8 @@
"volume.disc.has_data");
is_blank = hal_device_get_property_bool (hal_ctx, udi,
"volume.disc.is_blank");
+ drive_udi = hal_device_get_property_string(hal_ctx, udi,
+ "info.parent");
device = hal_device_get_property_string (hal_ctx, udi, "block.device");
if (!device) {
@@ -512,7 +515,7 @@
if (config.automount_media)
gvm_device_mount (device);
} else if (is_blank) {
- if (gvm_device_is_writer (device))
+ if (gvm_device_is_writer (drive_udi))
gvm_run_cdburner (device, device);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]