qemu can't read the keyboard layout files

Bug #258539 reported by cato
2
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/Scrivania/openwrt-x86-jffs2-128k.image -m 64, -net nic,vlan=0 -net user,vlan=0,hostname=emu -boot c

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/Scrivania/openwrt-x86-jffs2-128k.image -m 64, -k it, -net nic,vlan=0 -net user,vlan=0,hostname=emu -boot c

the result is:

Could not read keymap file: '/usr/share/qemu/keymaps/it,'

The same thing happens with the "-k fi" switch, I just tried a different layout file.

Now, look:

ls -l /usr/share/qemu/keymaps/it
-rw-r--r-- 1 root root 2462 2008-02-13 04:18 /usr/share/qemu/keymaps/it

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=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f88000
_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

Revision history for this message
cato (catonano) wrote :

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
open("/home/adriano/Scrivania/openwrt-x86-jffs2-128k.image", O_RDONLY|O_LARGEFILE) = 4
_llseek(4, 0, [21676032], SEEK_END) = 0
_llseek(4, 0, [0], SEEK_SET) = 0
read(4, "\353H\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
close(4) = 0
open("/home/adriano/Scrivania/openwrt-x86-jffs2-128k.image", O_RDWR|O_LARGEFILE) = 4
_llseek(4, 0, [21676032], SEEK_END) = 0
open("/usr/share/qemu/keymaps/it,", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
write(2, "Could not read keymap file: \'/us"..., 58Could not read keymap file: '/usr/share/qemu/keymaps/it,'
) = 58
exit_group(1) = ?
Process 23907 detached

Where the interesting line is:
open("/usr/share/qemu/keymaps/it,", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

And:

adriano@adriano-laptop:~$ ls -l /usr/share/qemu/keymaps/it
-rw-r--r-- 1 root root 2462 2008-02-13 04:18 /usr/share/qemu/keymaps/it
adriano@adriano-laptop:~$

So ls CAN access the file, qemu can NOT.

I really wonder why !

Revision history for this message
cato (catonano) wrote :

I discovered this with qemu, but now I disinstalled qemu and using kvm and if you substitute "qemu" with "kvm" in my commandlines, the simptom is EXACTLY equal. It's there

Revision history for this message
cato (catonano) wrote :

sorry, it was a mistake on my side :-(

I just didn't spell correctly the command

Changed in kvm:
status: New → Invalid
Revision history for this message
Craig Ringer (ringerc) wrote :

Reported invalid by submitter.

Changed in qemu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.