Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libstorage: adapt to msg api change #54

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 46 additions & 34 deletions libstorage/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,145 +22,157 @@
storage_fs_t *fs;

if (data == NULL) {
msg->o.io.err = -EINVAL;
msg->o.err = -EINVAL;

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'struct <anonymous>' has no member named 'err'

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'struct <anonymous>' has no member named 'err'

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'struct <anonymous>' has no member named 'err'

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'struct <anonymous>' has no member named 'err'

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 25 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

'struct <anonymous>' has no member named 'err'
return;
}

fs = (storage_fs_t *)data;
if (fs->ops == NULL) {
msg->o.io.err = -EINVAL;
msg->o.err = -EINVAL;

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'struct <anonymous>' has no member named 'err'

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'struct <anonymous>' has no member named 'err'

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'struct <anonymous>' has no member named 'err'

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'struct <anonymous>' has no member named 'err'

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 31 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

'struct <anonymous>' has no member named 'err'
return;
}

switch (msg->type) {
case mtOpen:
if (fs->ops->open == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'struct <anonymous>' has no member named 'err'

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'struct <anonymous>' has no member named 'err'

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'struct <anonymous>' has no member named 'err'

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'struct <anonymous>' has no member named 'err'

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 38 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

'struct <anonymous>' has no member named 'err'
break;
}
msg->o.io.err = fs->ops->open(fs->info, &msg->i.openclose.oid);
msg->o.err = fs->ops->open(fs->info, &msg->oid);

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

'struct <anonymous>' has no member named 'err'

Check failure on line 41 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?
break;

case mtClose:
if (fs->ops->close == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'struct <anonymous>' has no member named 'err'

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'struct <anonymous>' has no member named 'err'

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'struct <anonymous>' has no member named 'err'

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'struct <anonymous>' has no member named 'err'

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 46 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

'struct <anonymous>' has no member named 'err'
break;
}
msg->o.io.err = fs->ops->close(fs->info, &msg->i.openclose.oid);
msg->o.err = fs->ops->close(fs->info, &msg->oid);

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

'struct <anonymous>' has no member named 'err'

Check failure on line 49 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

'msg_t' {aka 'struct _msg_t'} has no member named 'oid'; did you mean 'pid'?
break;

case mtRead:
if (fs->ops->read == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'struct <anonymous>' has no member named 'err'

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'struct <anonymous>' has no member named 'err'

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'struct <anonymous>' has no member named 'err'

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'struct <anonymous>' has no member named 'err'

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 54 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

'struct <anonymous>' has no member named 'err'
break;
}
msg->o.io.err = fs->ops->read(fs->info, &msg->i.io.oid, msg->i.io.offs, msg->o.data, msg->o.size);
msg->o.err = fs->ops->read(fs->info, &msg->oid, msg->i.io.offs, msg->o.data, msg->o.size);

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'struct <anonymous>' has no member named 'err'

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'struct <anonymous>' has no member named 'err'

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'struct <anonymous>' has no member named 'err'

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'struct <anonymous>' has no member named 'err'

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'struct <anonymous>' has no member named 'err'

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 57 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

'struct <anonymous>' has no member named 'err'
break;

case mtWrite:
if (fs->ops->write == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.io.err = fs->ops->write(fs->info, &msg->i.io.oid, msg->i.io.offs, msg->i.data, msg->i.size);
msg->o.err = fs->ops->write(fs->info, &msg->oid, msg->i.io.offs, msg->i.data, msg->i.size);
break;

case mtTruncate:
if (fs->ops->truncate == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.io.err = fs->ops->truncate(fs->info, &msg->i.io.oid, msg->i.io.len);
msg->o.err = fs->ops->truncate(fs->info, &msg->oid, msg->i.io.len);
break;

case mtDevCtl:
if (fs->ops->devctl == NULL) {
/* FIXME this error passing works by accident on ioctl(),
* there's no dedicated error field for devctl. */
msg->o.io.err = -ENOTTY; /* To return valid errno on ioctl() */
msg->o.err = -ENOTTY; /* To return valid errno on ioctl() */
break;
}
fs->ops->devctl(fs->info, &msg->i.io.oid, msg->i.raw, msg->o.raw);
fs->ops->devctl(fs->info, &msg->oid, msg->i.raw, msg->o.raw);
break;

case mtCreate:
if (fs->ops->create == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.create.err = fs->ops->create(fs->info, &msg->i.create.dir, msg->i.data, &msg->o.create.oid, msg->i.create.mode, msg->i.create.type, &msg->i.create.dev);
msg->o.err = fs->ops->create(fs->info, &msg->oid, msg->i.data, &msg->o.create.oid, msg->i.create.mode, msg->i.create.type, &msg->i.create.dev);
break;

case mtDestroy:
if (fs->ops->destroy == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.io.err = fs->ops->destroy(fs->info, &msg->i.destroy.oid);
msg->o.err = fs->ops->destroy(fs->info, &msg->oid);
break;

case mtSetAttr:
if (fs->ops->setattr == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.attr.err = fs->ops->setattr(fs->info, &msg->i.attr.oid, msg->i.attr.type, msg->i.attr.val, msg->i.data, msg->i.size);
msg->o.err = fs->ops->setattr(fs->info, &msg->oid, msg->i.attr.type, msg->i.attr.val, msg->i.data, msg->i.size);
break;

case mtGetAttr:
if (fs->ops->getattr == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.attr.err = fs->ops->getattr(fs->info, &msg->i.attr.oid, msg->i.attr.type, &msg->o.attr.val);
msg->o.err = fs->ops->getattr(fs->info, &msg->oid, msg->i.attr.type, &msg->o.attr.val);
break;

case mtGetAttrAll:
if (fs->ops->getattrall == NULL) {
msg->o.err = -ENOSYS;
break;
}
agkaminski marked this conversation as resolved.
Show resolved Hide resolved
if ((msg->o.size < sizeof(struct _attrAll)) || (msg->o.data == NULL)) {
msg->o.err = -EINVAL;
break;
}
msg->o.err = fs->ops->getattrall(fs->info, &msg->oid, (struct _attrAll *)msg->o.data);

Check warning on line 127 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

passing argument 3 of 'fs->ops->getattrall' from incompatible pointer type [-Wincompatible-pointer-types]

Check warning on line 127 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

passing argument 3 of 'fs->ops->getattrall' from incompatible pointer type [-Wincompatible-pointer-types]

Check warning on line 127 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

passing argument 3 of 'fs->ops->getattrall' from incompatible pointer type [-Wincompatible-pointer-types]

Check warning on line 127 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

passing argument 3 of 'fs->ops->getattrall' from incompatible pointer type [-Wincompatible-pointer-types]

Check warning on line 127 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

passing argument 3 of 'fs->ops->getattrall' from incompatible pointer type [-Wincompatible-pointer-types]

Check warning on line 127 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

passing argument 3 of 'fs->ops->getattrall' from incompatible pointer type [-Wincompatible-pointer-types]

Check warning on line 127 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

passing argument 3 of 'fs->ops->getattrall' from incompatible pointer type [-Wincompatible-pointer-types]

Check warning on line 127 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

passing argument 3 of 'fs->ops->getattrall' from incompatible pointer type [-Wincompatible-pointer-types]

Check warning on line 127 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

passing argument 3 of 'fs->ops->getattrall' from incompatible pointer type [-Wincompatible-pointer-types]

Check warning on line 127 in libstorage/fs.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

passing argument 3 of 'fs->ops->getattrall' from incompatible pointer type [-Wincompatible-pointer-types]
break;

case mtLookup:
if (fs->ops->lookup == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.lookup.err = fs->ops->lookup(fs->info, &msg->i.lookup.dir, msg->i.data, &msg->o.lookup.fil, &msg->o.lookup.dev, msg->o.data, msg->o.size);
msg->o.err = fs->ops->lookup(fs->info, &msg->oid, msg->i.data, &msg->o.lookup.fil, &msg->o.lookup.dev, msg->o.data, msg->o.size);
break;

case mtLink:
if (fs->ops->link == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.io.err = fs->ops->link(fs->info, &msg->i.ln.dir, msg->i.data, &msg->i.ln.oid);
msg->o.err = fs->ops->link(fs->info, &msg->oid, msg->i.data, &msg->i.ln.oid);
break;

case mtUnlink:
if (fs->ops->unlink == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.io.err = fs->ops->unlink(fs->info, &msg->i.ln.dir, msg->i.data);
msg->o.err = fs->ops->unlink(fs->info, &msg->oid, msg->i.data);
break;

case mtReaddir:
if (fs->ops->readdir == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.io.err = fs->ops->readdir(fs->info, &msg->i.readdir.dir, msg->i.readdir.offs, msg->o.data, msg->o.size);
msg->o.err = fs->ops->readdir(fs->info, &msg->oid, msg->i.readdir.offs, msg->o.data, msg->o.size);
break;

case mtStat:
if (fs->ops->statfs == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
msg->o.io.err = fs->ops->statfs(fs->info, msg->o.data, msg->o.size);
msg->o.err = fs->ops->statfs(fs->info, msg->o.data, msg->o.size);
break;

case mtSync:
if (fs->ops->sync == NULL) {
msg->o.io.err = -ENOSYS;
msg->o.err = -ENOSYS;
break;
}
fs->ops->sync(fs->info, &msg->i.io.oid);
fs->ops->sync(fs->info, &msg->oid);
break;

default:
Expand Down
5 changes: 3 additions & 2 deletions libstorage/include/storage/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@

ssize_t (*read)(void *info, oid_t *oid, off_t offs, void *data, size_t len);
ssize_t (*write)(void *info, oid_t *oid, off_t offs, const void *data, size_t len);
int (*setattr)(void *info, oid_t *oid, int type, long long attr, void *data, size_t len);
int (*setattr)(void *info, oid_t *oid, int type, long long attr, const void *data, size_t len);
int (*getattr)(void *info, oid_t *oid, int type, long long *attr);
int (*getattrall)(void *info, oid_t *oid, struct _attrAll *attrs);

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-pc)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (riscv64-generic-qemu)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (ia32-generic-qemu)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (sparcv8leon3-gr716-mini)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration

Check warning on line 34 in libstorage/include/storage/fs.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct _attrAll' declared inside parameter list will not be visible outside of this definition or declaration
int (*truncate)(void *info, oid_t *oid, size_t size);
void (*devctl)(void *info, oid_t *oid, const void *in, void *out);
int (*devctl)(void *info, oid_t *oid, const void *in, void *out);

int (*create)(void *info, oid_t *oid, const char *name, oid_t *dev, unsigned mode, int type, oid_t *res);
int (*destroy)(void *info, oid_t *oid);
Expand Down
Loading