*
* Copyright (C) 2009 Martin Pitt <martin.pitt@ubuntu.com>
* Portions Copyright (C) 2004 David Zeuthen, <david@fubar.dk>
*
* Copyright (C) 2009 Martin Pitt <martin.pitt@ubuntu.com>
* Portions Copyright (C) 2004 David Zeuthen, <david@fubar.dk>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
char text[4096];
unsigned i;
char* word;
unsigned long val;
snprintf(text, sizeof(text), "%s", udev_device_get_sysattr_value(pdev, attr));
char text[4096];
unsigned i;
char* word;
unsigned long val;
snprintf(text, sizeof(text), "%s", udev_device_get_sysattr_value(pdev, attr));
- info(udev, "%s raw kernel attribute: %s\n", attr, text);
+ log_debug("%s raw kernel attribute: %s", attr, text);
i = 0;
while ((word = strrchr(text, ' ')) != NULL) {
val = strtoul (word+1, NULL, 16);
if (i < bitmask_size/sizeof(unsigned long))
bitmask[i] = val;
else
i = 0;
while ((word = strrchr(text, ' ')) != NULL) {
val = strtoul (word+1, NULL, 16);
if (i < bitmask_size/sizeof(unsigned long))
bitmask[i] = val;
else
- info(udev, "ignoring %s block %lX which is larger than maximum size\n", attr, val);
+ log_debug("ignoring %s block %lX which is larger than maximum size", attr, val);
- info(udev, "ignoring %s block %lX which is larger than maximum size\n", attr, val);
+ log_debug("ignoring %s block %lX which is larger than maximum size", attr, val);
if (test) {
/* printf pattern with the right unsigned long number of hex chars */
snprintf(text, sizeof(text), " bit %%4u: %%0%zilX\n", 2 * sizeof(unsigned long));
if (test) {
/* printf pattern with the right unsigned long number of hex chars */
snprintf(text, sizeof(text), " bit %%4u: %%0%zilX\n", 2 * sizeof(unsigned long));
val = bitmask_size / sizeof (unsigned long);
/* skip over leading zeros */
while (bitmask[val-1] == 0 && val > 0)
--val;
val = bitmask_size / sizeof (unsigned long);
/* skip over leading zeros */
while (bitmask[val-1] == 0 && val > 0)
--val;
- for (i = 0; i < val; ++i)
- info(udev, text, i * BITS_PER_LONG, bitmask[i]);
+ for (i = 0; i < val; ++i) {
+ DISABLE_WARNING_FORMAT_NONLITERAL;
+ log_debug(text, i * BITS_PER_LONG, bitmask[i]);
+ REENABLE_WARNING;
+ }
unsigned i;
unsigned long found;
unsigned long mask;
/* do we have any KEY_* capability? */
if (!test_bit (EV_KEY, bitmask_ev)) {
unsigned i;
unsigned long found;
unsigned long mask;
/* do we have any KEY_* capability? */
if (!test_bit (EV_KEY, bitmask_ev)) {
- info(udev, "test_key: checking bit block %lu for any keys; found=%i\n", i*BITS_PER_LONG, found > 0);
+ log_debug("test_key: checking bit block %lu for any keys; found=%i", (unsigned long)i*BITS_PER_LONG, found > 0);
}
/* If there are no keys in the lower block, check the higher block */
if (!found) {
for (i = KEY_OK; i < BTN_TRIGGER_HAPPY; ++i) {
if (test_bit (i, bitmask_key)) {
}
/* If there are no keys in the lower block, check the higher block */
if (!found) {
for (i = KEY_OK; i < BTN_TRIGGER_HAPPY; ++i) {
if (test_bit (i, bitmask_key)) {