Align all filesystem relevant places to use B_UNSUPPORTED for unsupported

instead of a mix of B_NOT_SUPPORTED and B_UNSUPPORTED. This allows checking for
a specific error code. Probably one of those should be phased out...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43025 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2011-10-31 10:18:03 +00:00
parent 988cfaca32
commit a735bdebb9
9 changed files with 46 additions and 46 deletions

View File

@ -1030,7 +1030,7 @@ bfs_link(fs_volume* _volume, fs_vnode* dir, const char* name, fs_vnode* node)
FUNCTION_START(("name = \"%s\"\n", name));
// This one won't be implemented in a binary compatible BFS
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}

View File

@ -773,7 +773,7 @@ Journal::_CheckFeatures(JournalSuperBlock* superblock)
& ~JOURNAL_KNOWN_READ_ONLY_COMPATIBLE_FEATURES) != 0
|| (superblock->IncompatibleFeatures()
& ~JOURNAL_KNOWN_INCOMPATIBLE_FEATURES) != 0)
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
return B_OK;
}

View File

@ -309,7 +309,7 @@ Volume::Mount(const char* deviceName, uint32 flags)
// check read-only features if mounting read-write
if (!IsReadOnly() && _UnsupportedReadOnlyFeatures(fSuperBlock) != 0)
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
// initialize short hands to the super block (to save byte swapping)
fBlockShift = fSuperBlock.BlockShift();
@ -378,7 +378,7 @@ Volume::Mount(const char* deviceName, uint32 flags)
} else {
// TODO: external journal
TRACE("Can not open an external journal.\n");
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}
} else {
TRACE("Opening a fake journal (NoJournal).\n");
@ -935,7 +935,7 @@ Volume::Identify(int fd, ext2_super_block* superBlock)
}
return _UnsupportedIncompatibleFeatures(*superBlock) == 0
? B_OK : B_NOT_SUPPORTED;
? B_OK : B_UNSUPPORTED;
}

View File

@ -864,7 +864,7 @@ ext2_link(fs_volume* volume, fs_vnode* dir, const char* name, fs_vnode* node)
{
// TODO
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}

View File

