summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEnrico Jorns <ejo@pengutronix.de>2016-10-04 12:10:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-10-24 08:14:41 +0200
commit9bcbb51263b5f21981651cd146dec439def797e3 (patch)
tree7518508ceb13db3e29930d46aeb1c94183630a9f /fs
parent6feed0b491d7f433abca608d4a1d872045187774 (diff)
downloadbarebox-9bcbb51263b5f21981651cd146dec439def797e3.tar.gz
barebox-9bcbb51263b5f21981651cd146dec439def797e3.tar.xz
Add filetype and detection for squashfs images
This adds `filetype_squashfs` to the list of known filetypes and adds a detection for squashfs files to file_detect_type(). This currently matches on the `hsqs` start sequence of an image file. Additionally, the newly introduced filetype is registered as the type of the squashfs_driver which allows, for example, to mount squashfs without the need to specify a type parameter. This changes enable booting a squashfs with the simple `boot` command pointing to the location (device) that holds the squashfs. Note that booting with blspec is limited as the current squashfs driver is not capable of handling symbolic links. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/squashfs/squashfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/squashfs/squashfs.c b/fs/squashfs/squashfs.c
index d00dee6caa..6d046810d9 100644
--- a/fs/squashfs/squashfs.c
+++ b/fs/squashfs/squashfs.c
@@ -353,6 +353,7 @@ static struct fs_driver_d squashfs_driver = {
.readdir = squashfs_readdir,
.closedir = squashfs_closedir,
.stat = squashfs_stat,
+ .type = filetype_squashfs,
.drv = {
.probe = squashfs_probe,
.remove = squashfs_remove,