Move check_file to os/$platform section
Keep check_file_generic() in shared code base, and allow special case code in check_file() in os section. In future, macOS will have additional checks in check_file(). Linux and FreeBSD wrappers just calls check_file_generic(). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes #12385
This commit is contained in:
parent
dd3bda39cf
commit
02601d8aa4
|
@ -116,3 +116,9 @@ after_zpool_upgrade(zpool_handle_t *zhp)
|
||||||
"details.\n"), zpool_get_name(zhp));
|
"details.\n"), zpool_get_name(zhp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
check_file(const char *file, boolean_t force, boolean_t isspare)
|
||||||
|
{
|
||||||
|
return (check_file_generic(file, force, isspare));
|
||||||
|
}
|
||||||
|
|
|
@ -410,3 +410,9 @@ void
|
||||||
after_zpool_upgrade(zpool_handle_t *zhp)
|
after_zpool_upgrade(zpool_handle_t *zhp)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
check_file(const char *file, boolean_t force, boolean_t isspare)
|
||||||
|
{
|
||||||
|
return (check_file_generic(file, force, isspare));
|
||||||
|
}
|
||||||
|
|
|
@ -131,6 +131,7 @@ boolean_t check_sector_size_database(char *path, int *sector_size);
|
||||||
void vdev_error(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
|
void vdev_error(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
|
||||||
int check_file(const char *file, boolean_t force, boolean_t isspare);
|
int check_file(const char *file, boolean_t force, boolean_t isspare);
|
||||||
void after_zpool_upgrade(zpool_handle_t *zhp);
|
void after_zpool_upgrade(zpool_handle_t *zhp);
|
||||||
|
int check_file_generic(const char *file, boolean_t force, boolean_t isspare);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ vdev_error(const char *fmt, ...)
|
||||||
* not in use by another pool, and not in use by swap.
|
* not in use by another pool, and not in use by swap.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
check_file(const char *file, boolean_t force, boolean_t isspare)
|
check_file_generic(const char *file, boolean_t force, boolean_t isspare)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
Loading…
Reference in New Issue