• 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:offset

124 static int set_off_t(off_t offset, char *rbuf, int is64)
131 temp = htonl(offset >> 32);
135 offset &= 0xffffffff;
137 temp = htonl(offset);
153 static int sum_neg(int is64, off_t offset, off_t reqcount)
155 if (is_neg(is64, offset +reqcount) )
663 off_t offset, length;
690 offset = get_off_t(&ibuf, is64);
703 offset += ad_size(ofork->of_ad, eid);
708 if (offset < 0) /* error if we have a negative offset */
715 if (ad_lock(ofork->of_ad, eid, lockop, offset, length,
734 *rbuflen = set_off_t (offset, rbuf, is64);
773 off_t offset, u_char nlmask,
781 cc = ad_read(ofork->of_ad, eid, offset, rbuf, *rbuflen);
830 * if offset +reqcount > size of file
833 * read fork offset 0 size 10752 ???? ==> 4264 bytes (without EOF)
834 * read fork offset 4264 size 6128 ==> 4264 (without EOF)
835 * read fork offset 9248 size 1508 ==> 1182 (EOF)
843 off_t offset, saveoff, reqcount, savereqcount;
863 offset = get_off_t(&ibuf, is64);
876 if (reqcount < 0 || offset < 0) {
897 LOG(log_debug, logtype_afpd, "afp_read(name: \"%s\", offset: %jd, reqcount: %jd)",
898 of_name(ofork), (intmax_t)offset, (intmax_t)reqcount);
901 saveoff = offset;
908 LOG(log_debug, logtype_afpd, "afp_read(name: \"%s\", offset: %jd, reqcount: %jd): reading %jd bytes from file",
909 of_name(ofork), (intmax_t)offset, (intmax_t)reqcount, (intmax_t)*rbuflen);
910 err = read_file(ofork, eid, offset, nlmask, nlchar, rbuf, rbuflen, xlate);
913 LOG(log_debug, logtype_afpd, "afp_read(name: \"%s\", offset: %jd, reqcount: %jd): got %jd bytes from file",
914 of_name(ofork), (intmax_t)offset, (intmax_t)reqcount, (intmax_t)*rbuflen);
925 /* subtract off the offset */
926 size -= offset;
932 offset += *rbuflen;
946 fd = ad_readfile_init(ofork->of_ad, eid, &offset, 0);
948 if (dsi_stream_read_file(dsi, fd, offset, dsi->datasize) < 0) {
966 cc = read_file(ofork, eid, offset, nlmask, nlchar, rbuf,rbuflen, xlate);
970 offset += *rbuflen;
1142 off_t offset, char *rbuf,
1161 if (( cc = ad_write(ofork->of_ad, eid, offset, 0,
1187 off_t offset, saveoff, reqcount, oldsize, newsize;
1199 offset = get_off_t(&ibuf, is64);
1229 offset += oldsize;
1232 if (reqcount < 0 || offset < 0) {
1237 newsize = ((offset + reqcount) > oldsize) ? (offset + reqcount) : oldsize;
1239 /* offset can overflow on 64-bit capable filesystems.
1241 if (sum_neg(is64, offset, reqcount)) {
1249 *rbuflen = set_off_t (offset, rbuf, is64);
1253 saveoff = offset;
1276 if ((cc = write_file(ofork, eid, offset, rbuf, *rbuflen,
1282 offset += cc;
1292 if (!cc || (cc = write_file(ofork, eid, offset, rbuf, cc, xlate)) < 0) {
1298 offset += cc;
1303 offset, dsi->datasize)) < 0) {
1321 offset += cc;
1329 if ((cc = write_file(ofork, eid, offset, rbuf, cc, xlate)) < 0) {
1336 offset += cc;
1352 *rbuflen = set_off_t (offset, rbuf, is64);