@@ -137,21 +137,21 @@ static void ncache_walk(struct lsof_context *ctx, KA_T ncp,
137137 if (sanity_check_vnode_impl (& vi ) == 0 && sanity_check_namecache (& nc ) == 0 ) {
138138 lnc = ncache_enter_local (vp , plnc , & nc );
139139 if (vi .vi_vnode .v_type == VDIR && vi .vi_nc_tree .rbt_root != NULL ) {
140- ncache_walk ((KA_T )vi .vi_nc_tree .rbt_root , lnc );
140+ ncache_walk (ctx , (KA_T )vi .vi_nc_tree .rbt_root , lnc );
141141 }
142142 }
143143 if (left )
144- ncache_walk (left , plnc );
144+ ncache_walk (ctx , left , plnc );
145145 if (right )
146- ncache_walk (right , plnc );
146+ ncache_walk (ctx , right , plnc );
147147}
148148
149149void ncache_load (struct lsof_context * ctx ) {
150150 KA_T rootvnode_addr ;
151151 struct vnode_impl vi ;
152152
153153 rootvnode_addr = (KA_T )0 ;
154- if (get_Nl_value ("rootvnode" , (struct drive_Nl * )NULL , & rootvnode_addr ) <
154+ if (get_Nl_value (ctx , "rootvnode" , (struct drive_Nl * )NULL , & rootvnode_addr ) <
155155 0 ||
156156 !rootvnode_addr ||
157157 kread (ctx , (KA_T )rootvnode_addr , (char * )& rootvnode_addr ,
@@ -161,7 +161,7 @@ void ncache_load(struct lsof_context *ctx) {
161161 }
162162
163163 rb_tree_init (& lnc_rbtree , & lnc_rbtree_ops );
164- ncache_walk ((KA_T )vi .vi_nc_tree .rbt_root , 0 );
164+ ncache_walk (ctx , (KA_T )vi .vi_nc_tree .rbt_root , 0 );
165165}
166166
167167static void build_path (char * * buf , size_t * remaining , const struct lnc * lnc ) {
@@ -187,7 +187,7 @@ static void build_path(char **buf, size_t *remaining, const struct lnc *lnc) {
187187 * buf += len ;
188188}
189189
190- char * ncache_lookup (char * buf , int blen , int * fp ) {
190+ char * ncache_lookup (struct lsof_context * ctx , char * buf , int blen , int * fp ) {
191191 const struct lnc * lnc ;
192192 char * p ;
193193 size_t remaining ;
0 commit comments