summaryrefslogtreecommitdiffstats
path: root/ftw.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-04-08 13:10:56 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-04-08 13:10:56 -0700
commit478ae133483a91b35028eca9666689669fe55015 (patch)
tree53ff027735fc2b9479bdc7d962b454ba636a065f /ftw.c
parent44638912c7353e46c5d2d9b6fe9362f662809f02 (diff)
downloadtxr-478ae133483a91b35028eca9666689669fe55015.tar.gz
txr-478ae133483a91b35028eca9666689669fe55015.tar.bz2
txr-478ae133483a91b35028eca9666689669fe55015.zip
New path slot in stat struct.
* ftw.c (ftw_callback): Pass path to stat_to_struct function. * socket.c (path_s): Variable definition removed from here. (sock_load_init): Do not intern path symbol here. * sysif.c (path_s): Variable definition moved here. (stat_to_struct): New parameter, path. Store its argument in the path slot of the structure. (stat_impl): New parameter, path. Pass argument to stat_to_struct. (statp, statl): Pass path down to stat_impl. (statf): Pass nil down as path argument of stat_impl. (sysif_init): Intern path symbol here. Add path_s to the slot list in the make_struct_type call which creates the stat structure type. * sysif.h (path_s): Declared here now. (stat_to_struct): Declaration updated. * txr.1: Documented new slot of stat structure and behavior of stat, lstat and fstat w.r.t. this slot.
Diffstat (limited to 'ftw.c')
-rw-r--r--ftw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ftw.c b/ftw.c
index 9f3109dc..346b0655 100644
--- a/ftw.c
+++ b/ftw.c
@@ -61,7 +61,7 @@ static int ftw_callback(const char *c_path, const struct stat *c_sb,
{
val path = string_utf8(c_path);
val type = num(c_type);
- val sb = stat_to_struct(*c_sb);
+ val sb = stat_to_struct(*c_sb, path);
val level = num(fb->level);
val base = num(fb->base);
val result;