[U-Boot] [REQ] ls command with date and filename-only

Frank Wunderlich frank-w at public-files.de
Mon Apr 15 17:11:01 UTC 2019


Hi,

is it possible to extend ls-command (file-listing) with the filedate (modification-date) and with option to show only the filename?

i looked around a bit and fs_dirent (include/fs.h) needs to be extended with a field for holding the timestamp. how should it be stored (uint32 for unix-timestamp)? how can i print this as datetime in fs_ls_generic (fs/fs.c)? how to add extra optional param to ls-command (without breaking current behaviour)? ls is defined in cmd/fs.c with 3 params (driver, partition, directory).

how to define optional params? imho i need to increase the current value (4=>5), check the paramcount in do_ls (fs/fs.c) and if it's 5 use the 4th as option (currently >4 exits the command, partition seems optional atm...this brings me problems)...also the directory is optional (index 3/null)

regards Frank


More information about the U-Boot mailing list