summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-01-27 12:53:32 +0000
committerEric Anholt <[email protected]>2014-01-27 09:37:29 -0800
commita6031a82f9b0851ef17d1136e34c1eb2a2b07a70 (patch)
tree03576569bf321c7dc6c05271ea7f60d1c22d7667
parent867d7c0e108a4e6511305f82b18ea6f606a18427 (diff)
loader: Add missing \n on message printing
Cover both loader and glx/dri_glx Drop \n from the default loader logger Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r--src/glx/dri_glx.c8
-rw-r--r--src/loader/loader.c23
2 files changed, 15 insertions, 16 deletions
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 2e00bf0e0d8..03ecc5b3b05 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -418,7 +418,7 @@ CallCreateNewScreen(Display *dpy, int scrn, struct dri_screen *psc,
&framebuffer.size, &framebuffer.stride,
&framebuffer.dev_priv_size,
&framebuffer.dev_priv)) {
- ErrorMessageF("XF86DRIGetDeviceInfo failed");
+ ErrorMessageF("XF86DRIGetDeviceInfo failed\n");
goto handle_error;
}
@@ -429,7 +429,7 @@ CallCreateNewScreen(Display *dpy, int scrn, struct dri_screen *psc,
status = drmMap(fd, hFB, framebuffer.size,
(drmAddressPtr) & framebuffer.base);
if (status != 0) {
- ErrorMessageF("drmMap of framebuffer failed (%s)", strerror(-status));
+ ErrorMessageF("drmMap of framebuffer failed (%s)\n", strerror(-status));
goto handle_error;
}
@@ -438,7 +438,7 @@ CallCreateNewScreen(Display *dpy, int scrn, struct dri_screen *psc,
*/
status = drmMap(fd, hSAREA, SAREA_MAX, &pSAREA);
if (status != 0) {
- ErrorMessageF("drmMap of SAREA failed (%s)", strerror(-status));
+ ErrorMessageF("drmMap of SAREA failed (%s)\n", strerror(-status));
goto handle_error;
}
@@ -453,7 +453,7 @@ CallCreateNewScreen(Display *dpy, int scrn, struct dri_screen *psc,
&driver_configs, psc);
if (psp == NULL) {
- ErrorMessageF("Calling driver entry point failed");
+ ErrorMessageF("Calling driver entry point failed\n");
goto handle_error;
}
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 63b977aa743..6d179a1da96 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -85,7 +85,6 @@ static void default_logger(int level, const char *fmt, ...)
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
- fprintf(stderr, "\n");
}
}
@@ -127,14 +126,14 @@ udev_device_new_from_fd(struct udev *udev, int fd)
(struct udev *udev, char type, dev_t devnum));
if (fstat(fd, &buf) < 0) {
- log_(_LOADER_WARNING, "MESA-LOADER: failed to stat fd %d", fd);
+ log_(_LOADER_WARNING, "MESA-LOADER: failed to stat fd %d\n", fd);
return NULL;
}
device = udev_device_new_from_devnum(udev, 'c', buf.st_rdev);
if (device == NULL) {
log_(_LOADER_WARNING,
- "MESA-LOADER: could not create udev device for fd %d", fd);
+ "MESA-LOADER: could not create udev device for fd %d\n", fd);
return NULL;
}
@@ -165,14 +164,14 @@ loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
parent = udev_device_get_parent(device);
if (parent == NULL) {
- log_(_LOADER_WARNING, "MESA-LOADER: could not get parent device");
+ log_(_LOADER_WARNING, "MESA-LOADER: could not get parent device\n");
goto out;
}
pci_id = udev_device_get_property_value(parent, "PCI_ID");
if (pci_id == NULL ||
sscanf(pci_id, "%x:%x", vendor_id, chip_id) != 2) {
- log_(_LOADER_WARNING, "MESA-LOADER: malformed or no PCI ID");
+ log_(_LOADER_WARNING, "MESA-LOADER: malformed or no PCI ID\n");
*chip_id = -1;
goto out;
}
@@ -202,11 +201,11 @@ loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
version = drmGetVersion(fd);
if (!version) {
- log_(_LOADER_WARNING, "MESA-LOADER: invalid drm fd");
+ log_(_LOADER_WARNING, "MESA-LOADER: invalid drm fd\n");
return FALSE;
}
if (!version->name) {
- log_(_LOADER_WARNING, "MESA-LOADER: unable to determine the driver name");
+ log_(_LOADER_WARNING, "MESA-LOADER: unable to determine the driver name\n");
drmFreeVersion(version);
return FALSE;
}
@@ -222,7 +221,7 @@ loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
gp.value = chip_id;
ret = drmCommandWriteRead(fd, DRM_I915_GETPARAM, &gp, sizeof(gp));
if (ret) {
- log_(_LOADER_WARNING, "MESA-LOADER: failed to get param for i915");
+ log_(_LOADER_WARNING, "MESA-LOADER: failed to get param for i915\n");
*chip_id = -1;
}
}
@@ -237,7 +236,7 @@ loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
info.value = (unsigned long) chip_id;
ret = drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info));
if (ret) {
- log_(_LOADER_WARNING, "MESA-LOADER: failed to get info for radeon");
+ log_(_LOADER_WARNING, "MESA-LOADER: failed to get info for radeon\n");
*chip_id = -1;
}
}
@@ -316,12 +315,12 @@ loader_get_driver_for_fd(int fd, unsigned driver_types)
drmVersionPtr version = drmGetVersion(fd);
if (!version) {
- log_(_LOADER_WARNING, "failed to get driver name for fd %d", fd);
+ log_(_LOADER_WARNING, "failed to get driver name for fd %d\n", fd);
return NULL;
}
driver = strndup(version->name, version->name_len);
- log_(_LOADER_INFO, "using driver %s for %d", driver, fd);
+ log_(_LOADER_INFO, "using driver %s for %d\n", driver, fd);
drmFreeVersion(version);
#endif
@@ -350,7 +349,7 @@ loader_get_driver_for_fd(int fd, unsigned driver_types)
out:
log_(driver ? _LOADER_INFO : _LOADER_WARNING,
- "pci id for fd %d: %04x:%04x, driver %s",
+ "pci id for fd %d: %04x:%04x, driver %s\n",
fd, vendor_id, chip_id, driver);
return driver;
}