/* find_empty_entry must be called before alloc_cluster */
dentry = find_empty_entry(inode, p_dir, num_entries);
if (dentry < 0)
- return FFS_FULL;
+ return -ENOSPC;
clu.dir = CLUSTER_32(~0);
clu.size = 0;
if (ret < 0)
return FFS_MEDIAERR;
else if (ret == 0)
- return FFS_FULL;
+ return -ENOSPC;
ret = clear_cluster(sb, clu.dir);
if (ret != FFS_SUCCESS)
/* find_empty_entry must be called before alloc_cluster() */
dentry = find_empty_entry(inode, p_dir, num_entries);
if (dentry < 0)
- return FFS_FULL;
+ return -ENOSPC;
/* (1) update the directory entry */
/* fill the dos name directory entry information of the created file.
newentry = find_empty_entry(inode, p_dir, num_new_entries);
if (newentry < 0) {
buf_unlock(sb, sector_old);
- return FFS_FULL;
+ return -ENOSPC;
}
epnew = get_entry_in_dir(sb, p_dir, newentry, §or_new);
newentry = find_empty_entry(inode, p_newdir, num_new_entries);
if (newentry < 0) {
buf_unlock(sb, sector_mov);
- return FFS_FULL;
+ return -ENOSPC;
}
epnew = get_entry_in_dir(sb, p_newdir, newentry, §or_new);
*wcount = write_bytes;
if (num_alloced == 0)
- ret = FFS_FULL;
+ ret = -ENOSPC;
else if (p_fs->dev_ejected)
ret = FFS_MEDIAERR;
ret = FFS_MEDIAERR;
goto out;
} else if (num_alloced == 0) {
- ret = FFS_FULL;
+ ret = -ENOSPC;
goto out;
}
err = -EINVAL;
else if (err == FFS_FILEEXIST)
err = -EEXIST;
- else if (err == FFS_FULL)
+ else if (err == -ENOSPC)
err = -ENOSPC;
else if (err == FFS_NAMETOOLONG)
err = -ENAMETOOLONG;
err = -EINVAL;
else if (err == FFS_FILEEXIST)
err = -EEXIST;
- else if (err == FFS_FULL)
+ else if (err == -ENOSPC)
err = -ENOSPC;
else
err = -EIO;
if (err) {
ffsRemoveFile(dir, &fid);
- if (err == FFS_FULL)
+ if (err == -ENOSPC)
err = -ENOSPC;
else
err = -EIO;
err = -EINVAL;
else if (err == FFS_FILEEXIST)
err = -EEXIST;
- else if (err == FFS_FULL)
+ else if (err == -ENOSPC)
err = -ENOSPC;
else if (err == FFS_NAMETOOLONG)
err = -ENAMETOOLONG;
err = -EEXIST;
else if (err == FFS_NOTFOUND)
err = -ENOENT;
- else if (err == FFS_FULL)
+ else if (err == -ENOSPC)
err = -ENOSPC;
else
err = -EIO;
err = ffsMapCluster(inode, clu_offset, &cluster);
if (err) {
- if (err == FFS_FULL)
+ if (err == -ENOSPC)
return -ENOSPC;
else
return -EIO;