mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: whitelist Oracle ACFS as a shared filesystem
The magic number is taken from the coreutils stat.c file since there is no constant for it in normal system headers. Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
6881ef2e4e
commit
27660f7990
@ -3426,6 +3426,8 @@ int virFilePrintf(FILE *fp, const char *msg, ...)
|
|||||||
# define QB_MAGIC 0x51626d6e
|
# define QB_MAGIC 0x51626d6e
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# define VIR_ACFS_MAGIC 0x61636673
|
||||||
|
|
||||||
# define PROC_MOUNTS "/proc/mounts"
|
# define PROC_MOUNTS "/proc/mounts"
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -3578,6 +3580,9 @@ virFileIsSharedFSType(const char *path,
|
|||||||
if ((fstypes & VIR_FILE_SHFS_QB) &&
|
if ((fstypes & VIR_FILE_SHFS_QB) &&
|
||||||
(f_type == QB_MAGIC))
|
(f_type == QB_MAGIC))
|
||||||
return 1;
|
return 1;
|
||||||
|
if ((fstypes & VIR_FILE_SHFS_ACFS) &&
|
||||||
|
(f_type == VIR_ACFS_MAGIC))
|
||||||
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -3765,7 +3770,8 @@ int virFileIsSharedFS(const char *path)
|
|||||||
VIR_FILE_SHFS_CIFS |
|
VIR_FILE_SHFS_CIFS |
|
||||||
VIR_FILE_SHFS_CEPH |
|
VIR_FILE_SHFS_CEPH |
|
||||||
VIR_FILE_SHFS_GPFS|
|
VIR_FILE_SHFS_GPFS|
|
||||||
VIR_FILE_SHFS_QB);
|
VIR_FILE_SHFS_QB |
|
||||||
|
VIR_FILE_SHFS_ACFS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -209,6 +209,7 @@ enum {
|
|||||||
VIR_FILE_SHFS_CEPH = (1 << 6),
|
VIR_FILE_SHFS_CEPH = (1 << 6),
|
||||||
VIR_FILE_SHFS_GPFS = (1 << 7),
|
VIR_FILE_SHFS_GPFS = (1 << 7),
|
||||||
VIR_FILE_SHFS_QB = (1 << 8),
|
VIR_FILE_SHFS_QB = (1 << 8),
|
||||||
|
VIR_FILE_SHFS_ACFS = (1 << 9),
|
||||||
};
|
};
|
||||||
|
|
||||||
int virFileIsSharedFSType(const char *path, int fstypes) ATTRIBUTE_NONNULL(1);
|
int virFileIsSharedFSType(const char *path, int fstypes) ATTRIBUTE_NONNULL(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user