summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-10-26 08:38:19 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-10-27 09:43:57 +0200
commite6a09861b9a76b5527aa1310cff3d4e772b292b8 (patch)
tree4aec60947a1f1c72342a17c970d5435f080d40f6 /include
parentf9f0c098048f8fa76f9f4945b0fe16e9333530d5 (diff)
downloadbarebox-e6a09861b9a76b5527aa1310cff3d4e772b292b8.tar.gz
barebox-e6a09861b9a76b5527aa1310cff3d4e772b292b8.tar.xz
commands: add new stat command
We have a couple of commands to help with debugging the VFS: ll, devinfo, devlookup, but we lack a command that can just dump all information we have in a struct stat or struct cdev. Add stat as such a command. For most uses, it's not needed, but it can come in handy for development. The stat_print and cdev_print functions underlying it are exported, so they can called for debugging purposes. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221026063819.2355568-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/fs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/fs.h b/include/fs.h
index b501db38ad..f96839f9eb 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -147,6 +147,9 @@ int ls(const char *path, ulong flags);
char *mkmodestr(unsigned long mode, char *str);
+void stat_print(const char *filename, const struct stat *st);
+void cdev_print(const struct cdev *cdev);
+
char *canonicalize_path(const char *pathname);
char *get_mounted_path(const char *path);