Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cp(1) from ntfs fails



In article <20080424182542.GA837%blenny.salmi.ch@localhost>,
Jukka Salmi  <j+nbsd%2008.salmi.ch@localhost> wrote:
>Hello,
>
>trying to copy files from a ntfs (win xp) file system using cp(1) on
>a 4.99.60 i386 system currently fails (IIRC this used to work):
>
>$ mount
>[...]
>/dev/wd0n on /mnt/win type ntfs (read-only, local)
>
>$ ls -l /mnt/win/BOOT.INI
>-rwxr-xr-x  1 root  wheel  194 Sep 18  2006 /mnt/win/BOOT.INI
>
>$ cp /mnt/win/BOOT.INI .
>cp: ./BOOT.INI: Invalid argument
>
>
>Tracing cp(1) shows:
>
>[...]
>   615      1 cp       CALL  open(0xbb907c00,0,0)
>   615      1 cp       NAMI  "/mnt/win/BOOT.INI"
>   615      1 cp       RET   open 3
>   615      1 cp       CALL  open(0x804b208,0x601,0x81ed)
>   615      1 cp       NAMI  "./BOOT.INI"
>   615      1 cp       RET   open 4
>   615      1 cp       CALL  mmap(0,0xc2,1,1,3,0,0,0)
>   615      1 cp       RET   mmap -1146105856/0xbbafd000
>   615      1 cp       CALL  madvise(0xbbafd000,0xc2,2)
>   615      1 cp       RET   madvise 0
>   615      1 cp       CALL  write(4,0xbbafd000,0xc2)
>   615      1 cp       RET   write -1 errno 22 Invalid argument
>[...]
>
>Hmm, why could the write be failing?

mmap is not supported on ntfs, it should really return MAP_FAILED, but it
does not, please file a PR.

christos



Home | Main Index | Thread Index | Old Index