{"record":{"id":"ba5260e14da979e7","repo":"ClementTsang/bottom","slug":"missing-filesystem-type","errorCode":null,"errorMessage":"missing filesystem type","messagePattern":"missing filesystem type","errorType":"error_code","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"src/collection/disks/unix/linux/partition.rs","lineNumber":143,"sourceCode":"\n        let device = match parts.next() {\n            Some(\"none\") => None,\n            Some(device) => Some(device.to_string()),\n            None => {\n                bail!(\"missing device\");\n            }\n        };\n\n        let mount_point = match parts.next() {\n            Some(mount_point) => PathBuf::from(fix_mount_point(mount_point)),\n            None => {\n                bail!(\"missing mount point\");\n            }\n        };\n        let fs_type = match parts.next() {\n            Some(fs) => FileSystem::from_str(fs)?,\n            _ => {\n                bail!(\"missing filesystem type\");\n            }\n        };\n\n        Ok(Partition {\n            device,\n            mount_point,\n            fs_type,\n        })\n    }\n}\n\n#[expect(dead_code)]\n/// Returns a [`Vec`] containing all partitions.\npub(crate) fn partitions() -> anyhow::Result<Vec<Partition>> {\n    const PROC_MOUNTS: &str = \"/proc/mounts\";\n\n    let mut results = vec![];\n    let mut reader = BufReader::new(File::open(PROC_MOUNTS)?);","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/ClementTsang/bottom/blob/b77d3175028849824e987c35177e8f61450d72e7/src/collection/disks/unix/linux/partition.rs#L125-L161","documentation":"Partition::from_str expects a /proc/mounts-style line with at least a device, mount point, and filesystem type. This error fires when the third field (filesystem type) is missing. It can also surface if FileSystem::from_str itself rejects the fs string.","triggerScenarios":"Calling Partition::from_str on a line with only 2 fields, or with a third field that FileSystem::from_str cannot interpret.","commonSituations":"Malformed mount table entries, unknown/novel filesystem identifiers not covered by FileSystem's enum parsing, or truncated input.","solutions":["Ensure each mounts line has device, mount point, and fs type fields","Check the fs type string is one the library's FileSystem parser recognizes","Update the library if a new filesystem type must be supported","Skip unparseable lines and continue with the remaining entries"],"exampleFix":"// before\nlet p = Partition::from_str(line)?;\n// after\nmatch Partition::from_str(line) {\n    Ok(p) => parts.push(p),\n    Err(e) => log::debug!(\"skipping mount line {line:?}: {e}\"),\n}","handlingStrategy":"validation","validationCode":"// Check field count and fs type presence first\nlet fields: Vec<&str> = line.split_whitespace().collect();\nlet parseable = fields.len() >= 3 && !fields[2].is_empty();","typeGuard":null,"tryCatchPattern":"match Partition::from_str(line) {\n    Ok(p) => parts.push(p),\n    Err(e) => log::debug!(\"skipping mount line {line:?}: {e}\"),\n}","preventionTips":["Keep the library updated for new filesystem type support","Sanity-check /proc/mounts contents on unusual systems","Handle per-line parse failures independently"],"tags":["linux","parsing","mounts","filesystem"],"backgroundTag":"schema-validation-failed","analyzedSha":"b77d3175028849824e987c35177e8f61450d72e7","analyzedAt":"2026-09-07T14:53:21.246Z","contentChangedAt":"2026-09-07T14:53:21.246Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}