| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: nfs.c,v 1.49 2019/03/31 20:08:45 christos Exp $ */ | | 1 | /* $NetBSD: nfs.c,v 1.50 2020/01/26 10:13:10 skrll Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1993 John Brezak | | 4 | * Copyright (c) 1993 John Brezak |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -556,27 +556,27 @@ nfs_close(struct open_file *f) | | | @@ -556,27 +556,27 @@ nfs_close(struct open_file *f) |
556 | | | 556 | |
557 | /* | | 557 | /* |
558 | * read a portion of a file | | 558 | * read a portion of a file |
559 | */ | | 559 | */ |
560 | __compactcall int | | 560 | __compactcall int |
561 | nfs_read(struct open_file *f, void *buf, size_t size, size_t *resid) | | 561 | nfs_read(struct open_file *f, void *buf, size_t size, size_t *resid) |
562 | { | | 562 | { |
563 | struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata; | | 563 | struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata; |
564 | ssize_t cc; | | 564 | ssize_t cc; |
565 | char *addr = buf; | | 565 | char *addr = buf; |
566 | | | 566 | |
567 | #ifdef NFS_DEBUG | | 567 | #ifdef NFS_DEBUG |
568 | if (debug) | | 568 | if (debug) |
569 | printf("%s: size=%zu off=%td\n", __func__, size, fp->off); | | 569 | printf("%s: size=%zu off=%" PRIx64 "\n", __func__, size, fp->off); |
570 | #endif | | 570 | #endif |
571 | while ((int)size > 0) { | | 571 | while ((int)size > 0) { |
572 | #if !defined(LIBSA_NO_TWIDDLE) | | 572 | #if !defined(LIBSA_NO_TWIDDLE) |
573 | twiddle(); | | 573 | twiddle(); |
574 | #endif | | 574 | #endif |
575 | cc = nfs_readdata(fp, fp->off, (void *)addr, size); | | 575 | cc = nfs_readdata(fp, fp->off, (void *)addr, size); |
576 | /* XXX maybe should retry on certain errors */ | | 576 | /* XXX maybe should retry on certain errors */ |
577 | if (cc == -1) { | | 577 | if (cc == -1) { |
578 | #ifdef NFS_DEBUG | | 578 | #ifdef NFS_DEBUG |
579 | if (debug) | | 579 | if (debug) |
580 | printf("%s: read: %s\n", __func__, | | 580 | printf("%s: read: %s\n", __func__, |
581 | strerror(errno)); | | 581 | strerror(errno)); |
582 | #endif | | 582 | #endif |