~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/VBox/logbackdoor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
*   Header Files                                                               *
33
33
*******************************************************************************/
34
34
#include <VBox/log.h>
 
35
#include "internal/iprt.h"
35
36
#include <iprt/asm.h>
36
37
#include <iprt/string.h>
37
38
#ifdef IN_GUEST_R3
38
 
# include <VBox/VBoxGuest.h>
 
39
# include <VBox/VBoxGuestLib.h>
39
40
#endif
40
41
 
41
42
 
57
58
    return cb;
58
59
}
59
60
 
 
61
RT_EXPORT_SYMBOL(RTLogBackdoorPrintf);
 
62
 
60
63
 
61
64
RTDECL(size_t) RTLogBackdoorPrintfV(const char *pszFormat, va_list args)
62
65
{
63
66
    return RTLogFormatV(rtLogBackdoorOutput, NULL, pszFormat, args);
64
67
}
65
68
 
 
69
RT_EXPORT_SYMBOL(RTLogBackdoorPrintfV);
 
70
 
66
71
 
67
72
/**
68
73
 * Callback for RTLogFormatV which writes to the backdoor.
75
80
}
76
81
 
77
82
 
78
 
#ifdef IN_GUEST_R3
79
 
 
80
83
RTDECL(void) RTLogWriteUser(const char *pch, size_t cb)
81
84
{
 
85
#ifdef IN_GUEST_R3
82
86
    VbglR3WriteLog(pch, cb);
83
 
}
84
 
 
85
87
#else  /* !IN_GUEST_R3 */
86
 
 
87
 
RTDECL(void) RTLogWriteUser(const char *pch, size_t cb)
88
 
{
89
88
    const uint8_t *pau8 = (const uint8_t *)pch;
90
89
    if (cb > 1)
91
90
        ASMOutStrU8(RTLOG_DEBUG_PORT, pau8, cb);
92
91
    else if (cb)
93
92
        ASMOutU8(RTLOG_DEBUG_PORT, *pau8);
94
 
}
95
 
 
96
 
# if defined(RT_OS_LINUX) && defined(IN_MODULE)
97
 
/*
98
 
 * When we build this in the Linux kernel module, we wish to make the
99
 
 * symbols available to other modules as well.
100
 
 */
101
 
#  include "the-linux-kernel.h"
102
 
EXPORT_SYMBOL(RTLogBackdoorPrintf);
103
 
EXPORT_SYMBOL(RTLogBackdoorPrintfV);
104
 
EXPORT_SYMBOL(RTLogWriteUser);
105
 
# endif /* RT_OS_LINUX && IN_MODULE */
106
93
#endif /* !IN_GUEST_R3 */
 
94
}
 
95
 
 
96
RT_EXPORT_SYMBOL(RTLogWriteUser);
107
97