Skip to contentSkip to conversation

Don't hardcode path as it is architecture dependent

PATCH In review Ritesh Raj Sarraf 2 participants 2 messages Sep 20, 2018 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't hardcode path as it is architecture dependent

The current code fails to run on amd64 because of hardcoded reference to i386

---
 arch/um/drivers/port_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/drivers/port_user.c +1 -1
index 9a8e1b64c22e..5f56d11b886f 100644
@@ -168,7 +168,7 @@ int port_connection(int fd, int *socket, int *pid_out)
 {
 	int new, err;
 	char *argv[] = { "/usr/sbin/in.telnetd", "-L",
-			 "/usr/lib/uml/port-helper", NULL };
+			 OS_LIB_PATH "/uml/port-helper", NULL };
 	struct port_pre_exec_data data;
 
 	new = accept(fd, NULL, 0);
Signature · 1 line
2.18.0
#1 lore raw

Am Donnerstag, 20. September 2018, 08:26:38 CEST schrieb Ritesh Raj Sarraf:

Quoted 4 lines

The current code fails to run on amd64 because of hardcoded reference to i386

Thanks for spotting this!

Quoted 9 lines
---
 arch/um/drivers/port_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/drivers/port_user.c +0 -0
index 9a8e1b64c22e..5f56d11b886f 100644

arch/um/drivers/port_user.c int port_connection(int fd, int *socket, int *pid_out) · line 174

Quoted 8 lines
arch/um/drivers/port_user.c +1 -1
@@ -168,7 +168,7 @@ int port_connection(int fd, int *socket, int *pid_out)
 {
 	int new, err;
 	char *argv[] = { "/usr/sbin/in.telnetd", "-L",
-			 "/usr/lib/uml/port-helper", NULL };
+			 OS_LIB_PATH "/uml/port-helper", NULL };
 	struct port_pre_exec_data data;
 
 	new = accept(fd, NULL, 0);

Thanks,
//richard