1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <libgen.h>
#include "cfga_fp.h"
/* The following are used by update_fabric_wwn_list() */
#define COPY_EXT ".cpy." /* Extn used in naming backup file */
#define TMP_EXT ".tmp." /* Extn used in naming temp file */
static char *HDR =
"#\n"
"# fabric_WWN_map\n"
"#\n"
"# The physical ap_id list of configured fabric devices.\n"
"# Do NOT edit this file by hand -- refer to the cfgadm_fp(8)\n"
"# man page and use cfgadm(8) instead.\n"
"#\n";
/*
* This function searches for "srch_str" (of length "slen") in "buf" (of length
* "buflen"). If it is not found, "write_offset" has the offset in "buf" where
* "srch_str" would have to be added in "buf". If "srch_str" is found in "buf",
* "write_offset" has its offset in "buf"
*
* ARGUMENTS :
* buf - buffer to search in
* buflen - length of buffer
* srch_str - string to search
* slen - length of srch_str
* write_offset - Set in function on exit
* - It is the offset in buf where srch_str is or should be
* bytes_left - Set in function on exit
* - It is the # of bytes left beyond write_offset in buf
*
* Notes :
* - This function assumes "buf" is sorted in ascending order
* - If 'buflen' is > 0, it assumes it has a header on top and skips it
* - "srch_str" has '\n' at the end, but when update_fabric_wwn_list() calls
* this function, 'slen' does not include the last `\n'
*
* RETURN VALUES :
* Zero - "srch_str" found in "buf"... "write_offset" has offset in "buf"
* > 0 - "srch_str" NOT found in "buf" ... "write_offset" has offset in "buf"
* where "srch_str" can fit in.
* "buf" had contents > "srch_str"
* < 0 - "srch_str" NOT found in "buf" ... "write_offset" has offset in "buf"
* where "srch_str" can fit in.
* "buf" had contents < "srch_str"
*/
static int
search_line(char *buf, int buflen, char *srch_str, int slen,
int *write_offset, int *bytes_left)
{
int retval, sizeof_rep_hdr = strlen(HDR);
char *sol; /* Pointer to Start-Of-Line */
char *cur_pos; /* current position */
*bytes_left = buflen;
*write_offset = 0;
if (buf == NULL || *buf == '\0' || buflen <= 0)
return (-2); /* Arbitrary -ve val. srch_str not found */
if (srch_str == NULL || *srch_str == '\0' || slen <= 0)
return (0); /* This says srch_str was found */
sol = cur_pos = buf;
if (buflen >= sizeof_rep_hdr) {
/* skip header */
sol = cur_pos = buf + sizeof_rep_hdr;
*bytes_left -= sizeof_rep_hdr;
}
while (*bytes_left >= slen) {
if ((retval = strncmp(sol, srch_str, slen)) >= 0) {
/* strncmp will pass if srch_str is a substring */
if ((retval == 0) && (*bytes_left > slen) &&
(*(sol+slen) != '\n'))
retval = 1; /* Force it to be > 0 */
*write_offset = sol - buf;
return (retval);
}
/* retval < 0 */
if ((cur_pos = strchr(sol, (int)'\n')) == NULL) {
*write_offset = buflen;
return (retval);
}
/* Get the length of this line */
*cur_pos = '\0'; /* kludge to get string length */
*bytes_left -= (strlen(sol) + 1);
*cur_pos = '\n'; /* Put back the original char */
sol = cur_pos = cur_pos + 1;
}
if (*bytes_left > 0) {
/* In this case the bytes left will be less than slen */
if ((retval = strncmp(sol, srch_str, *bytes_left)) >= 0) {
*write_offset = sol - buf;
} else {
*write_offset = buflen;
}
return (retval);
}
*write_offset = sol - buf;
/* Should return a value < 0 to show that search string goes to eof */
return (-1);
}
/*
* This function sets an advisory lock on the file pointed to by the argument
* fd, which is a file descriptor. The lock is set using fcntl() which uses
* flock structure.
*/
int
lock_register(int fd, int cmd, int type, off_t offset, int whence, off_t len)
{
struct flock lock;
lock.l_type = type;
lock.l_start = offset;
lock.l_whence = whence;
lock.l_len = len;
return (fcntl(fd, cmd, &lock));
}
/* Lot of places to cleanup - Less chance of missing out using this macro */
#define CLEANUP_N_RET(ret) \
if (fd != -1) { \
close(fd); \
} \
if (copy_fd != -1) { \
close(copy_fd); \
} \
if (tmp_fd != -1) { \
close(tmp_fd); \
} \
if (copy_rep != NULL) { \
remove(copy_rep); \
free(copy_rep); \
} \
if (tmp_rep != NULL) { \
remove(tmp_rep); \
free(tmp_rep); \
} \
if (upd_str != NULL) { \
free(upd_str); \
} \
if (repbuf != NULL) { \
munmap(repbuf, filesize); \
} \
if (c_repbuf != NULL) { \
munmap(c_repbuf, filesize); \
} \
if (t_repbuf != NULL) { \
munmap(t_repbuf, size); \
} \
return (ret)
/*
* INPUTS:
* cmd - ADD_ENTRY or REMOVE_ENTRY
* update_str - string for repository operation
* - Assumed NOT to have a '\n' and that it is null terminated
* errstring - Pointer that will be updated by this function
* - Any error msgs that has to be sent back to caller
*
* RETURNS :
* FPCFGA_OK on success
* FPCFGA_LIB_ERR on error
*
* SYNOPSIS:
* This function adds or deletes 'update_str' from FAB_REPOSITORY based on
* value of 'cmd'. The repository has a warning line on the top to disallow
* manual editing of the file. If the repository is being created fresh or if
* it is of zero length or if it has only warning lines in it, the operation
* speicified by 'cmd' is performed and returned. If the repository exists
* and has some data, it is expected to be of atleast the size of the lenght
* of the warning header. This is the only check that is performed on the
* validity of the file. No other checks are performed. On a valid
* repository, to perform the update, this function basically makes use of
* 3 buffers - the original buffer (repbuf), a copy buffer (c_repbuf) and a
* temp buffer (t_repbuf).
* The contents of the repository are mmap-ed into the repbuf and then
* copied into the c_repbuf. All further operations are done using the copy.
* t_repbuf is created to be the size of c_repbuf +/- 'slen' (based on
* whether it is add or remove operation). After adding/removing the
* 'update_str', the c_repbuf is copied to a OLD_FAB_REPOSITORY and t_repbuf
* is made FAB_REPOSITORY.
*
*/
int
update_fabric_wwn_list(int cmd, const char *update_str, char **errstring)
{
int fd, copy_fd, tmp_fd, new_file_flag = 0;
int len, write_offset, bytes_left;
int sizeof_rep_hdr = strlen(HDR);
char *repbuf, *c_repbuf, *t_repbuf;
char *copy_rep, *tmp_rep, *upd_str;
off_t filesize, size;
struct stat stbuf;
/* Do some initializations */
fd = copy_fd = tmp_fd = -1;
repbuf = c_repbuf = t_repbuf = NULL;
copy_rep = tmp_rep = upd_str = NULL;
size = filesize = write_offset = bytes_left = 0;
/*
* Set the mode to read only. Root user can still open as RDWR.
* We ignore errors in general here. But, just notice ENOENTs
*/
if ((chmod(FAB_REPOSITORY, S_IRUSR|S_IRGRP|S_IROTH) == -1) &&
(errno == ENOENT)) {
new_file_flag = 1;
mkdirp(FAB_REPOSITORY_DIR,
S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
}
/* Create the repository if its not there */
if ((fd = open(FAB_REPOSITORY, O_RDWR | O_CREAT)) == -1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
return (FPCFGA_LIB_ERR);
}
/* Now try to chmod again. This time we dont ignore errors */
if (fchmod(fd, S_IRUSR | S_IRGRP | S_IROTH) < 0) {
close(fd);
cfga_err(errstring, errno, ERR_UPD_REP, 0);
return (FPCFGA_LIB_ERR);
}
if (lock_register(fd, F_SETLKW, F_WRLCK, 0, SEEK_SET, 0) < 0) {
close(fd);
cfga_err(errstring, 0, ERR_UPD_REP, 0);
return (FPCFGA_LIB_ERR);
}
if (fstat(fd, &stbuf) == -1) {
close(fd);
cfga_err(errstring, errno, ERR_UPD_REP, 0);
return (FPCFGA_LIB_ERR);
}
filesize = size = stbuf.st_size;
/* A very Minimal check on repository */
if (filesize && filesize < sizeof_rep_hdr) {
/*
* If there is some data, it should be atleast the size of
* the header
*/
close(fd);
cfga_err(errstring, errno, ERR_UPD_REP, 0);
return (FPCFGA_LIB_ERR);
}
if ((len = strlen(update_str)) == 0) {
/*
* We are trying to add/remove a NULL string.
* Just return success
*/
close(fd);
return (FPCFGA_OK);
}
if ((upd_str = calloc(1, len + 2)) == NULL) {
close(fd);
cfga_err(errstring, errno, ERR_UPD_REP, 0);
return (FPCFGA_LIB_ERR);
}
strcpy(upd_str, update_str);
strcat(upd_str, "\n"); /* Append a new line char */
len = strlen(upd_str);
if (filesize > 0) {
if ((copy_rep = (char *)calloc(1, strlen(FAB_REPOSITORY) +
sizeof (COPY_EXT) + sizeof (pid_t))) == NULL) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
(void) sprintf(copy_rep, "%s%s%ld", FAB_REPOSITORY, COPY_EXT,
getpid());
if ((copy_fd = open(copy_rep, O_RDWR | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR)) < 0) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if ((repbuf = (char *)mmap(0, filesize, PROT_READ,
MAP_SHARED, fd, 0)) == MAP_FAILED) {
close(fd);
free(upd_str);
cfga_err(errstring, errno, ERR_UPD_REP, 0);
return (FPCFGA_LIB_ERR);
}
if (lseek(copy_fd, filesize - 1, SEEK_SET) == -1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (write(copy_fd, "", 1) != 1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if ((c_repbuf = (char *)mmap(0, filesize,
PROT_READ | PROT_WRITE,
MAP_SHARED, copy_fd, 0)) == MAP_FAILED) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
memcpy(c_repbuf, repbuf, filesize);
/*
* We cannot close the repository since we hold a lock
* But we'll free up the mmap-ed area.
*/
munmap(repbuf, filesize);
repbuf = NULL;
}
/*
* If we just created this file, or it was an empty repository file
* add a header to the beginning of file.
* If it had was a repository file with just the header,
*/
if (new_file_flag != 0 || filesize == 0 || filesize == sizeof_rep_hdr) {
if ((filesize != sizeof_rep_hdr) &&
(write(fd, HDR, sizeof_rep_hdr) != sizeof_rep_hdr)) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
/*
* We know its a new file, empty file or a file with only a
* header so lets get the update operation done with
*/
switch (cmd) {
case ADD_ENTRY:
/* If there is a header, we have to skip it */
if (lseek(fd, 0, SEEK_END) == -1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (write(fd, upd_str, len) != len) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (filesize > 0) {
/* Now create the '.old' file */
if (msync(c_repbuf, filesize, MS_SYNC) == -1) {
cfga_err(errstring, errno,
ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (fchmod(copy_fd,
S_IRUSR | S_IRGRP | S_IROTH) < 0) {
cfga_err(errstring, errno,
ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
rename(copy_rep, OLD_FAB_REPOSITORY);
}
CLEANUP_N_RET(FPCFGA_OK);
case REMOVE_ENTRY:
/*
* So, the side effect of a remove on an empty or
* non-existing repository is that the repository got
* created
*/
CLEANUP_N_RET(FPCFGA_OK);
default:
cfga_err(errstring, 0, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
}
/* Now, size and filesize are > sizeof_rep_hdr */
switch (cmd) {
case ADD_ENTRY:
size += len;
/*
* We'll search the full repository, header included, since
* we dont expect upd_str to match anything in the header.
*/
if (search_line(c_repbuf, filesize, upd_str,
len - 1, &write_offset, &bytes_left) == 0) {
/* line already exists in repository or len == 0 */
CLEANUP_N_RET(FPCFGA_OK); /* SUCCESS */
}
/* construct temp file name using pid. */
if ((tmp_rep = (char *)calloc(1, strlen(FAB_REPOSITORY) +
sizeof (TMP_EXT) + sizeof (pid_t))) == NULL) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
(void) sprintf(tmp_rep, "%s%s%ld", FAB_REPOSITORY,
TMP_EXT, getpid());
/* Open tmp repository file in absolute mode */
if ((tmp_fd = open(tmp_rep, O_RDWR|O_CREAT|O_TRUNC,
S_IRUSR | S_IWUSR)) < 0) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (lseek(tmp_fd, size - 1, SEEK_SET) == -1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (write(tmp_fd, "", 1) != 1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if ((t_repbuf = (char *)mmap(0, size, PROT_READ|PROT_WRITE,
MAP_SHARED, tmp_fd, 0)) == MAP_FAILED) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
memcpy(t_repbuf, c_repbuf, write_offset);
strncpy(t_repbuf + write_offset, upd_str, len);
if (write_offset != filesize) {
memcpy(t_repbuf + write_offset + len,
c_repbuf + write_offset, bytes_left);
}
/*
* we are using the copy of FAB_REPOSITORY and will
* do msync first since it will be renamed to '.old' file.
*/
if (msync(c_repbuf, filesize, MS_SYNC) == -1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (fchmod(copy_fd, S_IRUSR | S_IRGRP | S_IROTH) < 0) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (msync(t_repbuf, size, MS_SYNC) == -1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (fchmod(tmp_fd, S_IRUSR | S_IRGRP | S_IROTH) < 0) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
close(copy_fd); copy_fd = -1;
close(tmp_fd); tmp_fd = -1;
/* here we do rename and rename before close fd */
rename(copy_rep, OLD_FAB_REPOSITORY);
rename(tmp_rep, FAB_REPOSITORY);
if (lock_register(fd, F_SETLK, F_UNLCK, 0, SEEK_SET, 0) < 0) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
CLEANUP_N_RET(FPCFGA_OK);
case REMOVE_ENTRY:
if (size >= sizeof_rep_hdr + len - 1) {
size -= len;
/*
* No need to init the 'else' part (size < len) because
* in that case, there will be nothing to delete from
* the file and so 'size' will not be used in the code
* below since search_line() will not find upd_str.
*/
}
if (search_line(c_repbuf, filesize, upd_str, len - 1,
&write_offset, &bytes_left) != 0) {
/* this line does not exists - nothing to remove */
CLEANUP_N_RET(FPCFGA_OK); /* SUCCESS */
}
/* construct temp file name using pid. */
if ((tmp_rep = (char *)calloc(1, strlen(FAB_REPOSITORY) +
sizeof (TMP_EXT) + sizeof (pid_t))) == NULL) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
(void) sprintf(tmp_rep, "%s%s%ld", FAB_REPOSITORY,
TMP_EXT, getpid());
/* Open tmp repository file in absolute mode */
if ((tmp_fd = open(tmp_rep, O_RDWR|O_CREAT|O_TRUNC,
S_IRUSR | S_IWUSR)) < 0) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (size > 0) {
if (lseek(tmp_fd, size - 1, SEEK_SET) == -1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (write(tmp_fd, "", 1) != 1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if ((t_repbuf = (char *)mmap(0, size,
PROT_READ|PROT_WRITE,
MAP_SHARED, tmp_fd, 0)) == MAP_FAILED) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
memcpy(t_repbuf, c_repbuf, write_offset);
if ((bytes_left - len) > 0) {
memcpy(t_repbuf + write_offset,
c_repbuf + write_offset + len,
bytes_left - len);
}
if (msync(t_repbuf, size, MS_SYNC) == -1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
}
if (fchmod(tmp_fd, S_IRUSR | S_IRGRP | S_IROTH) < 0) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
/*
* we are using the copy of FAB_REPOSITORY and will
* do msync first since it will be renamed to bak file.
*/
if (msync(c_repbuf, filesize, MS_SYNC) == -1) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
if (fchmod(copy_fd, S_IRUSR | S_IRGRP | S_IROTH) < 0) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
/* Close and invalidate the fd's */
close(copy_fd); copy_fd = -1;
close(tmp_fd); tmp_fd = -1;
/* here we do rename and rename before close fd */
rename(copy_rep, OLD_FAB_REPOSITORY);
rename(tmp_rep, FAB_REPOSITORY);
if (lock_register(fd, F_SETLK, F_UNLCK, 0, SEEK_SET, 0) < 0) {
cfga_err(errstring, errno, ERR_UPD_REP, 0);
CLEANUP_N_RET(FPCFGA_LIB_ERR);
}
CLEANUP_N_RET(FPCFGA_OK);
default:
/* Unexpected - just getout */
break;
}
CLEANUP_N_RET(FPCFGA_OK); /* SUCCESS */
}
|