Skip to content

Commit

Permalink
Merge pull request #245 from ktock/xattrerrno
Browse files Browse the repository at this point in the history
mapdir: use EOPNOTSUPP for xattr
  • Loading branch information
ktock authored Mar 7, 2024
2 parents 43e793f + 42a8f2c commit d3555d3
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 22 deletions.
3 changes: 2 additions & 1 deletion patches/bochs/Bochs/bochs/wasm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ static int errno_table[][2] = {
{ P9_ENOSPC, ENOSPC },
{ P9_ENOTEMPTY, ENOTEMPTY },
{ P9_EPROTO, EPROTO },
{ P9_EOPNOTSUPP, EOPNOTSUPP },
{ P9_ENOTSUP, ENOTSUP },
};

Expand Down Expand Up @@ -2413,7 +2414,7 @@ int bx_virtio_9p_ctrl_c::device_recv(int queue_idx, int desc_idx, int read_size,
case 30: /* xattrwalk */
{
/* not supported yet */
err = -P9_ENOTSUP;
err = -P9_EOPNOTSUPP;
goto error;
}
break;
Expand Down
21 changes: 11 additions & 10 deletions patches/bochs/Bochs/bochs/wasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,16 +450,17 @@ class bx_virtio_ctrl_c : public bx_pci_device_c {
#define P9_SETATTR_ATIME_SET 0x00000080
#define P9_SETATTR_MTIME_SET 0x00000100

#define P9_EPERM 1
#define P9_ENOENT 2
#define P9_EIO 5
#define P9_EEXIST 17
#define P9_ENOTDIR 20
#define P9_EINVAL 22
#define P9_ENOSPC 28
#define P9_ENOTEMPTY 39
#define P9_EPROTO 71
#define P9_ENOTSUP 524
#define P9_EPERM 1
#define P9_ENOENT 2
#define P9_EIO 5
#define P9_EEXIST 17
#define P9_ENOTDIR 20
#define P9_EINVAL 22
#define P9_ENOSPC 28
#define P9_ENOTEMPTY 39
#define P9_EPROTO 71
#define P9_EOPNOTSUPP 95
#define P9_ENOTSUP 524

typedef struct VIRTIO9PDevice {
FSDevice *fs;
Expand Down
21 changes: 11 additions & 10 deletions patches/tinyemu/tinyemu/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,17 @@
#define P9_SETATTR_ATIME_SET 0x00000080
#define P9_SETATTR_MTIME_SET 0x00000100

#define P9_EPERM 1
#define P9_ENOENT 2
#define P9_EIO 5
#define P9_EEXIST 17
#define P9_ENOTDIR 20
#define P9_EINVAL 22
#define P9_ENOSPC 28
#define P9_ENOTEMPTY 39
#define P9_EPROTO 71
#define P9_ENOTSUP 524
#define P9_EPERM 1
#define P9_ENOENT 2
#define P9_EIO 5
#define P9_EEXIST 17
#define P9_ENOTDIR 20
#define P9_EINVAL 22
#define P9_ENOSPC 28
#define P9_ENOTEMPTY 39
#define P9_EPROTO 71
#define P9_EOPNOTSUPP 95
#define P9_ENOTSUP 524

typedef struct FSDevice FSDevice;
typedef struct FSFile FSFile;
Expand Down
1 change: 1 addition & 0 deletions patches/tinyemu/tinyemu/fs_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ static int errno_table[][2] = {
{ P9_ENOSPC, ENOSPC },
{ P9_ENOTEMPTY, ENOTEMPTY },
{ P9_EPROTO, EPROTO },
{ P9_EOPNOTSUPP, EOPNOTSUPP },
{ P9_ENOTSUP, ENOTSUP },
};

Expand Down
2 changes: 1 addition & 1 deletion patches/tinyemu/tinyemu/virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2276,7 +2276,7 @@ static int virtio_9p_recv_request(VIRTIODevice *s1, int queue_idx,
case 30: /* xattrwalk */
{
/* not supported yet */
err = -P9_ENOTSUP;
err = -P9_EOPNOTSUPP;
goto error;
}
break;
Expand Down

0 comments on commit d3555d3

Please sign in to comment.