summaryrefslogtreecommitdiffstats
path: root/kinit
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2013-11-24 23:13:52 -0600
committerSlávek Banko <slavek.banko@axis.cz>2015-12-23 02:22:33 +0100
commitd6a1b97ba85d2b912c0ba035fc3612b6219baaaf (patch)
treeb31044baba7c45208606527828e5b2a0d63fb522 /kinit
parent7bd7fe3ff9e607ecf4cff7aeb6ab8cd8ae77460c (diff)
downloadtdelibs-d6a1b97ba85d2b912c0ba035fc3612b6219baaaf.tar.gz
tdelibs-d6a1b97ba85d2b912c0ba035fc3612b6219baaaf.zip
Disable single fprintf message and nominal string cleanup.
This resolves bug report 888. (cherry picked from commit 5dc0b3542456394ce3ee429623864b2d549c112a)
Diffstat (limited to 'kinit')
-rw-r--r--kinit/kinit.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp
index 47043cb74..dbe527b19 100644
--- a/kinit/kinit.cpp
+++ b/kinit/kinit.cpp
@@ -256,18 +256,18 @@ static void setup_tty( const char* tty )
int fd = open( tty, O_WRONLY );
if( fd < 0 )
{
- fprintf(stderr, "[kinit] couldn't open() %s: %s\n", tty, strerror (errno) );
+ fprintf(stderr, "[kinit] Couldn't open() %s: %s\n", tty, strerror (errno) );
return;
}
if( dup2( fd, STDOUT_FILENO ) < 0 )
{
- fprintf(stderr, "[kinit] couldn't dup2() %s: %s\n", tty, strerror (errno) );
+ fprintf(stderr, "[kinit] Couldn't dup2() %s: %s\n", tty, strerror (errno) );
close( fd );
return;
}
if( dup2( fd, STDERR_FILENO ) < 0 )
{
- fprintf(stderr, "[kinit] couldn't dup2() %s: %s\n", tty, strerror (errno) );
+ fprintf(stderr, "[kinit] Couldn't dup2() %s: %s\n", tty, strerror (errno) );
close( fd );
return;
}
@@ -690,7 +690,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
if (d.result == 2)
{
#ifndef NDEBUG
- fprintf(stderr, "[kinit] %s is executable and not a library. Launching with exec.\n", _name );
+ fprintf(stderr, "[kinit] %s is executable. Launching.\n", _name );
#endif
exec = true;
continue;
@@ -1350,9 +1350,10 @@ static void handle_requests(pid_t waitForPid)
exit_pid = waitpid(-1, 0, WNOHANG);
if (exit_pid > 0)
{
-#ifndef NDEBUG
- fprintf(stderr, "[kinit] PID %ld terminated.\n", (long) exit_pid);
-#endif
+// FIXME: This disabled fprintf might need to be reinstated when converting to kdDebug.
+// #ifndef NDEBUG
+// fprintf(stderr, "[kinit] PID %ld terminated.\n", (long) exit_pid);
+// #endif
if (waitForPid && (exit_pid == waitForPid))
return;
@@ -1505,7 +1506,7 @@ static void kdeinit_library_path()
if (lt_dlinit())
{
const char * ltdlError = lt_dlerror();
- fprintf(stderr, "can't initialize dynamic loading: %s\n", ltdlError != 0 ? ltdlError : "(null)" );
+ fprintf(stderr, "[kinit] Can't initialize dynamic loading: %s\n", ltdlError != 0 ? ltdlError : "(null)" );
}
if (!extra_path.isEmpty())
lt_dlsetsearchpath(extra_path.data());
@@ -1630,7 +1631,7 @@ static int initXconnection()
BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)),
BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)) );
#ifndef NDEBUG
- fprintf(stderr, "[kinit] opened connection to %s\n", DisplayString(X11display));
+ fprintf(stderr, "[kinit] Opened connection to %s\n", DisplayString(X11display));
#endif
int fd = XConnectionNumber( X11display );
int on = 1;
@@ -1896,7 +1897,7 @@ int main(int argc, char **argv, char **envp)
}
free (safe_argv);
- kdeinit_setproctitle("kdeinit Running...");
+ kdeinit_setproctitle("[kinit] kdeinit Running...");
if (!keep_running)
return 0;