-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
doc: added details about statfs.type
and statfs.bsize
#51301
Conversation
/cc @nodejs/fs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) { // reiserfs
I 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.
Magic numbers from man page of statfs.
@@ -7568,7 +7568,101 @@ added: | |||
|
|||
* {number|bigint} | |||
|
|||
Type of file system. | |||
Magic number of file system in decimal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not in decimal, it's just.. a number (if anything it's in binary, or IEEE 754).
Magic number of file system in decimal. | |
Magic number of file system. |
|
||
| Filesystem Type | Hexadecimal | Decimal | | ||
| ----------------------- | ------------ | ------------ | | ||
| ADFS\_SUPER\_MAGIC | `0xadf5` | `44533` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it would be more readable to wrap those in ticks
| ADFS\_SUPER\_MAGIC | `0xadf5` | `44533` | | |
| `ADFS_SUPER_MAGIC` | `0xadf5` | `44533` | |
Added byte unit to
statfs.bsize
description. Addedstatfs.type
list of potential values pulled from man page of statfs on Linux.Fixes: #50749