ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
|
Last change
on this file since b83c5e4 was 0feb39b, checked in by Matthieu Riolo <matthieu.riolo@…>, 7 years ago |
|
Correcting return type for printer function
Instead of returning a bool indicating a string, the
printer function in the command returns now an errno_t
|
-
Property mode
set to
100644
|
|
File size:
547 bytes
|
| Line | |
|---|
| 1 | #ifndef LS_H
|
|---|
| 2 | #define LS_H
|
|---|
| 3 |
|
|---|
| 4 | #include <vfs/vfs.h>
|
|---|
| 5 |
|
|---|
| 6 | /* Various values that can be returned by ls_scope() */
|
|---|
| 7 | #define LS_BOGUS 0
|
|---|
| 8 | #define LS_FILE 1
|
|---|
| 9 | #define LS_DIR 2
|
|---|
| 10 |
|
|---|
| 11 | /** Structure to represent a directory entry.
|
|---|
| 12 | *
|
|---|
| 13 | * Useful to keep together important information
|
|---|
| 14 | * for sorting directory entries.
|
|---|
| 15 | */
|
|---|
| 16 | struct dir_elem_t {
|
|---|
| 17 | char *name;
|
|---|
| 18 | vfs_stat_t s;
|
|---|
| 19 | };
|
|---|
| 20 |
|
|---|
| 21 | typedef struct {
|
|---|
| 22 | /* Options set at runtime. */
|
|---|
| 23 | unsigned int recursive;
|
|---|
| 24 | unsigned int sort;
|
|---|
| 25 |
|
|---|
| 26 | bool single_column;
|
|---|
| 27 | bool exact_size;
|
|---|
| 28 |
|
|---|
| 29 | errno_t (*printer)(struct dir_elem_t *);
|
|---|
| 30 | } ls_job_t;
|
|---|
| 31 |
|
|---|
| 32 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.