It's a read, not a write, but here's the strace. (this is fdisk-2.9i)
execve("./fdisk", ["./fdisk", "-b", "2048", "/dev/sda"], [/* 24 vars */]) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40007000
mprotect(0x40000000, 20881, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0x8048000, 69708, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
stat("/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=4853, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 4
mmap(0, 4853, PROT_READ, MAP_SHARED, 4, 0) = 0x40008000
close(4) = 0
stat("/etc/ld.so.preload", 0xbffffae0) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.5", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 794624, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000a000
mmap(0x4000a000, 562371, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x4000a000
mmap(0x40094000, 20304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x89000) = 0x40094000
mmap(0x40099000, 207288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40099000
close(4) = 0
mprotect(0x4000a000, 562371, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
munmap(0x40008000, 4853) = 0
mprotect(0x8048000, 69708, PROT_READ|PROT_EXEC) = 0
mprotect(0x4000a000, 562371, PROT_READ|PROT_EXEC) = 0
mprotect(0x40000000, 20881, PROT_READ|PROT_EXEC) = 0
personality(PER_LINUX) = 0
geteuid() = 0
getuid() = 0
getgid() = 0
getegid() = 0
brk(0x805d60c) = 0x805d60c
brk(0x805e000) = 0x805e000
stat("/etc/locale/C/libc.cat", 0xbffff614) = -1 ENOENT (No such file or directory)
stat("/usr/share/locale/C/libc.cat", 0xbffff614) = -1 ENOENT (No such file or directory)
stat("/usr/share/locale/libc/C", 0xbffff614) = -1 ENOENT (No such file or directory)
stat("/usr/share/locale/C/libc.cat", 0xbffff614) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/locale/C/libc.cat", 0xbffff614) = -1 ENOENT (No such file or directory)
open("/dev/sda", O_RDWR) = 4
fstat(4, {st_mode=S_IFBLK|0640, st_rdev=makedev(8, 0), ...}) = 0
read(4, "\353eLILO\1\0\22\0\377\377\0\0\0"..., 2048) = 2048
ioctl(4, HDIO_GETGEO, 0xbffffa78) = 0
_llseek(0x4, 0x8, 0, 0xbffff9ec, 0) = 0
read(4, "", 2048) = 0
write(2, "\n", 1) = 1
write(2, "Unable to read /dev/sda\n", 24) = 24
_exit(1) = ?
-- -Ben Carter Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. - Douglas Adams, "Last Chance to See"- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/