summaryrefslogtreecommitdiffstats
path: root/fs/fs.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-02-08 09:04:27 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-02-08 09:04:27 +0100
commit0dce5375d799e727bd1aa5ccdb28156d9bcd4d17 (patch)
treee1c6dd036a69ab954616219dfa0cee8312bb43f8 /fs/fs.c
parent6f826bfe45298721a92bbe93d32a6a0eb76d46ee (diff)
parent74cdc34323ee23b9b195866c56699e268f05841a (diff)
downloadbarebox-0dce5375d799e727bd1aa5ccdb28156d9bcd4d17.tar.gz
barebox-0dce5375d799e727bd1aa5ccdb28156d9bcd4d17.tar.xz
Merge branch 'for-next/tftp-workaround'
Diffstat (limited to 'fs/fs.c')
-rw-r--r--fs/fs.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/fs.c b/fs/fs.c
index d188fa995f..88f0b14784 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1914,3 +1914,25 @@ char *path_get_linux_rootarg(const char *path)
return xstrdup(str);
}
+
+/**
+ * __is_tftp_fs() - return true when path is mounted on TFTP
+ * @path: The path
+ *
+ * Do not use directly, use is_tftp_fs instead.
+ *
+ * Return: true when @path is on TFTP, false otherwise
+ */
+bool __is_tftp_fs(const char *path)
+{
+ struct fs_device_d *fsdev;
+
+ fsdev = get_fsdevice_by_path(path);
+ if (!fsdev)
+ return false;
+
+ if (strcmp(fsdev->driver->drv.name, "tftp"))
+ return false;
+
+ return true;
+}