summaryrefslogtreecommitdiff
path: root/os/log.c
AgeCommit message (Collapse)AuthorFilesLines
2010-11-11Remove more superfluous if(p!=NULL) checks around free(p).Cyril Brulebois1-4/+2
This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ - if (E != NULL) - free(E); + free(E); Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-25Remove now-misleading commentMikhail Gusarov1-1/+0
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-25Replace "if(buf) realloc(buf, size) else malloc(size)" with realloc()Mikhail Gusarov1-4/+1
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-25Remove now-misleading commentMikhail Gusarov1-4/+0
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-05-16XQuartz: Fix a build failure on TigerJeremy Huddleston1-0/+7
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-05-13Use _X_ATTRIBUTE_PRINTF _X_DEPRECATED _X_NORETURNJeremy Huddleston1-1/+1
Use the values from xproto rather than duplicating the effort Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-13Introduce X_NORETURN macro defined as __attribute__((noreturn)) for gccMikhail Gusarov1-3/+2
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-3/+3
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-01darwin: Correct inline assembly for ___crashreporter_info__Jeremy Huddleston1-1/+1
It was missing an underscore. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-29darwin: Generate crash reports on FatalError()Jeremy Huddleston1-0/+9
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Adam Jackson <ajax@redhat.com>
2010-03-22New header for XF86Bigfont server functionsYaakov Selkowitz1-2/+1
Xext/xf86bigfont.c contains three non-static functions which are called elsewhere in the server. This creates a new header containing these declarations in order to fix several warnings: xf86bigfont.c:285: warning: no previous prototype for `XF86BigfontFreeFontShm' dixfonts.c:502: warning: implicit declaration of function `XF86BigfontFreeFontS$ dixfonts.c:502: warning: nested extern declaration of `XF86BigfontFreeFontShm' log.c:436: warning: implicit declaration of function `XF86BigfontCleanup' log.c:436: warning: nested extern declaration of `XF86BigfontCleanup' Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-02-17os: Prevent core dump from being truncated.Rami Ylimaki1-2/+2
The problem fixed by this patch can be reproduced on Linux with the following steps. - Access NULL pointer intentionally in ProcessOtherEvent on key press. - Instead of saving core dump to a file, write it into a pipe. echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern - Dump the core by pressing a key. While the core is being dumped into the pipe, the smart schedule timer will cause a pending SIGALRM. Linux kernel stops writing data to the pipe when there are pending signals. This causes the core dump to be truncated. On my system I'm expecting a 6 MB dump but the size will be 60 kB instead. The problem is solved if we block the SIGALRM caused by expired smart schedule timer. I haven't been able to reproduce this problem in the following cases. - Save core dump to a file instead of a pipe. - kill -SEGV `pidof Xorg` - Press a key to dump core while gdb is attached to Xorg. - Give option -dumbSched to Xorg. Also note that the fix works only when NoTrapSignals has the default value FALSE. The problem can still be reproduced if error signals aren't trapped. In addition to pending SIGALRM, there is a similar problem with pending SIGIO from the keyboard driver during core dump. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-27xserver: Add timestamps to logfile output.Kok, Auke1-0/+9
Add timestamps in seconds derived from clock_monotonic to the log file. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-25Remove unbalanced ( from failure to move log errorAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2009-12-16os: print log markers only if log level is >= 0Tiago Vignatti1-11/+11
FWIW default log verbosity is 0, so this will affect only if one start the server with a different -verbose argument. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-04-19os: don't malloc memory in LogVMessageVerb.Peter Hutterer1-16/+6
LogVWrite is limited to a buffer size of 1024, so we don't loose anything here by truncating. This way we can use LogVMessageVerb (and xf86Msg and friends) during signal handlers with the normal message types. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-09Lift fatal signal handlers from DDX'es up to a common DIX implementationAlan Coopersmith1-0/+7
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2008-12-16Fix compilation with -Werror=format-securityColin Guthrie1-2/+3
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-17/+17
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
2008-11-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade1-8/+8
This is the biggest "visibility" patch. Instead of doing a "export" symbol on demand, export everything in the sdk, so that if some module fails due to an unresolved symbol, it is because it is using a symbol not in the sdk. Most exported symbols shouldn't really be made visible, neither advertised in the sdk, as they are only used by a single shared object. Symbols in the sdk (or referenced in sdk macros), but not defined anywhere include: XkbBuildCoreState() XkbInitialMap XkbXIUnsupported XkbCheckActionVMods() XkbSendCompatNotify() XkbDDXFakePointerButton() XkbDDXApplyConfig() _XkbStrCaseCmp() _XkbErrMessages[] _XkbErrCode _XkbErrLocation _XkbErrData XkbAccessXDetailText() XkbNKNDetailMaskText() XkbLookupGroupAndLevel() XkbInitAtoms() XkbGetOrderedDrawables() XkbFreeOrderedDrawables() XkbConvertXkbComponents() XkbWriteXKBSemantics() XkbWriteXKBLayout() XkbWriteXKBKeymap() XkbWriteXKBFile() XkbWriteCFile() XkbWriteXKMFile() XkbWriteToServer() XkbMergeFile() XkmFindTOCEntry() XkmReadFileSection() XkmReadFileSectionName() InitExtInput() xf86CheckButton() xf86SwitchCoreDevice() RamDacSetGamma() RamDacRestoreDACValues() xf86Bpp xf86ConfigPix24 xf86MouseCflags[] xf86SupportedMouseTypes[] xf86NumMouseTypes xf86ChangeBusIndex() xf86EntityEnter() xf86EntityLeave() xf86WrapperInit() xf86RingBell() xf86findOptionBoolean() xf86debugListOptions() LoadSubModuleLocal() LoaderSymbolLocal() getInt10Rec() xf86CurrentScreen xf86ReallocatePciResources() xf86NewSerialNumber() xf86RandRSetInitialMode() fbCompositeSolidMask_nx1xn fbCompositeSolidMask_nx8888x0565C fbCompositeSolidMask_nx8888x8888C fbCompositeSolidMask_nx8x0565 fbCompositeSolidMask_nx8x0888 fbCompositeSolidMask_nx8x8888 fbCompositeSrc_0565x0565 fbCompositeSrc_8888x0565 fbCompositeSrc_8888x0888 fbCompositeSrc_8888x8888 fbCompositeSrcAdd_1000x1000 fbCompositeSrcAdd_8000x8000 fbCompositeSrcAdd_8888x8888 fbGeneration fbIn fbOver fbOver24 fbOverlayGeneration fbRasterizeEdges fbRestoreAreas fbSaveAreas composeFunctions VBEBuildVbeModeList() VBECalcVbeModeIndex() TIramdac3030CalculateMNPForClock() shadowBufPtr shadowFindBuf() miRRGetScreenInfo() RRSetScreenConfig() RRModePruneUnused() PixmanImageFromPicture() extern int miPointerGetMotionEvents() miClipPicture() miRasterizeTriangle() fbPush1toN() fbInitializeBackingStore() ddxBeforeReset() SetupSprite() InitSprite() DGADeliverEvent() SPECIAL CASES o defined as _X_INTERNAL xf86NewInputDevice() o defined as static fbGCPrivateKey fbOverlayScreenPrivateKey fbScreenPrivateKey fbWinPrivateKey o defined in libXfont.so, but declared in xorg/dixfont.h GetGlyphs() QueryGlyphExtents() QueryTextExtents() ParseGlyphCachingMode() InitGlyphCaching() SetGlyphCachingMode()
2008-10-21Close well known connections in ServerAbort()Matthieu Herrb1-0/+1
2008-07-17Remove dead code, useless #defines, et alDaniel Stone1-2/+0
2008-07-17Dead code removalDaniel Stone1-18/+0
Remove a whole bunch of code that was never built, be it entire files or just dead ifdefs.
2008-05-14Remove global argc/argv variables.Adam Jackson1-9/+3
Was only used in the logging code anymore, and uselessly so there.
2008-05-14Restore compression of duplicate log file entries.Adam Jackson1-10/+0
This undoes the workaround for bug #964, which was an Xprintism.
2007-06-28Remove the remnants of OS/2 support.Adam Jackson1-3/+0
This has never worked in any modular server release, and as far as I know was never tested in 6.7 through 6.9.
2007-04-09Bug #10560: Code-Cleanup: function declarations () -> (void)Stefan Huehner1-2/+2
X.Org Bugzilla #10560: <https://bugs.freedesktop.org/show_bug.cgi?id=10560> Patch #9511 <https://bugs.freedesktop.org/attachment.cgi?id=9511>
2006-11-21Issue CloseDownDevices() in os/log.c and remove from dix/main.c.Alan Hourihane1-0/+2
This ensures that all calls to FatalError() will shutdown the input devices.
2006-07-21Remove RCS tags. Fix Xprint makefile braindamage.Adam Jackson1-1/+0
2006-02-15Mark everything in dixsym.c as _X_EXPORT.Adam Jackson1-9/+9
2005-07-03Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.Daniel Stone1-0/+4
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings. Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all source files in the xserver/xorg tree, predicated on defines of HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to <X11/fonts/foo.h>.
2005-04-20Fix includes right throughout the Xserver tree:Daniel Stone1-1/+1
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h; change "foo.h", "extensions/foo.h" and "X11/foo.h" to <X11/extensions/foo.h> for extension headers, e.g. Xv.h; change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
2004-11-15Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 AddedAlexander Gottwald1-0/+9
mingw (Win32) port
2004-08-13Fix Xprt bug by disabling code that merges multiple audit messages (BugKevin E Martin1-0/+10
#964, Roland Mainz).
2004-06-30Add Distributed Multihead X (DMX) supportKevin E Martin1-2/+2
2003-11-25Initial revisionKaleb Keithley1-0/+610