+
Skip to content

Conversation

refi64
Copy link
Contributor

@refi64 refi64 commented Dec 17, 2021

proc(5) mentions the following for the fields section and hyphen:

(7) optional fields: zero or more fields of the form "tag[:value]";
see below.
(8) separator: the end of the optional fields is marked by a single
hyphen.

IOW, there may actually be multiple optional fields, not just one, in
which case the previously hardcoded indexes for the filesystem type and
device name are now incorrect. Now, the filesystem type and device name
are parsed relative to the hypen's location, ensuring that they will be
correct regardless of the number of optional fields.

Signed-off-by: Ryan Gonzalez ryan.gonzalez@collabora.com

@sylvestre
Copy link
Contributor

Would it be possible to add a test for this? thanks

@refi64 refi64 force-pushed the mountinfo-optional branch 2 times, most recently from 2420330 to bc7e4fc Compare December 17, 2021 22:56
@refi64
Copy link
Contributor Author

refi64 commented Dec 17, 2021

@sylvestre done!

proc(5) mentions the following for the fields section and hyphen:

> (7)  optional fields: zero or more fields of the form "tag[:value]";
> see below.
> (8)  separator: the end of the optional fields is marked by a single
> hyphen.

IOW, there may actually be multiple optional fields, not just one, in
which case the previously hardcoded indexes for the filesystem type and
device name are now incorrect. Now, the filesystem type and device name
are parsed relative to the hypen's location, ensuring that they will be
correct regardless of the number of optional fields.

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
@refi64 refi64 force-pushed the mountinfo-optional branch from bc7e4fc to 23c0734 Compare December 20, 2021 14:46
@sylvestre sylvestre merged commit 5c0adb2 into uutils:master Dec 22, 2021
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.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载