Introduction
Introduction Statistics Contact Development Disclaimer Help
Removed tabs. - susmb - mounting of SMB/CIFS shares via FUSE
git clone git://git.codemadness.org/susmb
Log
Files
Refs
README
LICENSE
---
commit b7e8cb598ebbf08ff9cbb48ae1976c6b8343e8b8
parent bd6bdba3c118872e3062daf7fd260d330745af8f
Author: geoff <devnull@localhost>
Date: Thu, 18 May 2006 20:14:23 +0000
Removed tabs.
Diffstat:
M usmb_file.c | 52 ++++++++++++++++-------------…
1 file changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/usmb_file.c b/usmb_file.c
@@ -97,31 +97,31 @@ int usmb_read (const char *filename, char *buff, size_t len…
DEBUG (fprintf (stderr, "read (%p, %u, %lld) ", buff, len, off));
if (smbc_lseek (fi->fh, off, SEEK_SET) < 0)
- {
- fprintf (stderr, "- seek failed: %d\n", -errno);
+ {
+ fprintf (stderr, "- seek failed: %d\n", -errno);
return -errno;
- }
+ }
size_t got = 0;
- int bytes = 0;
+ int bytes = 0;
// seems that reads of > 32768 bytes don't work with real Windows servers
- while (got < len)
- {
+ while (got < len)
+ {
bytes = smbc_read (fi->fh, buff, (len > 32768) ? 32768 : len);
- if (bytes < 0)
- break;
+ if (bytes < 0)
+ break;
- got += bytes;
- buff += bytes;
+ got += bytes;
+ buff += bytes;
// avoids infinite loops
- if (0 == bytes)
- break;
- }
+ if (0 == bytes)
+ break;
+ }
- DEBUG (fprintf (stderr, " = %d\n", (bytes < 0) ? -errno : (int)got));
+ DEBUG (fprintf (stderr, " = %d\n", (bytes < 0) ? -errno : (int)got));
return (bytes < 0) ? -errno : (int)got;
}
@@ -138,26 +138,26 @@ int usmb_write (const char *filename, const char *buff, s…
return -errno;
size_t written = 0;
- int bytes = 0;
+ int bytes = 0;
// No idea whether Windows servers don't like > 32768 byte writes
- // (cf. usmb_read), but taking no chances...
- while (written < len)
- {
+ // (cf. usmb_read), but taking no chances...
+ while (written < len)
+ {
bytes = smbc_write (fi->fh, (char *)buff, (len > 32768) ? 32768 : len);
- if (bytes < 0)
- break;
+ if (bytes < 0)
+ break;
- written += bytes;
- buff += bytes;
+ written += bytes;
+ buff += bytes;
// avoids infinite loops
- if (0 == bytes)
- break;
- }
+ if (0 == bytes)
+ break;
+ }
- DEBUG (fprintf (stderr, " = %d\n", (bytes < 0) ? -errno : (int)written…
+ DEBUG (fprintf (stderr, " = %d\n", (bytes < 0) ? -errno : (int)written));
return (bytes < 0) ? -errno : (int)written;
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.