doc: added details about statfs.type and statfs.bsize#51301
Closed
Jordan-Nguy wants to merge 1 commit intonodejs:mainfrom
Jordan-Nguy:doc-fsstatfs
Closed
doc: added details about statfs.type and statfs.bsize#51301Jordan-Nguy wants to merge 1 commit intonodejs:mainfrom Jordan-Nguy:doc-fsstatfs
statfs.type and statfs.bsize#51301Jordan-Nguy wants to merge 1 commit intonodejs:mainfrom
Jordan-Nguy:doc-fsstatfs
Conversation
Contributor
|
/cc @nodejs/fs |
Member
LiviaMedeiros
left a comment
There was a problem hiding this comment.
Thanks for the contribution! The changes LGTM with the following nit.
The decimal part might be redundant: usually users can use hex values directly:
export const REISERFS_SUPER_MAGIC = 0x52654973;
// or
const magic2humanReadable = { ..., 0x52654973: 'ReiserFS', ... };
// or even
if (statfsBigInt.type === 0x52654973n) { // reiserfsI would suggest adding a link to statfs(2) manpage instead of pasting the whole table here.
This way, we won't have to update the list every time a new fs emerges.
LiviaMedeiros
approved these changes
May 16, 2024
Magic numbers from man page of statfs.
aduh95
reviewed
May 17, 2024
| * {number|bigint} | ||
|
|
||
| Type of file system. | ||
| Magic number of file system in decimal. |
Contributor
There was a problem hiding this comment.
It's not in decimal, it's just.. a number (if anything it's in binary, or IEEE 754).
Suggested change
| Magic number of file system in decimal. | |
| Magic number of file system. |
aduh95
reviewed
May 17, 2024
|
|
||
| | Filesystem Type | Hexadecimal | Decimal | | ||
| | ----------------------- | ------------ | ------------ | | ||
| | ADFS\_SUPER\_MAGIC | `0xadf5` | `44533` | |
Contributor
There was a problem hiding this comment.
nit: it would be more readable to wrap those in ticks
Suggested change
| | ADFS\_SUPER\_MAGIC | `0xadf5` | `44533` | | |
| | `ADFS_SUPER_MAGIC` | `0xadf5` | `44533` | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added byte unit to
statfs.bsizedescription. Addedstatfs.typelist of potential values pulled from man page of statfs on Linux.Fixes: #50749