• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/netatalk-2.2.5/etc/afpd/

Lines Matching refs:sd

57     struct savedir *sd = data; 
61 end = sd->sd_buf + sd->sd_buflen;
63 *(sd->sd_last)++ = len;
65 if ( sd->sd_last + len +lenm + 4 > end ) {
68 start = sd->sd_buf;
69 if (!(buf = realloc( sd->sd_buf, sd->sd_buflen +SDBUFBRK )) ) {
75 sd->sd_buf = buf;
76 sd->sd_buflen += SDBUFBRK;
77 sd->sd_last = ( sd->sd_last - start ) + sd->sd_buf;
78 end = sd->sd_buf + sd->sd_buflen;
81 memcpy( sd->sd_last, de->d_name, len + 1 );
82 sd->sd_last += len + 1;
84 *(sd->sd_last)++ = lenm;
85 memcpy( sd->sd_last, mname, lenm + 1 );
86 sd->sd_last += lenm + 1;
170 static struct savedir sd = { 0, 0, 0, NULL, NULL, 0 };
183 if ( sd.sd_buflen == 0 ) {
184 if (( sd.sd_buf = (char *)malloc( SDBUFBRK )) == NULL ) {
189 sd.sd_buflen = SDBUFBRK;
287 if ( sindex == 1 || curdir->d_did != sd.sd_did || vid != sd.sd_vid ) {
288 sd.sd_last = sd.sd_buf;
291 (ret = for_each_dirent(vol, ".", enumerate_loop, (void *)&sd)) < 0)
306 *sd.sd_last = 0;
308 sd.sd_last = sd.sd_buf;
309 sd.sd_sindex = 1;
311 sd.sd_vid = vid;
312 sd.sd_did = curdir->d_did;
318 if ( sindex < sd.sd_sindex ) {
319 sd.sd_sindex = 1;
320 sd.sd_last = sd.sd_buf;
322 while ( sd.sd_sindex < sindex ) {
323 len = (unsigned char)*(sd.sd_last)++;
325 sd.sd_did = 0; /* invalidate sd struct to force re-read */
328 sd.sd_last += len + 1;
329 sd.sd_sindex++;
332 while (( len = (unsigned char)*(sd.sd_last)) != 0 ) {
344 start = sd.sd_last;
345 sd.sd_last++;
347 if (*sd.sd_last == 0) {
349 sd.sd_last += len + 1;
353 s_path.u_name = sd.sd_last;
362 * sd.sd_did = 0 but if it's not ENOENT error it will start again
364 *sd.sd_last = 0;
365 sd.sd_last += len + 1;
374 sd.sd_last += len + 1;
440 sd.sd_last = start;
467 sd.sd_did = 0; /* invalidate sd struct to force re-read */
470 sd.sd_sindex = sindex + actcnt;