use new proxmox::sys::linux::magic
This commit is contained in:
@ -225,7 +225,7 @@ impl <'a, W: Write> Encoder<'a, W> {
|
||||
}
|
||||
|
||||
fn read_fat_attr(&self, fd: RawFd, magic: i64, entry: &mut PxarEntry) -> Result<(), Error> {
|
||||
use fs::magic::*;
|
||||
use proxmox::sys::linux::magic::*;
|
||||
|
||||
if magic != MSDOS_SUPER_MAGIC && magic != FUSE_SUPER_MAGIC {
|
||||
return Ok(());
|
||||
@ -432,11 +432,13 @@ impl <'a, W: Write> Encoder<'a, W> {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
use proxmox::sys::linux::magic::*;
|
||||
|
||||
match magic {
|
||||
fs::magic::EXT4_SUPER_MAGIC |
|
||||
fs::magic::XFS_SUPER_MAGIC |
|
||||
fs::magic::FUSE_SUPER_MAGIC |
|
||||
fs::magic::ZFS_SUPER_MAGIC => {
|
||||
EXT4_SUPER_MAGIC |
|
||||
XFS_SUPER_MAGIC |
|
||||
FUSE_SUPER_MAGIC |
|
||||
ZFS_SUPER_MAGIC => {
|
||||
let mut fsxattr = fs::FSXAttr::default();
|
||||
let res = unsafe {
|
||||
fs::fs_ioc_fsgetxattr(fd, &mut fsxattr)
|
||||
@ -1115,12 +1117,12 @@ fn detect_fs_type(fd: RawFd) -> Result<i64, Error> {
|
||||
|
||||
#[inline(always)]
|
||||
pub fn is_temporary_file_system(magic: i64) -> bool {
|
||||
use fs::magic::*;
|
||||
use proxmox::sys::linux::magic::*;
|
||||
magic == RAMFS_MAGIC || magic == TMPFS_MAGIC
|
||||
}
|
||||
|
||||
pub fn is_virtual_file_system(magic: i64) -> bool {
|
||||
use fs::magic::*;
|
||||
use proxmox::sys::linux::magic::*;
|
||||
|
||||
match magic {
|
||||
BINFMTFS_MAGIC |
|
||||
|
@ -198,7 +198,7 @@ pub fn feature_flags_from_fat_attr(attr: u32) -> u64 {
|
||||
|
||||
/// Return the supported *pxar* feature flags based on the magic number of the filesystem.
|
||||
pub fn feature_flags_from_magic(magic: i64) -> u64 {
|
||||
use crate::tools::fs::magic::*;
|
||||
use proxmox::sys::linux::magic::*;
|
||||
match magic {
|
||||
MSDOS_SUPER_MAGIC => {
|
||||
WITH_2SEC_TIME|
|
||||
|
Reference in New Issue
Block a user