~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to src/uevent.c

  • Committer: Michael Vogt
  • Date: 2011-03-31 09:20:03 UTC
  • Revision ID: michael.vogt@ubuntu.com-20110331092003-q2wpu4ayw3g2wm4c
* src/uevent.c: 
  - HP laser printers which require firmware can also have the
    product ID "xx2a" now. (LP: #734822)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    id_model = g_udev_device_get_property (device, "ID_MODEL");
39
39
    g_debug_uevent ("uevent.c id_vendor=%s, id_product=%s", id_vendor, id_product);
40
40
 
41
 
    // only idVendor=03f0, idProduct="??17" requires firmware
42
 
    if (g_strcmp0 (id_vendor, "03f0") != 0 || id_product == NULL || g_utf8_strlen(id_product, -1) != 4)
 
41
    // only idVendor=03f0, idProduct="??{17,2a}" requires firmware
 
42
    if (g_strcmp0 (id_vendor, "03f0") != 0 || 
 
43
        id_product == NULL || 
 
44
        g_utf8_strlen(id_product, -1) != 4)
43
45
       return FALSE;
44
 
    if (id_product[2] != '1' || id_product[3] != '7')
 
46
    if (! ( ((id_product[2] == '1') && (id_product[3] == '7')) ||
 
47
            ((id_product[2] == '2') && (tolower(id_product[3]) == 'a')) ))
45
48
       return FALSE;
46
49
 
47
50
    // firmware is only required if "hp-mkuri -c" returns 2 or 5