Commit | Line | Data |
---|---|---|
e327acec | 1 | /* -*- c-file-style: "linux" -*- |
17fadf7d | 2 | |
e327acec | 3 | Copyright (C) 1996-2000 by Andrew Tridgell |
2f03f956 | 4 | Copyright (C) Paul Mackerras 1996 |
17fadf7d | 5 | |
2f03f956 AT |
6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2 of the License, or | |
9 | (at your option) any later version. | |
17fadf7d | 10 | |
2f03f956 AT |
11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
17fadf7d | 15 | |
2f03f956 AT |
16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
19 | */ | |
20 | ||
21 | #include "rsync.h" | |
22 | ||
23 | extern int verbose; | |
24 | extern int recurse; | |
25 | extern int delete_mode; | |
2f03f956 AT |
26 | extern int csum_length; |
27 | extern struct stats stats; | |
28 | extern int dry_run; | |
29 | extern int am_server; | |
30 | extern int relative_paths; | |
31 | extern int preserve_hard_links; | |
32 | extern int cvs_exclude; | |
33 | extern int io_error; | |
34 | extern char *tmpdir; | |
375a4556 | 35 | extern char *compare_dest; |
53dd3135 | 36 | extern int make_backups; |
16417f8b | 37 | extern int do_progress; |
d74a2e3e | 38 | extern char *backup_dir; |
53dd3135 | 39 | extern char *backup_suffix; |
d74a2e3e | 40 | extern int backup_suffix_len; |
925c517f | 41 | extern int cleanup_got_literal; |
2f03f956 | 42 | |
d74a2e3e | 43 | static void delete_one(char *fn, int is_dir) |
2f03f956 | 44 | { |
d74a2e3e WD |
45 | if (!is_dir) { |
46 | if (robust_unlink(fn) != 0) { | |
ea42541f WD |
47 | rprintf(FERROR, "delete_one: unlink %s failed: %s\n", |
48 | full_fname(fn), strerror(errno)); | |
2f03f956 | 49 | } else if (verbose) { |
d74a2e3e | 50 | rprintf(FINFO, "deleting %s\n", fn); |
2f03f956 | 51 | } |
17fadf7d | 52 | } else { |
d74a2e3e WD |
53 | if (do_rmdir(fn) != 0) { |
54 | if (errno != ENOTEMPTY && errno != EEXIST) { | |
ea42541f | 55 | rprintf(FERROR, "delete_one: rmdir %s failed: %s\n", |
17fadf7d | 56 | full_fname(fn), strerror(errno)); |
d74a2e3e | 57 | } |
2f03f956 | 58 | } else if (verbose) { |
d74a2e3e | 59 | rprintf(FINFO, "deleting directory %s\n", fn); |
2f03f956 AT |
60 | } |
61 | } | |
62 | } | |
63 | ||
64 | ||
d74a2e3e WD |
65 | static int is_backup_file(char *fn) |
66 | { | |
67 | int k = strlen(fn) - backup_suffix_len; | |
68 | return k > 0 && strcmp(fn+k, backup_suffix) == 0; | |
69 | } | |
2f03f956 AT |
70 | |
71 | ||
1e82e2ce WD |
72 | /* This deletes any files on the receiving side that are not present |
73 | * on the sending side. */ | |
6957ae33 | 74 | void delete_files(struct file_list *flist) |
2f03f956 AT |
75 | { |
76 | struct file_list *local_file_list; | |
77 | int i, j; | |
a24639bb | 78 | char *argv[1], fbuf[MAXPATHLEN]; |
cda2ae84 | 79 | extern int module_id; |
ef55c686 | 80 | extern int ignore_errors; |
0b73ca12 AT |
81 | extern int max_delete; |
82 | static int deletion_count; | |
2f03f956 AT |
83 | |
84 | if (cvs_exclude) | |
85 | add_cvs_excludes(); | |
86 | ||
ef55c686 | 87 | if (io_error && !(lp_ignore_errors(module_id) || ignore_errors)) { |
2f03f956 AT |
88 | rprintf(FINFO,"IO error encountered - skipping file deletion\n"); |
89 | return; | |
90 | } | |
91 | ||
1e82e2ce | 92 | for (j = 0; j < flist->count; j++) { |
a5342644 WD |
93 | if (!(flist->files[j]->flags & FLAG_TOP_DIR) |
94 | || !S_ISDIR(flist->files[j]->mode)) | |
95 | continue; | |
2f03f956 | 96 | |
a24639bb | 97 | argv[0] = f_name_to(flist->files[j], fbuf); |
2f03f956 | 98 | |
a24639bb | 99 | if (!(local_file_list = send_file_list(-1, 1, argv))) |
2f03f956 | 100 | continue; |
2f03f956 AT |
101 | |
102 | if (verbose > 1) | |
a24639bb | 103 | rprintf(FINFO,"deleting in %s\n", fbuf); |
2f03f956 | 104 | |
446e239e | 105 | for (i = local_file_list->count-1; i >= 0; i--) { |
0b73ca12 | 106 | if (max_delete && deletion_count > max_delete) break; |
2f03f956 | 107 | if (!local_file_list->files[i]->basename) continue; |
2f03f956 | 108 | if (-1 == flist_find(flist,local_file_list->files[i])) { |
53dd3135 | 109 | char *f = f_name(local_file_list->files[i]); |
d74a2e3e | 110 | if (make_backups && (backup_dir || !is_backup_file(f))) { |
53dd3135 | 111 | (void) make_backup(f); |
d74a2e3e WD |
112 | if (verbose) |
113 | rprintf(FINFO, "deleting %s\n", f); | |
53dd3135 | 114 | } else { |
d74a2e3e WD |
115 | int mode = local_file_list->files[i]->mode; |
116 | delete_one(f, S_ISDIR(mode) != 0); | |
53dd3135 | 117 | } |
31f3b68a | 118 | deletion_count++; |
53dd3135 | 119 | } |
2f03f956 AT |
120 | } |
121 | flist_free(local_file_list); | |
2f03f956 AT |
122 | } |
123 | } | |
124 | ||
125 | ||
52d3e106 S |
126 | /* |
127 | * get_tmpname() - create a tmp filename for a given filename | |
128 | * | |
129 | * If a tmpdir is defined, use that as the directory to | |
130 | * put it in. Otherwise, the tmp filename is in the same | |
131 | * directory as the given name. Note that there may be no | |
132 | * directory at all in the given name! | |
17fadf7d | 133 | * |
52d3e106 S |
134 | * The tmp filename is basically the given filename with a |
135 | * dot prepended, and .XXXXXX appended (for mkstemp() to | |
136 | * put its unique gunk in). Take care to not exceed | |
137 | * either the MAXPATHLEN or NAME_MAX, esp. the last, as | |
138 | * the basename basically becomes 8 chars longer. In that | |
139 | * case, the original name is shortened sufficiently to | |
140 | * make it all fit. | |
17fadf7d | 141 | * |
52d3e106 S |
142 | * Of course, there's no real reason for the tmp name to |
143 | * look like the original, except to satisfy us humans. | |
144 | * As long as it's unique, rsync will work. | |
145 | */ | |
146 | ||
2f03f956 AT |
147 | static int get_tmpname(char *fnametmp, char *fname) |
148 | { | |
149 | char *f; | |
52d3e106 S |
150 | int length = 0; |
151 | int maxname; | |
2f03f956 | 152 | |
2f03f956 | 153 | if (tmpdir) { |
a24639bb | 154 | /* Note: this can't overflow, so the return value is safe */ |
b7cee949 | 155 | length = strlcpy(fnametmp, tmpdir, MAXPATHLEN - 2); |
52d3e106 S |
156 | fnametmp[length++] = '/'; |
157 | fnametmp[length] = '\0'; /* always NULL terminated */ | |
0c2ef5f4 | 158 | } |
52d3e106 | 159 | |
0c2ef5f4 | 160 | if ((f = strrchr(fname, '/')) != NULL) { |
52d3e106 S |
161 | ++f; |
162 | if (!tmpdir) { | |
163 | length = f - fname; | |
0c2ef5f4 | 164 | /* copy up to and including the slash */ |
52d3e106 | 165 | strlcpy(fnametmp, fname, length + 1); |
0c2ef5f4 | 166 | } |
446e239e | 167 | } else |
52d3e106 | 168 | f = fname; |
52d3e106 S |
169 | fnametmp[length++] = '.'; |
170 | fnametmp[length] = '\0'; /* always NULL terminated */ | |
2f03f956 | 171 | |
52d3e106 | 172 | maxname = MIN(MAXPATHLEN - 7 - length, NAME_MAX - 8); |
2f03f956 | 173 | |
0c2ef5f4 | 174 | if (maxname < 1) { |
52d3e106 S |
175 | rprintf(FERROR, "temporary filename too long: %s\n", fname); |
176 | fnametmp[0] = '\0'; | |
2f03f956 AT |
177 | return 0; |
178 | } | |
179 | ||
17fadf7d | 180 | strlcpy(fnametmp + length, f, maxname); |
52d3e106 | 181 | strcat(fnametmp + length, ".XXXXXX"); |
2f03f956 AT |
182 | |
183 | return 1; | |
184 | } | |
185 | ||
186 | ||
446e239e | 187 | static int receive_data(int f_in,struct map_struct *mapbuf,int fd,char *fname, |
2f03f956 AT |
188 | OFF_T total_size) |
189 | { | |
9dd891bb | 190 | int i; |
fc0257c9 S |
191 | struct sum_struct sum; |
192 | unsigned int len; | |
2f03f956 AT |
193 | OFF_T offset = 0; |
194 | OFF_T offset2; | |
195 | char *data; | |
196 | static char file_sum1[MD4_SUM_LENGTH]; | |
197 | static char file_sum2[MD4_SUM_LENGTH]; | |
198 | char *map=NULL; | |
17fadf7d | 199 | |
fc0257c9 | 200 | read_sum_head(f_in, &sum); |
17fadf7d | 201 | |
2f03f956 | 202 | sum_init(); |
17fadf7d | 203 | |
3f55bd5d | 204 | while ((i = recv_token(f_in, &data)) != 0) { |
16417f8b WD |
205 | if (do_progress) |
206 | show_progress(offset, total_size); | |
2f03f956 AT |
207 | |
208 | if (i > 0) { | |
2f03f956 | 209 | if (verbose > 3) { |
5f808dfb AT |
210 | rprintf(FINFO,"data recv %d at %.0f\n", |
211 | i,(double)offset); | |
2f03f956 AT |
212 | } |
213 | ||
214 | stats.literal_data += i; | |
215 | cleanup_got_literal = 1; | |
17fadf7d | 216 | |
2f03f956 AT |
217 | sum_update(data,i); |
218 | ||
219 | if (fd != -1 && write_file(fd,data,i) != i) { | |
ea42541f WD |
220 | rprintf(FERROR, "write failed on %s: %s\n", |
221 | full_fname(fname), strerror(errno)); | |
65417579 | 222 | exit_cleanup(RERR_FILEIO); |
2f03f956 AT |
223 | } |
224 | offset += i; | |
225 | continue; | |
17fadf7d | 226 | } |
2f03f956 AT |
227 | |
228 | i = -(i+1); | |
fc0257c9 S |
229 | offset2 = i*(OFF_T)sum.blength; |
230 | len = sum.blength; | |
231 | if (i == (int) sum.count-1 && sum.remainder != 0) | |
232 | len = sum.remainder; | |
17fadf7d | 233 | |
2f03f956 | 234 | stats.matched_data += len; |
17fadf7d | 235 | |
2f03f956 | 236 | if (verbose > 3) |
5f808dfb AT |
237 | rprintf(FINFO,"chunk[%d] of size %d at %.0f offset=%.0f\n", |
238 | i,len,(double)offset2,(double)offset); | |
17fadf7d | 239 | |
446e239e WD |
240 | if (mapbuf) { |
241 | map = map_ptr(mapbuf,offset2,len); | |
17fadf7d | 242 | |
c55f7021 AT |
243 | see_token(map, len); |
244 | sum_update(map,len); | |
245 | } | |
17fadf7d | 246 | |
a261989c | 247 | if (fd != -1 && write_file(fd,map,len) != (int) len) { |
ea42541f WD |
248 | rprintf(FERROR, "write failed on %s: %s\n", |
249 | full_fname(fname), strerror(errno)); | |
65417579 | 250 | exit_cleanup(RERR_FILEIO); |
2f03f956 AT |
251 | } |
252 | offset += len; | |
253 | } | |
254 | ||
76c21947 WD |
255 | flush_write_file(fd); |
256 | ||
16417f8b WD |
257 | if (do_progress) |
258 | end_progress(total_size); | |
2f03f956 AT |
259 | |
260 | if (fd != -1 && offset > 0 && sparse_end(fd) != 0) { | |
ea42541f WD |
261 | rprintf(FERROR, "write failed on %s: %s\n", |
262 | full_fname(fname), strerror(errno)); | |
65417579 | 263 | exit_cleanup(RERR_FILEIO); |
2f03f956 AT |
264 | } |
265 | ||
266 | sum_end(file_sum1); | |
267 | ||
bc63ae3f S |
268 | read_buf(f_in,file_sum2,MD4_SUM_LENGTH); |
269 | if (verbose > 2) { | |
270 | rprintf(FINFO,"got file_sum\n"); | |
271 | } | |
17fadf7d | 272 | if (fd != -1 && memcmp(file_sum1,file_sum2,MD4_SUM_LENGTH) != 0) { |
bc63ae3f | 273 | return 0; |
2f03f956 AT |
274 | } |
275 | return 1; | |
276 | } | |
277 | ||
278 | ||
b35d0d8e MP |
279 | /** |
280 | * main routine for receiver process. | |
281 | * | |
282 | * Receiver process runs on the same host as the generator process. */ | |
0569a133 | 283 | int recv_files(int f_in,struct file_list *flist,char *local_name) |
17fadf7d | 284 | { |
2f03f956 AT |
285 | int fd1,fd2; |
286 | STRUCT_STAT st; | |
446e239e | 287 | char *fname, fbuf[MAXPATHLEN]; |
f62c17e3 | 288 | char template[MAXPATHLEN]; |
2f03f956 | 289 | char fnametmp[MAXPATHLEN]; |
375a4556 DD |
290 | char *fnamecmp; |
291 | char fnamecmpbuf[MAXPATHLEN]; | |
446e239e | 292 | struct map_struct *mapbuf; |
2f03f956 AT |
293 | int i; |
294 | struct file_struct *file; | |
295 | int phase=0; | |
296 | int recv_ok; | |
17fadf7d | 297 | extern struct stats stats; |
4df9f368 | 298 | extern int preserve_perms; |
57df171b | 299 | extern int delete_after; |
b35d0d8e | 300 | extern int orig_umask; |
1b7c47cb | 301 | struct stats initial_stats; |
11a5a3c7 | 302 | |
2f03f956 AT |
303 | if (verbose > 2) { |
304 | rprintf(FINFO,"recv_files(%d) starting\n",flist->count); | |
305 | } | |
306 | ||
cb869c26 | 307 | if (flist->hlink_pool) { |
9935066b S |
308 | pool_destroy(flist->hlink_pool); |
309 | flist->hlink_pool = NULL; | |
310 | } | |
311 | ||
17fadf7d | 312 | while (1) { |
2f03f956 AT |
313 | cleanup_disable(); |
314 | ||
315 | i = read_int(f_in); | |
316 | if (i == -1) { | |
97feb557 | 317 | if (phase == 0) { |
2f03f956 AT |
318 | phase++; |
319 | csum_length = SUM_LENGTH; | |
320 | if (verbose > 2) | |
321 | rprintf(FINFO,"recv_files phase=%d\n",phase); | |
0569a133 | 322 | send_msg(MSG_DONE, "", 0); |
2f03f956 AT |
323 | continue; |
324 | } | |
325 | break; | |
326 | } | |
327 | ||
328 | if (i < 0 || i >= flist->count) { | |
17fadf7d | 329 | rprintf(FERROR,"Invalid file index %d in recv_files (count=%d)\n", |
2f03f956 | 330 | i, flist->count); |
65417579 | 331 | exit_cleanup(RERR_PROTOCOL); |
2f03f956 AT |
332 | } |
333 | ||
334 | file = flist->files[i]; | |
2f03f956 | 335 | |
97feb557 | 336 | stats.current_file_index = i; |
2f03f956 AT |
337 | stats.num_transferred_files++; |
338 | stats.total_transferred_size += file->length; | |
925c517f | 339 | cleanup_got_literal = 0; |
2f03f956 AT |
340 | |
341 | if (local_name) | |
342 | fname = local_name; | |
446e239e | 343 | else |
3fef5364 | 344 | fname = f_name_to(file, fbuf); |
2f03f956 AT |
345 | |
346 | if (dry_run) { | |
42d4edc0 S |
347 | if (!am_server && verbose) { /* log transfer */ |
348 | rprintf(FINFO, "%s\n", fname); | |
11a5a3c7 | 349 | } |
2f03f956 AT |
350 | continue; |
351 | } | |
352 | ||
1b7c47cb AT |
353 | initial_stats = stats; |
354 | ||
2f03f956 AT |
355 | if (verbose > 2) |
356 | rprintf(FINFO,"recv_files(%s)\n",fname); | |
357 | ||
375a4556 DD |
358 | fnamecmp = fname; |
359 | ||
17fadf7d | 360 | /* open the file */ |
8c9fd200 | 361 | fd1 = do_open(fnamecmp, O_RDONLY, 0); |
375a4556 | 362 | |
c338460d | 363 | if (fd1 == -1 && compare_dest != NULL) { |
375a4556 | 364 | /* try the file at compare_dest instead */ |
f91e01d9 WD |
365 | pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, |
366 | compare_dest, fname); | |
375a4556 | 367 | fnamecmp = fnamecmpbuf; |
8c9fd200 | 368 | fd1 = do_open(fnamecmp, O_RDONLY, 0); |
375a4556 | 369 | } |
2f03f956 AT |
370 | |
371 | if (fd1 != -1 && do_fstat(fd1,&st) != 0) { | |
ea42541f WD |
372 | rprintf(FERROR, "fstat %s failed: %s\n", |
373 | full_fname(fnamecmp), strerror(errno)); | |
2f03f956 AT |
374 | receive_data(f_in,NULL,-1,NULL,file->length); |
375 | close(fd1); | |
376 | continue; | |
377 | } | |
378 | ||
350e4e4d S |
379 | if (fd1 != -1 && S_ISDIR(st.st_mode) && fnamecmp == fname) { |
380 | /* this special handling for directories | |
381 | * wouldn't be necessary if robust_rename() | |
382 | * and the underlying robust_unlink could cope | |
383 | * with directories | |
384 | */ | |
ea42541f WD |
385 | rprintf(FERROR,"recv_files: %s is a directory\n", |
386 | full_fname(fnamecmp)); | |
350e4e4d | 387 | receive_data(f_in, NULL, -1, NULL, file->length); |
2f03f956 AT |
388 | close(fd1); |
389 | continue; | |
390 | } | |
391 | ||
350e4e4d S |
392 | if (fd1 != -1 && !S_ISREG(st.st_mode)) { |
393 | close(fd1); | |
394 | fd1 = -1; | |
446e239e | 395 | mapbuf = NULL; |
350e4e4d S |
396 | } |
397 | ||
4df9f368 | 398 | if (fd1 != -1 && !preserve_perms) { |
85ed0aa3 | 399 | /* if the file exists already and we aren't preserving |
17fadf7d WD |
400 | * permissions then act as though the remote end sent |
401 | * us the file permissions we already have */ | |
4df9f368 AT |
402 | file->mode = st.st_mode; |
403 | } | |
404 | ||
2f03f956 | 405 | if (fd1 != -1 && st.st_size > 0) { |
446e239e | 406 | mapbuf = map_file(fd1,st.st_size); |
2f03f956 | 407 | if (verbose > 2) |
5f808dfb | 408 | rprintf(FINFO,"recv mapped %s of size %.0f\n",fnamecmp,(double)st.st_size); |
446e239e WD |
409 | } else |
410 | mapbuf = NULL; | |
2f03f956 AT |
411 | |
412 | if (!get_tmpname(fnametmp,fname)) { | |
446e239e | 413 | if (mapbuf) unmap_file(mapbuf); |
2f03f956 AT |
414 | if (fd1 != -1) close(fd1); |
415 | continue; | |
416 | } | |
417 | ||
bd6abc49 | 418 | strlcpy(template, fnametmp, sizeof template); |
2f03f956 AT |
419 | |
420 | /* we initially set the perms without the | |
17fadf7d WD |
421 | * setuid/setgid bits to ensure that there is no race |
422 | * condition. They are then correctly updated after | |
423 | * the lchown. Thanks to snabb@epipe.fi for pointing | |
424 | * this out. We also set it initially without group | |
425 | * access because of a similar race condition. */ | |
f62c17e3 | 426 | fd2 = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS); |
2f03f956 | 427 | |
752eaba4 | 428 | /* in most cases parent directories will already exist |
17fadf7d WD |
429 | * because their information should have been previously |
430 | * transferred, but that may not be the case with -R */ | |
431 | if (fd2 == -1 && relative_paths && errno == ENOENT && | |
b35d0d8e | 432 | create_directory_path(fnametmp, orig_umask) == 0) { |
bd6abc49 | 433 | strlcpy(fnametmp, template, sizeof fnametmp); |
f62c17e3 | 434 | fd2 = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS); |
2f03f956 AT |
435 | } |
436 | if (fd2 == -1) { | |
ea42541f WD |
437 | rprintf(FERROR, "mkstemp %s failed: %s\n", |
438 | full_fname(fnametmp), strerror(errno)); | |
446e239e WD |
439 | receive_data(f_in,mapbuf,-1,NULL,file->length); |
440 | if (mapbuf) unmap_file(mapbuf); | |
2f03f956 AT |
441 | if (fd1 != -1) close(fd1); |
442 | continue; | |
443 | } | |
17fadf7d | 444 | |
446e239e | 445 | cleanup_set(fnametmp, fname, file, mapbuf, fd1, fd2); |
2f03f956 | 446 | |
42d4edc0 S |
447 | if (!am_server && verbose) { /* log transfer */ |
448 | rprintf(FINFO, "%s\n", fname); | |
11a5a3c7 AT |
449 | } |
450 | ||
2f03f956 | 451 | /* recv file data */ |
446e239e | 452 | recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length); |
1b7c47cb AT |
453 | |
454 | log_recv(file, &initial_stats); | |
17fadf7d | 455 | |
446e239e | 456 | if (mapbuf) unmap_file(mapbuf); |
2f03f956 AT |
457 | if (fd1 != -1) { |
458 | close(fd1); | |
459 | } | |
460 | close(fd2); | |
17fadf7d | 461 | |
2f03f956 AT |
462 | if (verbose > 2) |
463 | rprintf(FINFO,"renaming %s to %s\n",fnametmp,fname); | |
464 | ||
465 | finish_transfer(fname, fnametmp, file); | |
c6b81a98 | 466 | |
2f03f956 | 467 | cleanup_disable(); |
554e0a8d | 468 | |
2f03f956 AT |
469 | if (!recv_ok) { |
470 | if (csum_length == SUM_LENGTH) { | |
471 | rprintf(FERROR,"ERROR: file corruption in %s. File changed during transfer?\n", | |
ea42541f | 472 | full_fname(fname)); |
2f03f956 | 473 | } else { |
0569a133 | 474 | char buf[4]; |
2f03f956 AT |
475 | if (verbose > 1) |
476 | rprintf(FINFO,"redoing %s(%d)\n",fname,i); | |
0569a133 WD |
477 | SIVAL(buf, 0, i); |
478 | send_msg(MSG_REDO, buf, 4); | |
2f03f956 AT |
479 | } |
480 | } | |
481 | } | |
482 | ||
3f55bd5d WD |
483 | if (delete_after && recurse && delete_mode && !local_name |
484 | && flist->count > 0) | |
485 | delete_files(flist); | |
57df171b | 486 | |
2f03f956 AT |
487 | if (verbose > 2) |
488 | rprintf(FINFO,"recv_files finished\n"); | |
17fadf7d | 489 | |
2f03f956 AT |
490 | return 0; |
491 | } |