@ -526,7 +526,7 @@ parse_rock_ridge(iso9660_volume* volume, iso9660_inode* node, char* buffer,
// Relocated directory, we should skip.
TRACE(("RR: found RE, length %u\n", length));
if (!relocated)
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
break;
case 'TF':
@ -540,7 +540,7 @@ parse_rock_ridge(iso9660_volume* volume, iso9660_inode* node, char* buffer,
case 'SF':
TRACE(("RR: found SF, sparse files not supported!\n"));
// TODO: support sparse files
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
default:
if (buffer[0] == '\0') {
@ -750,7 +750,7 @@ ISOReadDirEnt(iso9660_volume *volume, dircookie *cookie, struct dirent *dirent,
&bytesRead);
// if we hit an entry that we don't support, we just skip it
if (result != B_OK && result != B_NOT_SUPPORTED)
if (result != B_OK && result != B_UNSUPPORTED)
break;
if (result == B_OK && (node.flags & ISO_IS_ASSOCIATED_FILE) == 0) {

View File

@ -97,7 +97,7 @@ Volume::Lookup(void* dir, const char* entryName, ino_t* vnid)
status_t
Volume::GetVNodeType(void* node, int* type)
{
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}

View File

@ -1559,13 +1559,13 @@ devfs_ioctl(fs_volume* _volume, fs_vnode* _vnode, void* _cookie, uint32 op,
case B_GET_NEXT_OPEN_DEVICE:
dprintf("devfs: unsupported legacy ioctl B_GET_NEXT_OPEN_DEVICE\n");
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
case B_ADD_FIXED_DRIVER:
dprintf("devfs: unsupported legacy ioctl B_ADD_FIXED_DRIVER\n");
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
case B_REMOVE_FIXED_DRIVER:
dprintf("devfs: unsupported legacy ioctl B_REMOVE_FIXED_DRIVER\n");
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}

View File

@ -985,7 +985,7 @@ _user_rewind_dir(int fd)
if (descriptor->ops->fd_rewind_dir)
status = descriptor->ops->fd_rewind_dir(descriptor);
else
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
put_fd(descriptor);
return status;
@ -1258,7 +1258,7 @@ _kern_read_dir(int fd, struct dirent* buffer, size_t bufferSize,
if (retval >= 0)
retval = count;
} else
retval = B_NOT_SUPPORTED;
retval = B_UNSUPPORTED;
put_fd(descriptor);
return retval;
@ -1280,7 +1280,7 @@ _kern_rewind_dir(int fd)
if (descriptor->ops->fd_rewind_dir)
status = descriptor->ops->fd_rewind_dir(descriptor);
else
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
put_fd(descriptor);
return status;

View File

@ -1689,7 +1689,7 @@ normalize_flock(struct file_descriptor* descriptor, struct flock* flock)
status_t status;
if (!HAS_FS_CALL(vnode, read_stat))
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
status = FS_CALL(vnode, read_stat, &stat);
if (status != B_OK)
@ -2444,7 +2444,7 @@ get_vnode_name(struct vnode* vnode, struct vnode* parent, struct dirent* buffer,
// parent directory for the vnode, if the caller let us.
if (parent == NULL)
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
void* cookie;
@ -4170,7 +4170,7 @@ vfs_read_stat(int fd, const char* path, bool traverseLeafLink,
if (descriptor->ops->fd_read_stat)
status = descriptor->ops->fd_read_stat(descriptor, stat);
else
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
put_fd(descriptor);
}
@ -5231,7 +5231,7 @@ static int
open_attr_dir_vnode(struct vnode* vnode, bool kernel)
{
if (!HAS_FS_CALL(vnode, open_attr_dir))
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
void* cookie;
status_t status = FS_CALL(vnode, open_attr_dir, &cookie);
@ -5462,7 +5462,7 @@ file_seek(struct file_descriptor* descriptor, off_t pos, int seekType)
{
// stat() the node
if (!HAS_FS_CALL(vnode, read_stat))
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
struct stat stat;
status_t status = FS_CALL(vnode, read_stat, &stat);
@ -5716,7 +5716,7 @@ dir_read(struct io_context* ioContext, struct vnode* vnode, void* cookie,
struct dirent* buffer, size_t bufferSize, uint32* _count)
{
if (!HAS_FS_CALL(vnode, read_dir))
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
status_t error = FS_CALL(vnode, read_dir, cookie, buffer, bufferSize,
_count);
@ -5746,7 +5746,7 @@ dir_rewind(struct file_descriptor* descriptor)
return FS_CALL(vnode, rewind_dir, descriptor->cookie);
}
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}
@ -5876,7 +5876,7 @@ common_fcntl(int fd, int op, uint32 argument, bool kernel)
status = FS_CALL(vnode, set_flags, descriptor->cookie,
(int)argument);
} else
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
if (status == B_OK) {
// update this descriptor's open_mode field
@ -5969,7 +5969,7 @@ common_sync(int fd, bool kernel)
if (HAS_FS_CALL(vnode, fsync))
status = FS_CALL_NO_PARAMS(vnode, fsync);
else
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
put_fd(descriptor);
return status;
@ -6063,7 +6063,7 @@ common_create_symlink(int fd, char* path, const char* toPath, int mode,
status = FS_CALL(vnode, create_symlink, name, toPath, mode);
else {
status = HAS_FS_CALL(vnode, write)
? B_NOT_SUPPORTED : B_READ_ONLY_DEVICE;
? B_UNSUPPORTED : B_READ_ONLY_DEVICE;
}
put_vnode(vnode);
@ -6359,7 +6359,7 @@ attr_dir_read(struct io_context* ioContext, struct file_descriptor* descriptor,
return FS_CALL(vnode, read_attr_dir, descriptor->cookie, buffer,
bufferSize, _count);
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}
@ -6373,7 +6373,7 @@ attr_dir_rewind(struct file_descriptor* descriptor)
if (HAS_FS_CALL(vnode, rewind_attr_dir))
return FS_CALL(vnode, rewind_attr_dir, descriptor->cookie);
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}
@ -6443,7 +6443,7 @@ attr_open(int fd, char* path, const char* name, int openMode, bool kernel)
}
if (!HAS_FS_CALL(vnode, open_attr)) {
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
goto err;
}
@ -6505,7 +6505,7 @@ attr_read(struct file_descriptor* descriptor, off_t pos, void* buffer,
*length));
if (!HAS_FS_CALL(vnode, read_attr))
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
return FS_CALL(vnode, read_attr, descriptor->cookie, pos, buffer, length);
}
@ -6519,7 +6519,7 @@ attr_write(struct file_descriptor* descriptor, off_t pos, const void* buffer,
FUNCTION(("attr_write: buf %p, pos %Ld, len %p\n", buffer, pos, length));
if (!HAS_FS_CALL(vnode, write_attr))
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
return FS_CALL(vnode, write_attr, descriptor->cookie, pos, buffer, length);
}
@ -6541,7 +6541,7 @@ attr_seek(struct file_descriptor* descriptor, off_t pos, int seekType)
{
struct vnode* vnode = descriptor->u.vnode;
if (!HAS_FS_CALL(vnode, read_stat))
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
struct stat stat;
status_t status = FS_CALL(vnode, read_attr_stat, descriptor->cookie,
@ -6576,7 +6576,7 @@ attr_read_stat(struct file_descriptor* descriptor, struct stat* stat)
FUNCTION(("attr_read_stat: stat 0x%p\n", stat));
if (!HAS_FS_CALL(vnode, read_attr_stat))
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
return FS_CALL(vnode, read_attr_stat, descriptor->cookie, stat);
}
@ -6685,7 +6685,7 @@ index_dir_open(dev_t mountID, bool kernel)
return status;
if (!HAS_FS_MOUNT_CALL(mount, open_index_dir)) {
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
goto error;
}
@ -6748,7 +6748,7 @@ index_dir_read(struct io_context* ioContext, struct file_descriptor* descriptor,
bufferSize, _count);
}
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}
@ -6760,7 +6760,7 @@ index_dir_rewind(struct file_descriptor* descriptor)
if (HAS_FS_MOUNT_CALL(mount, rewind_index_dir))
return FS_MOUNT_CALL(mount, rewind_index_dir, descriptor->cookie);
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}
@ -6798,9 +6798,9 @@ index_read_stat(struct file_descriptor* descriptor, struct stat* stat)
// ToDo: currently unused!
FUNCTION(("index_read_stat: stat 0x%p\n", stat));
if (!HAS_FS_CALL(vnode, read_index_stat))
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
//return FS_CALL(vnode, read_index_stat, descriptor->cookie, stat);
}
@ -6831,7 +6831,7 @@ index_name_read_stat(dev_t mountID, const char* name, struct stat* stat,
return status;
if (!HAS_FS_MOUNT_CALL(mount, read_index_stat)) {
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
goto out;
}
@ -6887,7 +6887,7 @@ query_open(dev_t device, const char* query, uint32 flags, port_id port,
return status;
if (!HAS_FS_MOUNT_CALL(mount, open_query)) {
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
goto error;
}
@ -6951,7 +6951,7 @@ query_read(struct io_context* ioContext, struct file_descriptor* descriptor,
bufferSize, _count);
}
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}
@ -6963,7 +6963,7 @@ query_rewind(struct file_descriptor* descriptor)
if (HAS_FS_MOUNT_CALL(mount, rewind_query))
return FS_MOUNT_CALL(mount, rewind_query, descriptor->cookie);
return B_NOT_SUPPORTED;
return B_UNSUPPORTED;
}
@ -8230,7 +8230,7 @@ _kern_write_stat(int fd, const char* path, bool traverseLeafLink,
if (descriptor->ops->fd_write_stat)
status = descriptor->ops->fd_write_stat(descriptor, stat, statMask);
else
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
put_fd(descriptor);
}
@ -9143,7 +9143,7 @@ _user_read_stat(int fd, const char* userPath, bool traverseLink,
if (descriptor->ops->fd_read_stat)
status = descriptor->ops->fd_read_stat(descriptor, &stat);
else
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
put_fd(descriptor);
}
@ -9204,7 +9204,7 @@ _user_write_stat(int fd, const char* userPath, bool traverseLeafLink,
status = descriptor->ops->fd_write_stat(descriptor, &stat,
statMask);
} else
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
put_fd(descriptor);
}
@ -9284,7 +9284,7 @@ _user_stat_attr(int fd, const char* attribute, struct attr_info* userAttrInfo)
if (descriptor->ops->fd_read_stat)
status = descriptor->ops->fd_read_stat(descriptor, &stat);
else
status = B_NOT_SUPPORTED;
status = B_UNSUPPORTED;
put_fd(descriptor);
_user_close(attr);