LoongArch ioctl bindings omit FIEMAP constants

Open Beginner friendly
#192 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

Start with gen/ioctl/loongarch-ioctls.txt and compare its FIEMAP entries with other architecture snapshots and gen/ioctl/list.c. Regenerate or validate the LoongArch bindings, then check src/loongarch64/ioctl.rs to confirm the FIEMAP_EXTENT_* constants are exposed.

Written by the indexing model from the issue text.

Description

linux_raw_sys::ioctl on loongarch64 does not expose the FIEMAP constants
added in #97, such as FIEMAP_EXTENT_LAST, FIEMAP_EXTENT_SHARED, and
FIEMAP_EXTENT_DATA_INLINE.

gen/ioctl/list.c requests these constants, and generated bindings for other
architectures contain them. However, LoongArch uses the static fallback:

cat loongarch-ioctls.txt >> "$out"

The static gen/ioctl/loongarch-ioctls.txt contains FS_IOC_FIEMAP, but no
FIEMAP_* definitions at all. Consequently,
src/loongarch64/ioctl.rs contains FS_IOC_FIEMAP but no
FIEMAP_EXTENT_* constants.

This appears to have started when #97 added the FIEMAP requests: the LoongArch
static snapshot was not regenerated/updated. Commit #174 retained the static
fallback while updating the general generator, but did not modify this file.

Dominant language
Rust
Stars
71
Forks
63
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sunfishcode/linux-raw-sys

All issues in sunfishcode/linux-raw-sys

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.