Deleted Added
full compact
smb_smb.c (156326) smb_smb.c (170804)
1/*-
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 21 unchanged lines hidden (view full) ---

30 * SUCH DAMAGE.
31 */
32
33/*
34 * various SMB requests. Most of the routines merely packs data into mbufs.
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 21 unchanged lines hidden (view full) ---

30 * SUCH DAMAGE.
31 */
32
33/*
34 * various SMB requests. Most of the routines merely packs data into mbufs.
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/netsmb/smb_smb.c 156326 2006-03-05 22:52:17Z yar $");
38__FBSDID("$FreeBSD: head/sys/netsmb/smb_smb.c 170804 2007-06-15 23:49:54Z mjacob $");
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <sys/malloc.h>
44#include <sys/proc.h>
45#include <sys/lock.h>
46#include <sys/sysctl.h>

--- 753 unchanged lines hidden (view full) ---

800smb_read(struct smb_share *ssp, u_int16_t fid, struct uio *uio,
801 struct smb_cred *scred)
802{
803 int tsize, len, resid;
804 int error = 0;
805
806 tsize = uio->uio_resid;
807 while (tsize > 0) {
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <sys/malloc.h>
44#include <sys/proc.h>
45#include <sys/lock.h>
46#include <sys/sysctl.h>

--- 753 unchanged lines hidden (view full) ---

800smb_read(struct smb_share *ssp, u_int16_t fid, struct uio *uio,
801 struct smb_cred *scred)
802{
803 int tsize, len, resid;
804 int error = 0;
805
806 tsize = uio->uio_resid;
807 while (tsize > 0) {
808 resid = 0;
808 len = tsize;
809 error = smb_smb_read(ssp, fid, &len, &resid, uio, scred);
810 if (error)
811 break;
812 tsize -= resid;
813 if (resid < len)
814 break;
815 }

--- 59 unchanged lines hidden (view full) ---

875 struct smb_cred *scred)
876{
877 int error = 0, len, tsize, resid;
878 struct uio olduio;
879
880 tsize = uio->uio_resid;
881 olduio = *uio;
882 while (tsize > 0) {
809 len = tsize;
810 error = smb_smb_read(ssp, fid, &len, &resid, uio, scred);
811 if (error)
812 break;
813 tsize -= resid;
814 if (resid < len)
815 break;
816 }

--- 59 unchanged lines hidden (view full) ---

876 struct smb_cred *scred)
877{
878 int error = 0, len, tsize, resid;
879 struct uio olduio;
880
881 tsize = uio->uio_resid;
882 olduio = *uio;
883 while (tsize > 0) {
884 resid = 0;
883 len = tsize;
884 error = smb_smb_write(ssp, fid, &len, &resid, uio, scred);
885 if (error)
886 break;
887 if (resid < len) {
888 error = EIO;
889 break;
890 }

--- 37 unchanged lines hidden ---
885 len = tsize;
886 error = smb_smb_write(ssp, fid, &len, &resid, uio, scred);
887 if (error)
888 break;
889 if (resid < len) {
890 error = EIO;
891 break;
892 }

--- 37 unchanged lines hidden ---