@@ -17,7 +17,7 @@
#define rounddown(x, y) (((x)/(y))*(y))
#define uuid_equal(s,d) (uuid_compare((*s),(*d)) == 0)
-extern int platform_check_ismounted(char *, char *, struct stat *, int);
+extern int check_ismounted(char *, char *, struct stat *, int);
static char *logfile_name;
static FILE *logerr;
@@ -698,7 +698,7 @@ main(int argc, char **argv)
* check to make sure a filesystem isn't mounted
* on the device
*/
- if (platform_check_ismounted(source_name, NULL, &statbuf, 0)) {
+ if (check_ismounted(source_name, NULL, &statbuf, 0)) {
do_log(
_("%s: Warning -- a filesystem is mounted on the source device.\n"),
progname);
@@ -842,7 +842,7 @@ main(int argc, char **argv)
* check to make sure a filesystem isn't mounted
* on the device
*/
- if (platform_check_ismounted(target[i].name,
+ if (check_ismounted(target[i].name,
NULL, &statbuf, 0)) {
do_log(_("%s: a filesystem is mounted "
"on target device \"%s\".\n"
@@ -114,7 +114,7 @@ platform_check_mount(char *name, char *block, struct stat *s, int flags)
}
int
-platform_check_ismounted(char *name, char *block, struct stat *s, int verbose)
+check_ismounted(char *name, char *block, struct stat *s, int verbose)
{
int flags;
@@ -122,6 +122,12 @@ platform_check_ismounted(char *name, char *block, struct stat *s, int verbose)
return check_mount(name, block, s, flags);
}
+int
+platform_check_ismounted(char *name, char *block, struct stat *s, int verbose)
+{
+ return check_ismounted(name, block, s, verbose);
+}
+
int
platform_check_iswritable(char *name, char *block, struct stat *s)
{
@@ -9,6 +9,7 @@
int platform_check_ismounted(char *path, char *block, struct stat *sptr,
int verbose);
+int check_ismounted(char *path, char *block, struct stat *sptr, int verbose);
int platform_check_iswritable(char *path, char *block, struct stat *sptr);
int platform_set_blocksize(int fd, char *path, dev_t device, int bsz,
int fatal);
@@ -59,7 +59,7 @@ check_isactive(char *name, char *block, int fatal)
return 0;
if ((st.st_mode & S_IFMT) != S_IFBLK)
return 0;
- if (platform_check_ismounted(name, block, &st, 0) == 0)
+ if (check_ismounted(name, block, &st, 0) == 0)
return 0;
if (platform_check_iswritable(name, block, &st))
return fatal ? 1 : 0;
@@ -212,7 +212,7 @@ check_open(char *path, int flags, char **rawfile, char **blockfile)
progname, path);
return 0;
}
- if (!readonly && !inactive && platform_check_ismounted(path, *blockfile, NULL, 1))
+ if (!readonly && !inactive && check_ismounted(path, *blockfile, NULL, 1))
return 0;
if (inactive && check_isactive(path, *blockfile, ((readonly|dangerously)?1:0)))
@@ -182,7 +182,7 @@ usage(void)
exit(1);
}
-extern int platform_check_ismounted(char *, char *, struct stat *, int);
+extern int check_ismounted(char *, char *, struct stat *, int);
int
main(
@@ -275,7 +275,7 @@ main(
/*
* check to make sure a filesystem isn't mounted on the device
*/
- if (platform_check_ismounted(argv[optind], NULL, &statbuf, 0))
+ if (check_ismounted(argv[optind], NULL, &statbuf, 0))
fatal("a filesystem is mounted on target device \"%s\","
" cannot restore to a mounted filesystem.\n",
argv[optind]);