Deleted Added
full compact
splitfs.c (124811) splitfs.c (136093)
1/*
2 * Copyright (c) 2002 Maxim Sobolev
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2002 Maxim Sobolev
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/lib/libstand/splitfs.c 124811 2004-01-21 20:12:23Z jhb $");
28__FBSDID("$FreeBSD: head/lib/libstand/splitfs.c 136093 2004-10-03 15:58:20Z stefanf $");
29
30#include "stand.h"
31
32#define NTRIES (3)
33#define CONF_BUF (512)
34#define SEEK_BUF (512)
35
36struct split_file

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

202
203 /* Error? */
204 if (nread == -1)
205 return (errno);
206
207 sf->tot_pos += nread;
208 sf->file_pos += nread;
209 totread += nread;
29
30#include "stand.h"
31
32#define NTRIES (3)
33#define CONF_BUF (512)
34#define SEEK_BUF (512)
35
36struct split_file

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

202
203 /* Error? */
204 if (nread == -1)
205 return (errno);
206
207 sf->tot_pos += nread;
208 sf->file_pos += nread;
209 totread += nread;
210 buf += nread;
210 buf = (char *)buf + nread;
211
212 if (totread < size) { /* EOF */
213 if (sf->curfile == (sf->filesc - 1)) /* Last slice */
214 break;
215
216 /* Close previous slice */
217 if (close(sf->curfd) != 0)
218 return (errno);

--- 94 unchanged lines hidden ---
211
212 if (totread < size) { /* EOF */
213 if (sf->curfile == (sf->filesc - 1)) /* Last slice */
214 break;
215
216 /* Close previous slice */
217 if (close(sf->curfd) != 0)
218 return (errno);

--- 94 unchanged lines hidden ---