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

Implement lv2_fs_mount_point #7199

Merged
merged 4 commits into from
Jan 5, 2020
Merged

Implement lv2_fs_mount_point #7199

merged 4 commits into from
Jan 5, 2020

Conversation

Nekotekina
Copy link
Member

@Nekotekina Nekotekina commented Jan 4, 2020

As a side effect, protect dev_bdvd mount from accidental unwanted changes.


if (mp_name == "dev_hdd1"sv)
return &g_mp_sys_dev_hdd1;
if (mp_name.substr(0, 7) == "dev_usb"sv)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is starts_with now (C++20), but it requires /std:c++latest which may not be desirable yet.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not available yet

{
return name;
}
filename = filename.substr(0, 0x420 - 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
filename = filename.substr(0, 0x420 - 1);
const size_t len = std::min<size_t>(filename.size(), name.size() - 1);

With that the only place with 0x420 magic will be in name variable declaration.

Implement some actual mount points
Implement lv2_mp_flag::no_uid_gid
Implement lv2_mp_flag::read_only.
Currently only /dev_bdvd is affected.
Allow single-file case (consistently with sys_fs_open)
Don't use fs::append (not capable of).
Fix sys_fs_ftruncate (remove wrong workaround).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants