Lines Matching refs:len

43 	size_t len;  member
51 .len = 0,
65 ssize_t len; in hmcdrv_cache_get() local
81 len = hmcdrv_cache_file.fsize - ftp->ofs; in hmcdrv_cache_get()
83 if (len > ftp->len) in hmcdrv_cache_get()
84 len = ftp->len; in hmcdrv_cache_get()
92 ((pos + len) <= hmcdrv_cache_file.len)) { in hmcdrv_cache_get()
96 len); in hmcdrv_cache_get()
98 hmcdrv_cache_file.fname, len, in hmcdrv_cache_get()
101 return len; in hmcdrv_cache_get()
117 ssize_t len; in hmcdrv_cache_do() local
124 if ((ftp->len > 0) && (hmcdrv_cache_file.len >= ftp->len)) { in hmcdrv_cache_do()
132 cftp.len = hmcdrv_cache_file.len; /* buffer data */ in hmcdrv_cache_do()
134 len = func(&cftp, &hmcdrv_cache_file.fsize); /* now do */ in hmcdrv_cache_do()
136 if (len > 0) { in hmcdrv_cache_do()
138 len, ftp->fname); in hmcdrv_cache_do()
140 if (len > ftp->len) in hmcdrv_cache_do()
141 len = ftp->len; in hmcdrv_cache_do()
146 memcpy(ftp->buf, hmcdrv_cache_file.content, len); in hmcdrv_cache_do()
149 len = func(ftp, &hmcdrv_cache_file.fsize); in hmcdrv_cache_do()
153 if (len > 0) { in hmcdrv_cache_do()
164 return len; in hmcdrv_cache_do()
180 ssize_t len; in hmcdrv_cache_cmd() local
186 len = hmcdrv_cache_get(ftp); in hmcdrv_cache_cmd()
188 if (len >= 0) /* got it from cache ? */ in hmcdrv_cache_cmd()
189 return len; /* yes */ in hmcdrv_cache_cmd()
191 len = hmcdrv_cache_do(ftp, func); in hmcdrv_cache_cmd()
193 if (len >= 0) in hmcdrv_cache_cmd()
194 return len; in hmcdrv_cache_cmd()
197 len = func(ftp, NULL); /* simply do original command */ in hmcdrv_cache_cmd()
207 return len; in hmcdrv_cache_cmd()
234 hmcdrv_cache_file.len = cachesize; in hmcdrv_cache_startup()
252 hmcdrv_cache_file.len = 0; /* no cache */ in hmcdrv_cache_shutdown()