qemu can't read the keyboard layout files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Invalid
|
Undecided
|
Unassigned | ||
kvm (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: qemu
I'm on Ubuntu 8.04.1,
the affected package is qemu 0.9.1-1ubuntu1
This is my command line:
qemu -M pc -hda /home/catonano/
With this, the keyboard layout is wrong, so I can't type the colon, the slash, the question mark.
I tried adding the "-k it" switch, like this
qemu -M pc -hda /home/catonano/
the result is:
Could not read keymap file: '/usr/share/
The same thing happens with the "-k fi" switch, I just tried a different layout file.
Now, look:
ls -l /usr/share/
-rw-r--r-- 1 root root 2462 2008-02-13 04:18 /usr/share/
The file is readable by anyone.
So why can't it read it ?
I tried to trace the call with strace but frankly I can't understand the output. There's an interesting line, though:
_llseek(3, 0, 0xbfda8758, SEEK_CUR) = -1 ESPIPE (Illegal seek)
This is the complete output:
sudo strace ./qemu.sh
execve("./qemu.sh", ["./qemu.sh"], [/* 16 vars */]) = -1 ENOEXEC (Exec format error)
dup(2) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=
mmap2(NULL, 4096, PROT_READ|
_llseek(3, 0, 0xbfda8758, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: Exec format error\n", 32strace: exec: Exec format error
) = 32
close(3) = 0
munmap(0xb7f88000, 4096) = 0
exit_group(1) = ?
Process 13858 detached
To reproduce this , just install qemu and run it with any image AND a "-k it" OR "-k fi" switch.
Thanks
Sorry I tried a more readable command line and got a more readable output too ;-)
adriano@ adriano- laptop: ~$ strace qemu -M pc -hda /home/adriano/ Scrivania/ openwrt- x86-jffs2- 128k.image -m 64, -k it, -net nic,vlan=0 -net user,vlan= 0,hostname= emu -boot c
execve( "/usr/bin/ qemu", ["qemu", "-M", "pc", "-hda", "/home/ adriano/ Scrivania/ openwrt- "..., "-m", "64,", "-k", "it,", "-net", "nic,vlan=0", "-net", "user,vlan= 0,hostname= emu", "-boot", "c"], [/* 35 vars */]) = 0
brk(0)
[...]
stat64( "/home/ adriano/ Scrivania/ openwrt- x86-jffs2- 128k.image" , {st_mode= S_IFREG| 0644, st_size=21676032, ...}) = 0 home/adriano/ Scrivania/ openwrt- x86-jffs2- 128k.image" , O_RDONLY| O_LARGEFILE) = 4 220\0\0\ 0\0\0\0\ 0\0\0\0\ 0\0\0\0\ 0\0\0\0\ 0\0\0\0\ 0"..., 2048) = 2048 home/adriano/ Scrivania/ openwrt- x86-jffs2- 128k.image" , O_RDWR|O_LARGEFILE) = 4 usr/share/ qemu/keymaps/ it,", O_RDONLY| O_LARGEFILE) = -1 ENOENT (No such file or directory) qemu/keymaps/ it,'
open("/
_llseek(4, 0, [21676032], SEEK_END) = 0
_llseek(4, 0, [0], SEEK_SET) = 0
read(4, "\353H\
close(4) = 0
open("/
_llseek(4, 0, [21676032], SEEK_END) = 0
open("/
write(2, "Could not read keymap file: \'/us"..., 58Could not read keymap file: '/usr/share/
) = 58
exit_group(1) = ?
Process 23907 detached
Where the interesting line is: usr/share/ qemu/keymaps/ it,", O_RDONLY| O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/
And:
adriano@ adriano- laptop: ~$ ls -l /usr/share/ qemu/keymaps/ it qemu/keymaps/ it adriano- laptop: ~$
-rw-r--r-- 1 root root 2462 2008-02-13 04:18 /usr/share/
adriano@
So ls CAN access the file, qemu can NOT.
I really wonder why !