+ /* tmp_cf_string_ref doesn't need to be released. */
+ tmp_cf_string_ref = (CFStringRef) CFDictionaryGetValue (props_dict,
+ CFSTR(kIOBSDNameKey));
+ if (!tmp_cf_string_ref)
+ {
+ DEBUG ("disk plugin: CFDictionaryGetValue("
+ "kIOBSDNameKey) failed.");
+ CFRelease (props_dict);
+ IOObjectRelease (disk_child);
+ IOObjectRelease (disk);
+ continue;
+ }
+ assert (CFGetTypeID (tmp_cf_string_ref) == CFStringGetTypeID ());
+
+ memset (disk_name_bsd, 0, sizeof (disk_name_bsd));
+ CFStringGetCString (tmp_cf_string_ref,
+ disk_name_bsd, sizeof (disk_name_bsd),
+ kCFStringEncodingUTF8);
+ if (disk_name_bsd[0] == 0)
+ {
+ ERROR ("disk plugin: CFStringGetCString() failed.");
+ CFRelease (props_dict);
+ IOObjectRelease (disk_child);
+ IOObjectRelease (disk);
+ continue;
+ }
+ DEBUG ("disk plugin: disk_name_bsd = \"%s\"", disk_name_bsd);
+