diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-02-08 09:04:27 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-02-08 09:04:27 +0100 |
commit | 0dce5375d799e727bd1aa5ccdb28156d9bcd4d17 (patch) | |
tree | e1c6dd036a69ab954616219dfa0cee8312bb43f8 /fs/fs.c | |
parent | 6f826bfe45298721a92bbe93d32a6a0eb76d46ee (diff) | |
parent | 74cdc34323ee23b9b195866c56699e268f05841a (diff) | |
download | barebox-0dce5375d799e727bd1aa5ccdb28156d9bcd4d17.tar.gz barebox-0dce5375d799e727bd1aa5ccdb28156d9bcd4d17.tar.xz |
Merge branch 'for-next/tftp-workaround'
Diffstat (limited to 'fs/fs.c')
-rw-r--r-- | fs/fs.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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; +} |