File: 04_cd_write.patch

package info (click to toggle)
hal 0.5.8.1-9etch1
  • links: PTS, VCS
  • area: main
  • in suites: etch
  • size: 2,060 kB
  • ctags: 2
  • sloc: sh: 152; makefile: 27
file content (26 lines) | stat: -rw-r--r-- 1,015 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
commit c127f54ee1a91743989ccdbe93025740fe9cec73
Author: David Zeuthen <davidz@redhat.com>
Date:   Tue Sep 26 15:50:51 2006 -0400

    don't crash on cd drives without write capabilities
    
    This fix needs to be forward-ported to master. Probably we shouldn't
    be looking for write speeds unless the drive can write. This fix
    will do it for the 0.5.8 series though.

diff --git a/hald/linux/probing/probe-storage.c b/hald/linux/probing/probe-storage.c
index 41c43bd..8afeb8d 100644
--- a/hald/linux/probing/probe-storage.c
+++ b/hald/linux/probing/probe-storage.c
@@ -254,8 +254,10 @@ main (int argc, char *argv[])
 						free (write_speeds);
 					}
 				} else {
+					gchar *wspeeds[1] = {NULL};
 					libhal_changeset_set_property_int (cs, "storage.cdrom.write_speed", 0);
-					libhal_changeset_set_property_strlist (cs, "storage.cdrom.write_speeds", NULL);
+					libhal_changeset_set_property_strlist (cs, "storage.cdrom.write_speeds", 
+									       (const char **) wspeeds);
 				}
 			}