/*
- * Copyright (C) 2010-2011 jeanfi@gmail.com
+ * Copyright (C) 2010-2012 jeanfi@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
if (res == True)
return temp;
- fprintf(stderr, _("ERROR: failed to retrieve nvidia temperature\n"));
+ log_err(_("Failed to retrieve NVIDIA temperature."));
return 0;
}
sid = malloc(strlen("nvidia") + 1 + strlen(name) + 1);
sprintf(sid, "nvidia %s", name);
- s = psensor_create(sid, strdup(name),
- SENSOR_TYPE_NVIDIA_TEMP, values_len);
+ s = psensor_create(sid,
+ strdup(name),
+ SENSOR_TYPE_NVIDIA_TEMP,
+ values_len);
s->nvidia_id = id;
display = XOpenDisplay(NULL);
if (!display) {
- fprintf(stderr,
- _("ERROR: Cannot open connection to X Server\n"));
+ log_err(_("Cannot open connection to X11 server."));
return 0;
}
XNVCTRLQueryTargetCount(display, NV_CTRL_TARGET_TYPE_GPU, &n))
return n;
- fprintf(stderr, _("ERROR: Cannot retrieve NVidia information\n"));
+ log_err(_("Failed to retrieve NVIDIA information."));
return 0;
}