To distinguish between real device and emulator,
add "_emulated" postfix into machine hardware name.
Change-Id: I0a801a127d0fb62314d6d30cac03febfd6d49801
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)
{
int errno = 0;
+#ifdef CONFIG_MARU
+ struct new_utsname u;
down_read(&uts_sem);
+ memcpy(&u, utsname(), sizeof *name);
+ up_read(&uts_sem);
+
+ strcat(u.machine, "_emulated");
+
+ if (copy_to_user(name, &u, sizeof *name))
+ errno = -EFAULT;
+#else
+ down_read(&uts_sem);
if (copy_to_user(name, utsname(), sizeof *name))
errno = -EFAULT;
up_read(&uts_sem);
-
+#endif
if (!errno && override_release(name->release, sizeof(name->release)))
errno = -EFAULT;
if (!errno && override_architecture(name))