+
+ case BDB_PGSIZE: {
+ struct bdb_db_pgsize *ps, **prev;
+ int i, s;
+
+ s = atoi(c->argv[2]);
+ if ( s < 1 || s > 64 ) {
+ snprintf( c->cr_msg, sizeof( c->cr_msg ),
+ "%s: size must be > 0 and <= 64: %d",
+ c->log, s );
+ Debug( LDAP_DEBUG_ANY, "%s\n", c->cr_msg, 0, 0 );
+ return -1;
+ }
+ i = strlen(c->argv[1]);
+ ps = ch_malloc( sizeof(struct bdb_db_pgsize) + i + 1 );
+ ps->bdp_next = NULL;
+ ps->bdp_name.bv_len = i;
+ ps->bdp_name.bv_val = (char *)(ps+1);
+ strcpy( ps->bdp_name.bv_val, c->argv[1] );
+ ps->bdp_size = s * 1024;
+ for ( prev = &bdb->bi_pagesizes; *prev; prev = &(*prev)->bdp_next )
+ ;
+ *prev = ps;
+ }
+ break;