-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
df: rows appear in different order on each execution, but shouldn't #3086
Labels
Comments
Do you have any idea what GNU's order is based on? |
On my Linux machine, It seems like it is based on the order given in coreutils/src/uucore/src/lib/features/fsext.rs Lines 403 to 406 in 1f7c08d
df::filter_mount_list() collects them into a HashMap : Line 187 in 1f7c08d
|
Good to know! Thanks! |
jfinkels
added a commit
to jfinkels/coreutils
that referenced
this issue
Feb 13, 2022
Change the `filter_mount_list()` function so that it always produces the same order of `MountInfo` objects. This change ultimately results in `df` printing its table of filesystems in the same order on each execution. Previously, the table was in an arbitrary order because the `MountInfo` objects were read from a `HashMap`. Fixes uutils#3086.
jfinkels
added a commit
to jfinkels/coreutils
that referenced
this issue
Feb 13, 2022
Change the `filter_mount_list()` function so that it always produces the same order of `MountInfo` objects. This change ultimately results in `df` printing its table of filesystems in the same order on each execution. Previously, the table was in an arbitrary order because the `MountInfo` objects were read from a `HashMap`. Fixes uutils#3086.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running
df
with no other arguments results in a different order of rows on each execution. In contrast, the GNU version of df seems to produce rows in the same order on each execution.GNU df:
uutils df:
The text was updated successfully, but these errors were encountered: