Compare commits
6 Commits
master
...
submit/log
Author | SHA1 | Date | |
---|---|---|---|
|
cc4e5d08d3 | ||
|
003c171f0b | ||
|
f24f0e5864 | ||
|
33fa580900 | ||
|
8f173a92f8 | ||
|
db94b86a21 |
|
@ -28,6 +28,7 @@
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "ephyr.h"
|
#include "ephyr.h"
|
||||||
|
@ -288,10 +289,8 @@ ddxProcessArgument(int argc, char **argv, int i)
|
||||||
}
|
}
|
||||||
else if (!strcmp(argv[i], "-verbosity")) {
|
else if (!strcmp(argv[i], "-verbosity")) {
|
||||||
if (i + 1 < argc && argv[i + 1][0] != '-') {
|
if (i + 1 < argc && argv[i + 1][0] != '-') {
|
||||||
int verbosity = atoi(argv[i + 1]);
|
logVerbosity = atoi(argv[i + 1]);
|
||||||
|
EPHYR_LOG("set verbosiry to %d\n", logVerbosity);
|
||||||
LogSetParameter(XLOG_VERBOSITY, verbosity);
|
|
||||||
EPHYR_LOG("set verbosiry to %d\n", verbosity);
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
@ -827,13 +828,11 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
{
|
{
|
||||||
if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) {
|
if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) {
|
||||||
if (!xf86NameCmp(s, "flush")) {
|
if (!xf86NameCmp(s, "flush")) {
|
||||||
LogMessageVerb(X_CONFIG, 1, "Flushing logfile enabled\n");
|
LogMessageVerb(X_CONFIG, 1, "flush log flag is noop\n");
|
||||||
LogSetParameter(XLOG_FLUSH, TRUE);
|
|
||||||
}
|
}
|
||||||
else if (!xf86NameCmp(s, "sync")) {
|
else if (!xf86NameCmp(s, "sync")) {
|
||||||
LogMessageVerb(X_CONFIG, 1, "Syncing logfile enabled\n");
|
LogMessageVerb(X_CONFIG, 1, "Syncing logfile enabled\n");
|
||||||
LogSetParameter(XLOG_FLUSH, TRUE);
|
logSync = TRUE;
|
||||||
LogSetParameter(XLOG_SYNC, TRUE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LogMessageVerb(X_WARNING, 1, "Unknown Log option\n");
|
LogMessageVerb(X_WARNING, 1, "Unknown Log option\n");
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
#include "mi/mi_priv.h"
|
#include "mi/mi_priv.h"
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "servermd.h"
|
#include "servermd.h"
|
||||||
|
@ -870,14 +871,14 @@ void
|
||||||
xf86SetVerbosity(int verb)
|
xf86SetVerbosity(int verb)
|
||||||
{
|
{
|
||||||
xf86Verbose = verb;
|
xf86Verbose = verb;
|
||||||
LogSetParameter(XLOG_VERBOSITY, verb);
|
logVerbosity = verb;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xf86SetLogVerbosity(int verb)
|
xf86SetLogVerbosity(int verb)
|
||||||
{
|
{
|
||||||
xf86LogVerbose = verb;
|
xf86LogVerbose = verb;
|
||||||
LogSetParameter(XLOG_FILE_VERBOSITY, verb);
|
logFileVerbosity = verb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "dix/screenint_priv.h"
|
#include "dix/screenint_priv.h"
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
#include "os/xserver_poll.h"
|
#include "os/xserver_poll.h"
|
||||||
|
|
||||||
|
@ -132,7 +133,6 @@ static int init_fd = -1;
|
||||||
static int wm_fd = -1;
|
static int wm_fd = -1;
|
||||||
static int listen_fds[5] = { -1, -1, -1, -1, -1 };
|
static int listen_fds[5] = { -1, -1, -1, -1, -1 };
|
||||||
static int listen_fd_count = 0;
|
static int listen_fd_count = 0;
|
||||||
static int verbosity = 0;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xwl_show_version(void)
|
xwl_show_version(void)
|
||||||
|
@ -235,12 +235,11 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
||||||
|
|
||||||
val = strtol(argv[i], &end, 0);
|
val = strtol(argv[i], &end, 0);
|
||||||
if (*end == '\0') {
|
if (*end == '\0') {
|
||||||
verbosity = val;
|
logVerbosity = val;
|
||||||
LogSetParameter(XLOG_VERBOSITY, verbosity);
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LogSetParameter(XLOG_VERBOSITY, ++verbosity);
|
logVerbosity++;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if (strcmp(argv[i], "-version") == 0) {
|
else if (strcmp(argv[i], "-version") == 0) {
|
||||||
|
|
|
@ -37,6 +37,7 @@ from The Open Group.
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/screenint_priv.h"
|
#include "dix/screenint_priv.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "winmsg.h"
|
#include "winmsg.h"
|
||||||
|
@ -643,9 +644,8 @@ OsVendorInit(void)
|
||||||
g_pszLogFile = LogInit(g_pszLogFile, ".old");
|
g_pszLogFile = LogInit(g_pszLogFile, ".old");
|
||||||
|
|
||||||
}
|
}
|
||||||
LogSetParameter(XLOG_FLUSH, 1);
|
logVerbosity = 2;
|
||||||
LogSetParameter(XLOG_VERBOSITY, g_iLogVerbose);
|
logFileVerbosity = 2;
|
||||||
LogSetParameter(XLOG_FILE_VERBOSITY, g_iLogVerbose);
|
|
||||||
|
|
||||||
/* Log the version information */
|
/* Log the version information */
|
||||||
if (serverGeneration == 1)
|
if (serverGeneration == 1)
|
||||||
|
|
|
@ -78,6 +78,8 @@
|
||||||
#include <xwin-config.h>
|
#include <xwin-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "glwindows.h"
|
#include "glwindows.h"
|
||||||
#include <glx/glxserver.h>
|
#include <glx/glxserver.h>
|
||||||
#include <glx/glxutil.h>
|
#include <glx/glxutil.h>
|
||||||
|
@ -297,7 +299,7 @@ fbConfigsDump(unsigned int n, __GLXconfig * c, PixelFormatRejectStats *rejects)
|
||||||
LogMessage(X_INFO, "ignored pixel formats: %d not OpenGL, %d unknown pixel type, %d unaccelerated\n",
|
LogMessage(X_INFO, "ignored pixel formats: %d not OpenGL, %d unknown pixel type, %d unaccelerated\n",
|
||||||
rejects->notOpenGL, rejects->unknownPixelType, rejects->unaccelerated);
|
rejects->notOpenGL, rejects->unknownPixelType, rejects->unaccelerated);
|
||||||
|
|
||||||
if (g_iLogVerbose < 3)
|
if (logVerbosity < 3)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ErrorF
|
ErrorF
|
||||||
|
@ -572,7 +574,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
|
||||||
if (!wgl_extensions)
|
if (!wgl_extensions)
|
||||||
wgl_extensions = "";
|
wgl_extensions = "";
|
||||||
|
|
||||||
if (g_iLogVerbose >= 3) {
|
if (logVerbosity >= 3) {
|
||||||
glxLogExtensions("GL_EXTENSIONS: ", gl_extensions);
|
glxLogExtensions("GL_EXTENSIONS: ", gl_extensions);
|
||||||
glxLogExtensions("WGL_EXTENSIONS: ", wgl_extensions);
|
glxLogExtensions("WGL_EXTENSIONS: ", wgl_extensions);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,6 @@ const char *g_pszLogFile = DEFAULT_LOGDIR "/XWin.%s.log";
|
||||||
const char *g_pszLogFile = "XWin.log";
|
const char *g_pszLogFile = "XWin.log";
|
||||||
Bool g_fLogFileChanged = FALSE;
|
Bool g_fLogFileChanged = FALSE;
|
||||||
#endif
|
#endif
|
||||||
int g_iLogVerbose = 2;
|
|
||||||
Bool g_fLogInited = FALSE;
|
Bool g_fLogInited = FALSE;
|
||||||
char *g_pszCommandLine = NULL;
|
char *g_pszCommandLine = NULL;
|
||||||
Bool g_fSilentFatalError = FALSE;
|
Bool g_fSilentFatalError = FALSE;
|
||||||
|
|
|
@ -45,7 +45,6 @@ extern const char *g_pszLogFile;
|
||||||
#ifdef RELOCATE_PROJECTROOT
|
#ifdef RELOCATE_PROJECTROOT
|
||||||
extern Bool g_fLogFileChanged;
|
extern Bool g_fLogFileChanged;
|
||||||
#endif
|
#endif
|
||||||
extern int g_iLogVerbose;
|
|
||||||
extern Bool g_fLogInited;
|
extern Bool g_fLogInited;
|
||||||
|
|
||||||
extern Bool g_fAuthEnabled;
|
extern Bool g_fAuthEnabled;
|
||||||
|
|
|
@ -36,8 +36,9 @@ from The Open Group.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/osdep.h"
|
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include <../xfree86/common/xorgVersion.h>
|
#include <../xfree86/common/xorgVersion.h>
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
@ -996,7 +997,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION("-logverbose")) {
|
if (IS_OPTION("-logverbose")) {
|
||||||
CHECK_ARGS(1);
|
CHECK_ARGS(1);
|
||||||
g_iLogVerbose = atoi(argv[++i]);
|
logVerbosity = atoi(argv[++i]);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -324,7 +324,6 @@ timingsafe_memcmp(const void *b1, const void *b2, size_t len);
|
||||||
|
|
||||||
/* Logging. */
|
/* Logging. */
|
||||||
typedef enum _LogParameter {
|
typedef enum _LogParameter {
|
||||||
XLOG_FLUSH,
|
|
||||||
XLOG_SYNC,
|
XLOG_SYNC,
|
||||||
XLOG_VERBOSITY,
|
XLOG_VERBOSITY,
|
||||||
XLOG_FILE_VERBOSITY
|
XLOG_FILE_VERBOSITY
|
||||||
|
|
60
os/log.c
60
os/log.c
|
@ -109,12 +109,11 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#define DEFAULT_LOG_VERBOSITY 0
|
#define DEFAULT_LOG_VERBOSITY 0
|
||||||
#define DEFAULT_LOG_FILE_VERBOSITY 3
|
#define DEFAULT_LOG_FILE_VERBOSITY 3
|
||||||
|
|
||||||
static FILE *logFile = NULL;
|
Bool logSync = FALSE;
|
||||||
|
int logVerbosity = DEFAULT_LOG_VERBOSITY;
|
||||||
|
int logFileVerbosity = DEFAULT_LOG_FILE_VERBOSITY;
|
||||||
|
|
||||||
static int logFileFd = -1;
|
static int logFileFd = -1;
|
||||||
static Bool logFlush = FALSE;
|
|
||||||
static Bool logSync = FALSE;
|
|
||||||
static int logVerbosity = DEFAULT_LOG_VERBOSITY;
|
|
||||||
static int logFileVerbosity = DEFAULT_LOG_FILE_VERBOSITY;
|
|
||||||
|
|
||||||
/* Buffer to information logged before the log file is opened. */
|
/* Buffer to information logged before the log file is opened. */
|
||||||
static char *saveBuffer = NULL;
|
static char *saveBuffer = NULL;
|
||||||
|
@ -200,6 +199,12 @@ LogFilePrep(const char *fname, const char *backup, const char *idstring)
|
||||||
}
|
}
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
static inline void doLogSync(void) {
|
||||||
|
#ifndef WIN32
|
||||||
|
fsync(logFileFd);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LogInit is called to start logging to a file. It is also called (with
|
* LogInit is called to start logging to a file. It is also called (with
|
||||||
* NULL arguments) when logging to a file is not wanted. It must always be
|
* NULL arguments) when logging to a file is not wanted. It must always be
|
||||||
|
@ -235,19 +240,14 @@ LogInit(const char *fname, const char *backup)
|
||||||
saved_log_backup = strdup(backup);
|
saved_log_backup = strdup(backup);
|
||||||
} else
|
} else
|
||||||
logFileName = LogFilePrep(fname, backup, display);
|
logFileName = LogFilePrep(fname, backup, display);
|
||||||
if ((logFile = fopen(logFileName, "w")) == NULL)
|
|
||||||
FatalError("Cannot open log file \"%s\"\n", logFileName);
|
|
||||||
setvbuf(logFile, NULL, _IONBF, 0);
|
|
||||||
|
|
||||||
logFileFd = fileno(logFile);
|
if ((logFileFd = open(logFileName, O_WRONLY | O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP)) == -1)
|
||||||
|
FatalError("Cannot open log file \"%s\": %s\n", logFileName, strerror(errno));
|
||||||
|
|
||||||
/* Flush saved log information. */
|
/* Flush saved log information. */
|
||||||
if (saveBuffer && bufferSize > 0) {
|
if (saveBuffer && bufferSize > 0) {
|
||||||
fwrite(saveBuffer, bufferPos, 1, logFile);
|
write(logFileFd, saveBuffer, bufferPos);
|
||||||
fflush(logFile);
|
doLogSync();
|
||||||
#ifndef WIN32
|
|
||||||
fsync(fileno(logFile));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,14 +298,13 @@ LogSetDisplay(void)
|
||||||
void
|
void
|
||||||
LogClose(enum ExitCode error)
|
LogClose(enum ExitCode error)
|
||||||
{
|
{
|
||||||
if (logFile) {
|
if (logFileFd != -1) {
|
||||||
int msgtype = (error == EXIT_NO_ERROR) ? X_INFO : X_ERROR;
|
int msgtype = (error == EXIT_NO_ERROR) ? X_INFO : X_ERROR;
|
||||||
LogMessageVerb(msgtype, -1,
|
LogMessageVerb(msgtype, -1,
|
||||||
"Server terminated %s (%d). Closing log file.\n",
|
"Server terminated %s (%d). Closing log file.\n",
|
||||||
(error == EXIT_NO_ERROR) ? "successfully" : "with error",
|
(error == EXIT_NO_ERROR) ? "successfully" : "with error",
|
||||||
error);
|
error);
|
||||||
fclose(logFile);
|
close(logFileFd);
|
||||||
logFile = NULL;
|
|
||||||
logFileFd = -1;
|
logFileFd = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -314,9 +313,6 @@ Bool
|
||||||
LogSetParameter(LogParameter param, int value)
|
LogSetParameter(LogParameter param, int value)
|
||||||
{
|
{
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case XLOG_FLUSH:
|
|
||||||
logFlush = value ? TRUE : FALSE;
|
|
||||||
return TRUE;
|
|
||||||
case XLOG_SYNC:
|
case XLOG_SYNC:
|
||||||
logSync = value ? TRUE : FALSE;
|
logSync = value ? TRUE : FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -563,31 +559,23 @@ LogSWrite(int verb, const char *buf, size_t len, Bool end_line)
|
||||||
if (verb < 0 || logFileVerbosity >= verb) {
|
if (verb < 0 || logFileVerbosity >= verb) {
|
||||||
if (inSignalContext && logFileFd >= 0) {
|
if (inSignalContext && logFileFd >= 0) {
|
||||||
ret = write(logFileFd, buf, len);
|
ret = write(logFileFd, buf, len);
|
||||||
#ifndef WIN32
|
if (logSync)
|
||||||
if (logFlush && logSync)
|
doLogSync();
|
||||||
fsync(logFileFd);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else if (!inSignalContext && logFile) {
|
else if (!inSignalContext && logFileFd != -1) {
|
||||||
if (newline) {
|
if (newline) {
|
||||||
time_t t = time(NULL);
|
time_t t = time(NULL);
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
char fmt_tm[32];
|
char fmt_tm[32];
|
||||||
|
|
||||||
localtime_r(&t, &tm);
|
localtime_r(&t, &tm);
|
||||||
strftime(fmt_tm, sizeof(fmt_tm) - 1, "%Y-%m-%d %H:%M:%S", &tm);
|
strftime(fmt_tm, sizeof(fmt_tm) - 1, "[%Y-%m-%d %H:%M:%S] ", &tm);
|
||||||
|
write(logFileFd, fmt_tm, strlen(fmt_tm));
|
||||||
fprintf(logFile, "[%s] ", fmt_tm);
|
|
||||||
}
|
}
|
||||||
newline = end_line;
|
newline = end_line;
|
||||||
fwrite(buf, len, 1, logFile);
|
write(logFileFd, buf, len);
|
||||||
if (logFlush) {
|
if (logSync)
|
||||||
fflush(logFile);
|
doLogSync();
|
||||||
#ifndef WIN32
|
|
||||||
if (logSync)
|
|
||||||
fsync(fileno(logFile));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (!inSignalContext && needBuffer) {
|
else if (!inSignalContext && needBuffer) {
|
||||||
if (len > bufferUnused) {
|
if (len > bufferUnused) {
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
/* SPDX-License-Identifier: MIT OR X11
|
||||||
|
*
|
||||||
|
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||||
|
*/
|
||||||
|
#ifndef _XSERVER_LOG_PRIV_H
|
||||||
|
#define _XSERVER_LOG_PRIV_H
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <X11/Xdefs.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief force fsync() on each log write
|
||||||
|
*
|
||||||
|
* If set to TRUE, force fsync() on each log write.
|
||||||
|
*/
|
||||||
|
extern Bool logSync;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief console log verbosity (stderr)
|
||||||
|
*
|
||||||
|
* The verbosity level of logging to console. All messages with verbosity
|
||||||
|
* level below this one will be written to stderr
|
||||||
|
*/
|
||||||
|
extern int logVerbosity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief log file verbosity
|
||||||
|
*
|
||||||
|
* The verbosity level of logging to per-display file. All messages with
|
||||||
|
* verbosity level below this one will be written to the log file.
|
||||||
|
*/
|
||||||
|
extern int logFileVerbosity;
|
||||||
|
|
||||||
|
#endif /* _XSERVER_LOG_PRIV_H */
|
|
@ -30,6 +30,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "os/fmt.h"
|
#include "os/fmt.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -149,7 +150,7 @@ number_formatting(void)
|
||||||
-0x7FFFFFFFFFFFFFFF, /* Maximum 64-bit signed number */
|
-0x7FFFFFFFFFFFFFFF, /* Maximum 64-bit signed number */
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
LogSetParameter(XLOG_VERBOSITY, -1);
|
logVerbosity = -1;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(unsigned_tests); i++)
|
for (i = 0; i < ARRAY_SIZE(unsigned_tests); i++)
|
||||||
assert(check_number_format_test(unsigned_tests[i]));
|
assert(check_number_format_test(unsigned_tests[i]));
|
||||||
|
@ -181,7 +182,7 @@ static void logging_format(void)
|
||||||
uintptr_t ptr;
|
uintptr_t ptr;
|
||||||
char *fname = NULL;
|
char *fname = NULL;
|
||||||
|
|
||||||
LogSetParameter(XLOG_VERBOSITY, -1);
|
logVerbosity = -1;
|
||||||
|
|
||||||
/* set up buf to contain ".....end" */
|
/* set up buf to contain ".....end" */
|
||||||
memset(buf, '.', sizeof(buf));
|
memset(buf, '.', sizeof(buf));
|
||||||
|
|
Loading…
Reference in New Issue