summaryrefslogtreecommitdiffstats
path: root/tdm
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-03-07 22:21:23 -0600
committerTimothy Pearson <[email protected]>2012-03-07 22:21:23 -0600
commitb6609bb30d91121e98eb2bbe2cf89ff144680e84 (patch)
tree5d8a9133155e9e2e9cde60e2cc3670de03ae5d35 /tdm
parent2242eb95a7bcd686207e2043340fed5ccc8b7609 (diff)
parent56a663b7c2cf18978a349015b6e19f1d898e8bb9 (diff)
downloadtdebase-b6609bb30d91121e98eb2bbe2cf89ff144680e84.tar.gz
tdebase-b6609bb30d91121e98eb2bbe2cf89ff144680e84.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdebase
Diffstat (limited to 'tdm')
-rw-r--r--tdm/kfrontend/tdmctl.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/tdm/kfrontend/tdmctl.c b/tdm/kfrontend/tdmctl.c
index d6abe959a..a0d9a41f8 100644
--- a/tdm/kfrontend/tdmctl.c
+++ b/tdm/kfrontend/tdmctl.c
@@ -45,7 +45,7 @@ openctl( int fd, int err, const char *ctl, const char *dpy )
if (!connect( fd, (struct sockaddr *)&sa, sizeof(sa) ))
return 1;
if (err)
- fprintf( stderr, "Cannot connect socket '%s'.\n", sa.sun_path );
+ fprintf( stderr, "[tdmctl] Cannot connect socket '%s'.\n", sa.sun_path );
return 0;
}
@@ -58,9 +58,7 @@ readcfg( const char *cfg )
char buf[1024];
if (!(fp = fopen( cfg, "r" ))) {
- fprintf( stderr,
- "Cannot open tdm config file '%s'.\n",
- cfg );
+ fprintf( stderr, "[tdmctl] Cannot open tdm config file '%s'.\n", cfg );
return 0;
}
ctl = "/var/run/xdmctl";
@@ -90,7 +88,7 @@ exe( int fd, const char *in, int len )
char buf[4096];
if (write( fd, in, len ) != len) {
- fprintf( stderr, "Cannot send command\n" );
+ fprintf( stderr, "[tdmctl] Cannot send command\n" );
return 1;
}
do {
@@ -138,7 +136,7 @@ run( int fd, char **argv )
buf[len++] = '\n';
return exe( fd, buf, len );
bad:
- fprintf( stderr, "Command too long\n" );
+ fprintf( stderr, "[tdmctl] Command too long\n" );
return 1;
}
}
@@ -201,20 +199,20 @@ main( int argc, char **argv )
} else if (!strcmp( ptr, "c" ) || !strcmp( ptr, "config" )) {
if (!argv[1]) {
needarg:
- fprintf( stderr, "Option '%s' needs argument.\n",
+ fprintf( stderr, "[tdmctl] Option '%s' needs argument.\n",
ptr );
return 1;
}
cfg = *++argv;
} else {
- fprintf( stderr, "Unknown option '%s'.\n", ptr );
+ fprintf( stderr, "[tdmctl] Unknown option '%s'.\n", ptr );
return 1;
}
}
if ((!ctl || !*ctl) && *cfg)
ctl = readcfg( cfg );
if ((fd = socket( PF_UNIX, SOCK_STREAM, 0 )) < 0) {
- fprintf( stderr, "Cannot create UNIX socket\n" );
+ fprintf( stderr, "[tdmctl] Cannot create UNIX socket\n" );
return 1;
}
if (dpy && (ptr = strchr( dpy, ':' )) && (ptr = strchr( ptr, '.' )))
@@ -226,7 +224,7 @@ main( int argc, char **argv )
if (!openctl( fd, 0, "/var/run/xdmctl", dpy ) &&
!openctl( fd, 0, "/var/run", dpy ))
{
- fprintf( stderr, "No command socket found.\n" );
+ fprintf( stderr, "[tdmctl] No command socket found.\n" );
return 1;
}
}