Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
fixing uml tools change mcsonole socket location patch
Browse files Browse the repository at this point in the history
  • Loading branch information
kartoch committed May 20, 2011
1 parent abcc50f commit fdb77f3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/Makefile
@@ -1,4 +1,4 @@
UML_TOOLS_DIR=uml-tools/
UML_TOOLS_DIR=tools-20070815/
BUILD_DIR=build/
PATCHES_DIR=patches/

Expand Down
42 changes: 21 additions & 21 deletions src/patches/uml_tools-change-mconsole-socket-location.patch
@@ -1,26 +1,26 @@
diff -Naur uml-tools//mconsole/uml_mconsole.c build/mconsole/uml_mconsole.c
--- uml-tools//mconsole/uml_mconsole.c 2004-04-08 03:43:29.000000000 +0200
+++ build/mconsole/uml_mconsole.c 2011-05-20 12:16:00.044639001 +0200
@@ -62,6 +62,22 @@
int try_file = 1;
diff -Naur uml-utilities-20070815-original//mconsole/uml_mconsole.c uml-utilities-20070815/mconsole/uml_mconsole.c
--- uml-utilities-20070815-original//mconsole/uml_mconsole.c 2006-02-28 05:05:32.000000000 +0100
+++ uml-utilities-20070815/mconsole/uml_mconsole.c 2011-04-26 15:16:07.129258342 +0200
@@ -88,6 +88,22 @@
int try_file = 1;

if((home = getenv("HOME")) != NULL){
if((home = getenv("HOME")) != NULL){
+
+ /*****************************************/
+ /* Changed for compatibility with Netkit */
+ /*****************************************/
+ /*****************************************/
+ /* Changed for compatibility with Netkit */
+ /*****************************************/
+
+ /* Management consoles are made available inside .netkit
+ in the user's home directory. Look there first and
+ everywhere else only in case of failure. */
+ /* Management consoles are made available inside .netkit
+ in the user's home directory. Look there first and
+ everywhere else only in case of failure. */
+
+ snprintf(dir, sizeof(dir), "%s/.netkit/mconsole", home);
+ snprintf(file, sizeof(file), "%s/%s/mconsole", dir, name);
+ if(strncmp(name, dir, strlen(dir))){
+ if(!do_switch(dir, file, name)) return(0);
+ try_file = 0;
+ }
+ snprintf(dir, sizeof(dir), "%s/.netkit/mconsole", home);
+ snprintf(file, sizeof(file), "%s/%s/mconsole", dir, name);
+ if(strncmp(name, dir, strlen(dir))){
+ if(!do_switch(dir, file, name)) return(0);
+ try_file = 0;
+ }
+
snprintf(dir, sizeof(dir), "%s/.uml", home);
snprintf(file, sizeof(file), "%s/%s/mconsole", dir, name);
if(strncmp(name, dir, strlen(dir))){
snprintf(dir, sizeof(dir), "%s/.uml", home);
snprintf(file, sizeof(file), "%s/%s/mconsole", dir, name);
if(strncmp(name, dir, strlen(dir))){

0 comments on commit fdb77f3

Please sign in to comment.