aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/user_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/user_util.c')
-rw-r--r--arch/um/kernel/user_util.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/um/kernel/user_util.c b/arch/um/kernel/user_util.c
index 954ff67cc8b3..41d17c71511c 100644
--- a/arch/um/kernel/user_util.c
+++ b/arch/um/kernel/user_util.c
@@ -109,18 +109,14 @@ int raw(int fd)
109 int err; 109 int err;
110 110
111 CATCH_EINTR(err = tcgetattr(fd, &tt)); 111 CATCH_EINTR(err = tcgetattr(fd, &tt));
112 if (err < 0) { 112 if(err < 0)
113 printk("tcgetattr failed, errno = %d\n", errno); 113 return -errno;
114 return(-errno);
115 }
116 114
117 cfmakeraw(&tt); 115 cfmakeraw(&tt);
118 116
119 CATCH_EINTR(err = tcsetattr(fd, TCSADRAIN, &tt)); 117 CATCH_EINTR(err = tcsetattr(fd, TCSADRAIN, &tt));
120 if (err < 0) { 118 if(err < 0)
121 printk("tcsetattr failed, errno = %d\n", errno); 119 return -errno;
122 return(-errno);
123 }
124 120
125 /* XXX tcsetattr could have applied only some changes 121 /* XXX tcsetattr could have applied only some changes
126 * (and cfmakeraw() is a set of changes) */ 122 * (and cfmakeraw() is a set of changes) */
@@ -132,6 +128,12 @@ void setup_machinename(char *machine_out)
132 struct utsname host; 128 struct utsname host;
133 129
134 uname(&host); 130 uname(&host);
131#if defined(UML_CONFIG_UML_X86) && !defined(UML_CONFIG_64BIT)
132 if (!strcmp(host.machine, "x86_64")) {
133 strcpy(machine_out, "i686");
134 return;
135 }
136#endif
135 strcpy(machine_out, host.machine); 137 strcpy(machine_out, host.machine);
136} 138}
137 139