~ubuntu-branches/debian/squeeze/hal/squeeze

« back to all changes in this revision

Viewing changes to hald/freebsd/probing/probe-smbios.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2008-03-05 18:14:57 UTC
  • Revision ID: james.westby@ubuntu.com-20080305181457-fj989u7likg0vd6b
Tags: upstream-0.5.10+git20080301
ImportĀ upstreamĀ versionĀ 0.5.10+git20080301

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
        if (strbegin (buf, str)) {
68
68
                dbus_error_init (&error);
69
69
                value = buf + strlen (str) + 1;
 
70
                if (strcmp (value, "Not Specified") == 0)
 
71
                        goto out;
 
72
 
70
73
                libhal_device_set_property_string (hfp_ctx, hfp_udi, prop, value, &hfp_error);
71
74
                hfp_info ("Setting %s='%s'", prop, value);
72
75
                return TRUE;
73
76
        }
 
77
out:
74
78
        return FALSE;
75
79
}
76
80
 
 
81
static void
 
82
copykeyval (char *key, char *compat_key)
 
83
{
 
84
        char *value;
 
85
 
 
86
        value = libhal_device_get_property_string (hfp_ctx, hfp_udi, key, NULL);
 
87
        if (value != NULL) {
 
88
                hfp_info ("Copying %s -> %s", key, compat_key);
 
89
                libhal_device_set_property_string (hfp_ctx, hfp_udi, compat_key, value, NULL);
 
90
        }
 
91
}
 
92
 
77
93
/** 
78
94
 *  main:
79
95
 *  @argc:      Number of arguments given to program
221
237
        /* as read to EOF, close */
222
238
        fclose (f);
223
239
 
 
240
        /* compatibility keys, remove 28 Feb 2008 */
 
241
        copykeyval ("system.hardware.vendor", "smbios.system.manufacturer");
 
242
        copykeyval ("system.hardware.product", "smbios.system.product");
 
243
        copykeyval ("system.hardware.version", "smbios.system.version");
 
244
        copykeyval ("system.hardware.serial", "smbios.system.serial");
 
245
        copykeyval ("system.hardware.uuid", "smbios.system.uuid");
 
246
        copykeyval ("system.firmware.vendor", "smbios.bios.vendor");
 
247
        copykeyval ("system.firmware.version", "smbios.bios.version");
 
248
        copykeyval ("system.firmware.release_date", "smbios.bios.release_date");
 
249
        copykeyval ("system.chassis.manufacturer", "smbios.chassis.manufacturer");
 
250
        copykeyval ("system.chassis.type", "smbios.chassis.type");
 
251
 
224
252
        /* return success */
225
253
        ret = 0;
226
254