Home | History | Annotate | Download | only in utils

Lines Matching refs:scan

174 compare_timezone_to_localtime( ScanDataRec*  scan,
187 if ( st.st_size != scan->localtime_st.st_size ) {
188 D( " size mistmatch (%zd != %zd)\n", (size_t)st.st_size, (size_t)scan->localtime_st.st_size );
192 fd1 = open( scan->localtime, O_RDONLY );
194 D(" can't open %s: %s\n", scan->localtime, strerror(errno) );
233 scan_timezone_dir( ScanDataRec* scan,
237 DIR* d = opendir( scan->path );
240 D( "%s: entering '%s\n", __FUNCTION__, scan->path );
250 p = bufprint( p, scan->path_end, "/%s", ent->d_name );
251 if (p >= scan->path_end)
254 //D( "%s: scanning '%s'\n", __FUNCTION__, scan->path );
256 if ( stat( scan->path, &ent_st ) < 0 )
261 //D( "%s: directory '%s'\n", __FUNCTION__, scan->path );
262 result = scan_timezone_dir( scan, p, depth + 1 );
268 char* name = scan->path_root + 1;
272 if (compare_timezone_to_localtime( scan, scan->path ))
281 //D( "%s: ignoring '%s'\n", __FUNCTION__, scan->path );
381 ScanDataRec scan[1];
383 if ( stat( localtime, &scan->localtime_st ) < 0 ) {
389 scan->localtime = localtime;
390 scan->path_end = scan->path + sizeof(scan->path);
391 scan->path_root = bufprint( scan->path, scan->path_end, "%s", tzdir );
393 tz = scan_timezone_dir( scan, scan->path_root, 0 );