[ltp] hdapsd looking for non-existent file under /sys
Dimitris Kogias
linux-thinkpad@linux-thinkpad.org
Mon, 07 May 2007 18:14:39 -0700
Lenovo X60 1709-CTO
BIOS 2.10
Debian 2.6.20 kernel
tp_smapi Debian package 0.31-1 from
http://debian.die-welt.net/pool/main/tp-smapi/ built using m-a
Both hdaps and tp_smapi modules are loaded - in fact hdaps-gl only works
when they are both loaded.
hdapsd however (Debian unstable, version 20061007-2) fails to run
because /sys/block/sda/queue/protect is not present. Here's an strace:
execve("/usr/sbin/hdapsd", ["/usr/sbin/hdapsd", "-d", "sda"], [/* 13
vars */]) = 0
brk(0) = 0x503000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x2b043b1b0000
uname({sys="Linux", node="detritus", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x2b043b1b1000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=78368, ...}) = 0
mmap(NULL, 78368, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b043b1b3000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\331"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1367464, ...}) = 0
mmap(NULL, 3473592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x2b043b3b1000
mprotect(0x2b043b4f9000, 2093056, PROT_NONE) = 0
mmap(0x2b043b6f8000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x147000) = 0x2b043b6f8000
mmap(0x2b043b6fd000, 16568, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b043b6fd000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x2b043b702000
arch_prctl(ARCH_SET_FS, 0x2b043b7026f0) = 0
mprotect(0x2b043b6f8000, 12288, PROT_READ) = 0
munmap(0x2b043b1b3000, 78368) = 0
mlockall(MCL_FUTURE) = 0
open("/sys/block/sda/queue/protect", O_RDWR) = -1 ENOENT (No such file
or directory)
dup(2) = 3
fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
brk(0) = 0x503000
brk(0x524000) = 0x524000
fstat(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x2b043b1b3000
lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "open(protect_file): No such file"..., 46open(protect_file): No
such file or directory
) = 46
close(3) = 0
munmap(0x2b043b1b3000, 4096) = 0
exit_group(1) = ?
Process 4164 detached
Any ideas? Should hdapsd be looking elsewhere for that file?
Thanks
D.