mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
ext2: return ENXIO if trying to open socket
This commit is contained in:
@@ -1053,8 +1053,13 @@ static void freeinode(ext2fs_t *fs, inode_t *inode, int id) {
|
||||
static int ext2_open(vnode_t **vnodep, int flags, cred_t *cred) {
|
||||
vnode_t *vnode = *vnodep;
|
||||
int type = vnode->type;
|
||||
// TODO device files
|
||||
__assert(type == V_TYPE_REGULAR || type == V_TYPE_DIR || type == V_TYPE_LINK || type == V_TYPE_FIFO);
|
||||
if (type == V_TYPE_SOCKET)
|
||||
return ENXIO;
|
||||
|
||||
if (type == V_TYPE_CHDEV || type == V_TYPE_BLKDEV) {
|
||||
printf("ext2: device files currently unimplemented\n");
|
||||
return ENODEV;
|
||||
}
|
||||
|
||||
int error = 0;
|
||||
if (type == V_TYPE_FIFO) {
|
||||
|
||||
Reference in New Issue
Block a user