BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000394 [BusyBox] Other major always 08-21-05 09:48 12-14-05 16:44
Reporter morpheusz View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0000394: cp doesn't exit with an error if there isn't enough space left on device
Description If i try to copy a file on a device with no more space left cp doesn't write any error in output and the returned value is 0, i tryed with linux/x86 and linux/arm.

I have attached a patch to fix the problems.
Additional Information This is a short procedure to reproduce the error (with superuser):

First of all i create a small "device" (1MB)
~ # dd if=/dev/zero of=disk.img bs=1k count=1000
~ # mkfs.ext2 -F disk.img

and i mount it so i can read/write into
~ # mkdir test
~ # mount -o loop,rw disk.img test/

then i create another file of Note: 0000800KB
~ # dd if=/dev/zero of=file.img bs=1k count=900

~ # cp file.img test/
~ # tosorea ~ # df -h |grep test
/root/disk.img 979K 818K 111K 89% /root/test

When have another 111K free, not enough for anoter copy of file.img, but..

~ # cp file.img test/file2.img
any error in output..

~ # echo $?
~ # 0

and the return value is 0, then

~ # ls -l test/
totale 978
-rw-r--r-- 1 root root 163840 21 ago 18:39 file2.img
-rw-r--r-- 1 root root 819200 21 ago 18:33 file.img
drwx------ 2 root root 12288 21 ago 18:31 lost+found

file2 is corrupt.
Attached Files  copyfd-cp.patch [^] (483 bytes) 08-21-05 09:48

- Relationships

- Notes
(0000762)
landley
12-14-05 16:44

svn 12146
 

- Issue History
Date Modified Username Field Change
08-21-05 09:48 morpheusz New Issue
08-21-05 09:48 morpheusz Status new => assigned
08-21-05 09:48 morpheusz Assigned To  => BusyBox
08-21-05 09:48 morpheusz File Added: copyfd-cp.patch
12-14-05 16:44 landley Status assigned => closed
12-14-05 16:44 landley Note Added: 0000762
12-14-05 16:44 landley Resolution open => fixed
12-14-05 16:44 landley Fixed in Version  => svn


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker